Skip to main content

Client Configs

Use this page for client configuration shape when connecting to Gateway MCP.

Required client config fields

  • url: Gateway MCP endpoint (for example /mcp)
  • transport: streamableHttp
  • headers:
    • Authorization
    • X-Client-ID
    • X-Profile-ID

Environment split pattern

  • Keep separate MCP entries for local, staging, production.
  • Use separate client/profile identities per environment.
  • Keep secrets out of git-tracked files.

Session handling requirements

  1. Run initialize first.
  2. Capture Mcp-Session-Id.
  3. Reuse that session ID for tools/list and tools/call.

Example request shape

curl -i https://gateway.example.com/mcp \
-H "Authorization: Bearer $MCP_TOKEN" \
-H "X-Client-ID: ai-agent-prod" \
-H "X-Profile-ID: mcp-prod" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"tools-1","method":"tools/list","params":{}}'

Quick checks

  • Missing header set -> expect auth/scope failures.
  • Wrong profile ID -> expect 403.
  • Valid session + correct headers -> expected tool response.