{
  "info": {
    "name": "Sarraf MCP · Streamable HTTP örnekleri",
    "description": "Postman Import ile açılan HTTP/JSON-RPC koleksiyonu. Native MCP bağlantı JSON dosyası değildir. İlk beş örnek public doküman/sözleşme içindir; son örnek yetkili salt okunur mağaza verisi ister. Gerçek anahtarı paylaşılan/export edilen dosyaya kaydetmeyin.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_postman_id": "aa3854f3-864a-4c65-b3e7-a556330f7037"
  },
  "variable": [
    {
      "key": "mcp_url",
      "value": "https://docs.sarraf.net/mcp",
      "type": "string"
    },
    {
      "key": "protocol_version",
      "value": "2025-11-25",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "01 · Bağlantıyı başlat",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"initialize\",\n  \"params\": {\n    \"protocolVersion\": \"{{protocol_version}}\",\n    \"capabilities\": {},\n    \"clientInfo\": {\n      \"name\": \"sarraf-postman-example\",\n      \"version\": \"1.0.0\"\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "Önce bu isteği gönderin; result.protocolVersion ile sonraki isteklerdeki protocol_version değişkenini eşleştirin."
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "exec": [
              "const payload = pm.response.json();",
              "if (payload.result && typeof payload.result.protocolVersion === \"string\") {",
              "  pm.collectionVariables.set(\"protocol_version\", payload.result.protocolVersion);",
              "}"
            ]
          }
        }
      ]
    },
    {
      "name": "02 · Başlatma bildirimi",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"notifications/initialized\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "Bildirim başarıda 202 ve boş gövde dönebilir. Bu sunucu stateless çalışır; MCP session ID saklanmaz."
      }
    },
    {
      "name": "03 · Araçları listele",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/list\",\n  \"params\": {}\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "Üç salt okunur aracın adını ve inputSchema alanlarını listeler."
      }
    },
    {
      "name": "04 · Dokümanlarda ara",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"search_docs\",\n    \"arguments\": {\n      \"query\": \"domain\"\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "API anahtarı gerektirmeyen public doküman araması."
      }
    },
    {
      "name": "05 · API işlem sözleşmesi",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 4,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"get_api_operation\",\n    \"arguments\": {\n      \"operationId\": \"get_site_categories\"\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "Parametreleri ve mcpRead iznini inceleyin. Bu çağrı mağaza verisi okumaz."
      }
    },
    {
      "name": "06 · Yetkili kategori okuması",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json, text/event-stream"
          },
          {
            "key": "MCP-Protocol-Version",
            "value": "{{protocol_version}}"
          },
          {
            "key": "x-api-key",
            "value": "{{api_key}}",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 5,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"read_api_operation\",\n    \"arguments\": {\n      \"operationId\": \"get_site_categories\"\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{mcp_url}}",
          "host": [
            "{{mcp_url}}"
          ]
        },
        "description": "Yalnız kendi mağazanızın yetkili API anahtarını yerel api_key değişkenine koyduktan sonra gönderin. İstek GET kategori okumasıdır; finans/stok/sipariş yazmaz. Anahtar boş bırakılırsa auth.required beklenir."
      }
    }
  ]
}
