From 75c5ba85110cfdd97c62a97d8526441c38e60ae9 Mon Sep 17 00:00:00 2001 From: claudespice Date: Sun, 26 Jul 2026 01:26:15 -0700 Subject: [PATCH] docs(api): MCP endpoint is /v1/mcp Streamable HTTP, not /v1/mcp/sse The generated HTTP API reference still documented the legacy MCP SSE transport at /v1/mcp/sse ("Establish an MCP SSE Connection" + "Send message to MCP server"). That path has not existed since v2.0.0: the runtime mounts a rmcp StreamableHttpService at /v1/mcp and registers three operations (GET mcp_stream, POST mcp_message, DELETE mcp_terminate_session). The source comment is explicit -- "This replaces the legacy SSE transport that was removed in rmcp 1.x". The prose docs (features/large-language-models/mcp.md, components/tools/mcp.md, reference/spicepod/runtime.md) already say /v1/mcp; only the OpenAPI-derived reference was stale, because website/public/openapi.json had never been refreshed past the SSE-era spec. Replace /v1/mcp/sse with the runtime's /v1/mcp path object in website/public/openapi.json, regenerate the three operation pages, and drop the two stale ones. Version scope: /v1/mcp/sse was correct through v1.11.x and wrong from v2.0.0 onward, so the same fix is applied to version-2.0.x and version-2.1.x (whose MCP route table is identical to trunk's); the 1.x snapshots keep /v1/mcp/sse. --- .../api/HTTP/mcp-event.ParamsDetails.json | 1 - .../docs/api/HTTP/mcp-event.StatusCodes.json | 1 - website/docs/api/HTTP/mcp-event.api.mdx | 70 -------------- .../api/HTTP/mcp-message.ParamsDetails.json | 1 + ...ma.json => mcp-message.RequestSchema.json} | 0 .../api/HTTP/mcp-message.StatusCodes.json | 1 + website/docs/api/HTTP/mcp-message.api.mdx | 70 ++++++++++++++ .../api/HTTP/mcp-stream.ParamsDetails.json | 1 + ...ema.json => mcp-stream.RequestSchema.json} | 0 .../docs/api/HTTP/mcp-stream.StatusCodes.json | 1 + website/docs/api/HTTP/mcp-stream.api.mdx | 70 ++++++++++++++ .../mcp-terminate-session.ParamsDetails.json | 1 + .../mcp-terminate-session.RequestSchema.json} | 0 .../mcp-terminate-session.StatusCodes.json | 1 + .../api/HTTP/mcp-terminate-session.api.mdx | 70 ++++++++++++++ .../api/HTTP/operation-id.StatusCodes.json | 1 - website/docs/api/HTTP/operation-id.api.mdx | 65 ------------- website/docs/api/HTTP/sidebar.ts | 14 ++- website/public/openapi.json | 93 +++++++++++++++---- .../api/HTTP/mcp-event.ParamsDetails.json | 1 - .../api/HTTP/mcp-event.StatusCodes.json | 1 - .../version-2.0.x/api/HTTP/mcp-event.api.mdx | 70 -------------- .../api/HTTP/mcp-message.ParamsDetails.json | 1 + ...ma.json => mcp-message.RequestSchema.json} | 0 .../api/HTTP/mcp-message.StatusCodes.json | 1 + .../api/HTTP/mcp-message.api.mdx | 70 ++++++++++++++ .../api/HTTP/mcp-stream.ParamsDetails.json | 1 + .../api/HTTP/mcp-stream.RequestSchema.json} | 0 .../api/HTTP/mcp-stream.StatusCodes.json | 1 + .../version-2.0.x/api/HTTP/mcp-stream.api.mdx | 70 ++++++++++++++ .../mcp-terminate-session.ParamsDetails.json | 1 + .../mcp-terminate-session.RequestSchema.json} | 0 .../mcp-terminate-session.StatusCodes.json | 1 + .../api/HTTP/mcp-terminate-session.api.mdx | 70 ++++++++++++++ .../api/HTTP/operation-id.StatusCodes.json | 1 - .../api/HTTP/operation-id.api.mdx | 65 ------------- .../version-2.0.x/api/HTTP/sidebar.ts | 14 ++- .../api/HTTP/mcp-event.ParamsDetails.json | 1 - .../api/HTTP/mcp-event.StatusCodes.json | 1 - .../version-2.1.x/api/HTTP/mcp-event.api.mdx | 70 -------------- .../api/HTTP/mcp-message.ParamsDetails.json | 1 + .../api/HTTP/mcp-message.RequestSchema.json | 1 + .../api/HTTP/mcp-message.StatusCodes.json | 1 + .../api/HTTP/mcp-message.api.mdx | 70 ++++++++++++++ .../api/HTTP/mcp-stream.ParamsDetails.json | 1 + .../api/HTTP/mcp-stream.RequestSchema.json | 1 + .../api/HTTP/mcp-stream.StatusCodes.json | 1 + .../version-2.1.x/api/HTTP/mcp-stream.api.mdx | 70 ++++++++++++++ .../mcp-terminate-session.ParamsDetails.json | 1 + .../mcp-terminate-session.RequestSchema.json | 1 + .../mcp-terminate-session.StatusCodes.json | 1 + .../api/HTTP/mcp-terminate-session.api.mdx | 70 ++++++++++++++ .../api/HTTP/operation-id.StatusCodes.json | 1 - .../api/HTTP/operation-id.api.mdx | 65 ------------- .../version-2.1.x/api/HTTP/sidebar.ts | 14 ++- 55 files changed, 758 insertions(+), 442 deletions(-) delete mode 100644 website/docs/api/HTTP/mcp-event.ParamsDetails.json delete mode 100644 website/docs/api/HTTP/mcp-event.StatusCodes.json delete mode 100644 website/docs/api/HTTP/mcp-event.api.mdx create mode 100644 website/docs/api/HTTP/mcp-message.ParamsDetails.json rename website/docs/api/HTTP/{mcp-event.RequestSchema.json => mcp-message.RequestSchema.json} (100%) create mode 100644 website/docs/api/HTTP/mcp-message.StatusCodes.json create mode 100644 website/docs/api/HTTP/mcp-message.api.mdx create mode 100644 website/docs/api/HTTP/mcp-stream.ParamsDetails.json rename website/docs/api/HTTP/{operation-id.RequestSchema.json => mcp-stream.RequestSchema.json} (100%) create mode 100644 website/docs/api/HTTP/mcp-stream.StatusCodes.json create mode 100644 website/docs/api/HTTP/mcp-stream.api.mdx create mode 100644 website/docs/api/HTTP/mcp-terminate-session.ParamsDetails.json rename website/{versioned_docs/version-2.0.x/api/HTTP/mcp-event.RequestSchema.json => docs/api/HTTP/mcp-terminate-session.RequestSchema.json} (100%) create mode 100644 website/docs/api/HTTP/mcp-terminate-session.StatusCodes.json create mode 100644 website/docs/api/HTTP/mcp-terminate-session.api.mdx delete mode 100644 website/docs/api/HTTP/operation-id.StatusCodes.json delete mode 100644 website/docs/api/HTTP/operation-id.api.mdx delete mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.ParamsDetails.json delete mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.StatusCodes.json delete mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.api.mdx create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.ParamsDetails.json rename website/versioned_docs/version-2.0.x/api/HTTP/{operation-id.RequestSchema.json => mcp-message.RequestSchema.json} (100%) create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.StatusCodes.json create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.api.mdx create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.ParamsDetails.json rename website/versioned_docs/{version-2.1.x/api/HTTP/mcp-event.RequestSchema.json => version-2.0.x/api/HTTP/mcp-stream.RequestSchema.json} (100%) create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.StatusCodes.json create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.api.mdx create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.ParamsDetails.json rename website/versioned_docs/{version-2.1.x/api/HTTP/operation-id.RequestSchema.json => version-2.0.x/api/HTTP/mcp-terminate-session.RequestSchema.json} (100%) create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.StatusCodes.json create mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.api.mdx delete mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/operation-id.StatusCodes.json delete mode 100644 website/versioned_docs/version-2.0.x/api/HTTP/operation-id.api.mdx delete mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.ParamsDetails.json delete mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.StatusCodes.json delete mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.api.mdx create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.ParamsDetails.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.RequestSchema.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.StatusCodes.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.api.mdx create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.ParamsDetails.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.RequestSchema.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.StatusCodes.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.api.mdx create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.ParamsDetails.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.RequestSchema.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.StatusCodes.json create mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.api.mdx delete mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/operation-id.StatusCodes.json delete mode 100644 website/versioned_docs/version-2.1.x/api/HTTP/operation-id.api.mdx diff --git a/website/docs/api/HTTP/mcp-event.ParamsDetails.json b/website/docs/api/HTTP/mcp-event.ParamsDetails.json deleted file mode 100644 index 914110a30..000000000 --- a/website/docs/api/HTTP/mcp-event.ParamsDetails.json +++ /dev/null @@ -1 +0,0 @@ -{"parameters":[{"name":"sessionId","in":"query","required":true}]} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-event.StatusCodes.json b/website/docs/api/HTTP/mcp-event.StatusCodes.json deleted file mode 100644 index 15aa2c9dc..000000000 --- a/website/docs/api/HTTP/mcp-event.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{"202":{"description":"Message accepted. Response will stream via SSE."},"404":{"description":"Session not found. No active session for the given `session_id`."},"413":{"description":"Payload too large. Maximum allowed size is 4MB."},"500":{"description":"Internal server error. An unexpected issue occurred."}}} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-event.api.mdx b/website/docs/api/HTTP/mcp-event.api.mdx deleted file mode 100644 index d3ed20fa5..000000000 --- a/website/docs/api/HTTP/mcp-event.api.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -id: mcp-event -title: "Send message to MCP server" -description: "Send message to the MCP endoint, for a given session." -sidebar_label: "Send message to MCP server" -hide_title: true -hide_table_of_contents: true -api: eJydU8Fu2zAM/RWCpw1wHDfrgM23rtihwLIVTXcqgla1mFiYLKkS7TYz/O8DbQ9rG/Sykw1Reu+Rj69HVvuE5Q02VcBthppSFU1g4x2WuCGnoaGU1J6APXBNsD6/BHLaG8cZ7HwEBXvTkYNEKRnvcszQB4pKMC40lgJ9Sx05xgyDiqohpiikPTrVEJY4P73QmKER4oeW4gEzjPTQmkgaS44tDVs5ScG7RAnLHlfFSj4vRa9nvaqqKDDpHK7mN/BorIXEkVQDnVGw2XzNccjwtDg9xtlMosB5hp1vnc7huwdVsenob7PjAGQq0wju5uNbo+8m4JMPx8CX6mC90sDeg1VxTzms1ZNp2gaUtf6RNCTzm8AkOF1/GXE+FsUxzoVjik5ZSBQ7ikAx+pjDmYPW0VOgikmDSakl8FXVxkg6x2HIsCGuvTgTfJpM4RpLXHYny6YKy5QIM5xAJ5vaaLHEmjmUy6X1lbK1T1x+Kj4X+HpnvkkZNHVkfWjI8Swvh3PvdmbfRvGBa7hbLARRBrUVuqqNhg8jnwrm9hfJ/1Zqxu28tM+GraxLbB2bho6or2uCFExFGv5dsaYil0jez9t2FlRV02KVi3ijybHZGYovK0OG0v4EvMqLvFi0LrG6tyQ1mVyj3DPU11mRnEydv9bZY+UdSx7+P2F8CELK9MTLYJVxImq0qZ/tvMHuBLMx1xmKpdsMxTWp9P29SvQz2mGQ4yltMvg3db67mpP4Ht5iHw17EeVO2VbujQZ3KppxemLqsx28/LG5xmH4A7yDirE= -sidebar_class_name: "post api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Send message to the MCP endoint, for a given session. - - - Request - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-message.ParamsDetails.json b/website/docs/api/HTTP/mcp-message.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/docs/api/HTTP/mcp-message.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-event.RequestSchema.json b/website/docs/api/HTTP/mcp-message.RequestSchema.json similarity index 100% rename from website/docs/api/HTTP/mcp-event.RequestSchema.json rename to website/docs/api/HTTP/mcp-message.RequestSchema.json diff --git a/website/docs/api/HTTP/mcp-message.StatusCodes.json b/website/docs/api/HTTP/mcp-message.StatusCodes.json new file mode 100644 index 000000000..976f5b93c --- /dev/null +++ b/website/docs/api/HTTP/mcp-message.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"JSON-RPC response. Returned as `application/json` for a single response or `text/event-stream` when the server streams additional messages."},"202":{"description":"Message accepted (for JSON-RPC notifications / responses that do not require a reply)."},"400":{"description":"Malformed JSON-RPC payload."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list. Configure `runtime.mcp.allowed_hosts` or set it to `[\"*\"]` to allow all hosts."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."},"413":{"description":"Payload too large. Maximum allowed size is 32 MiB."}}} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-message.api.mdx b/website/docs/api/HTTP/mcp-message.api.mdx new file mode 100644 index 000000000..91911ee8b --- /dev/null +++ b/website/docs/api/HTTP/mcp-message.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-message +title: "Send a Model Context Protocol message" +description: "Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header." +sidebar_label: "Send a Model Context Protocol message" +hide_title: true +hide_table_of_contents: true +api: eJztVk1vGzcQ/SsDnuJCX3ZyaHVzjRZxUTVC5JwcwUstRxIbLsmSXNmK4P/eGe5qK3uFADnl0oOkXXI482bem6EOIslNFNN7UZVeLAdCYSyD9kk7K6ZigVaBhD8WH/4afpzfQIUxyg1CcpC2CAuvS4TZzRwihh0GqKO2m7zFi4sUUFZyZRDe393NIQVpo3chjeCOTALSi40IOgJqOhQoFDsg+y5iZ/SmkN4bXUqGNv47OltcgKMjFhaL3yDmWGSV8CmNcYc2DZu14mJA8AyWCRXstMzwiuuyRJ8K2KJUGEawoMzIMZTOJm1rnfYMq5Qh6NNjs9IPW9PhreqOi4FwHkPGdquocFTNh7ZYtOdlkBUmDFzpg7D0QjYvfZGZ5pI3HkWfiQafVpSZXmsqVsBUB0voVvsMruWAjAptddLS6K9YUIEUmf5T60CmtBnrVaRXcpOXMabIfFZS20Sfls7X1eAUj17EdC1NxOclLzX0UGIHcTWZ8M9L4D0mR/DxCFxG6LMKa3cihI5/WjzDLTxu0Z5m36xHkEpp9inNUbRxJJ4HhPGqj3HWylpmURCwN4yhQ24dV7zBGGHcYaK6bWUC5djiWGOCHtCb/UUO9+5cSWbSkP+K4nQhvNwbJ1V75rJ/5pOVddq6QJSqpn2K8e5yTDorgJrUO207CFTVUBNxFY74UMH0rpDJXOtNHdjBzfGZ++d6fgtfcA8+uB3pKwCpYO/q0PS3d6rVUAp7eKRGhZJ8sAxJBS3it33Ev7uw0orsWrjvXez6DXbS1LnxuXK6YbADTUmNpDHuEdXDlk7FAoyO6RT1t2yJuojkNXHexf1n8dNnscxFyIb8Ddm0xf7uXLW/WPdo2RU++dw5r1u/OXx5JvF5wyUFdGBk2JDiZ/JJV3UFLVIS99ec/dsrmOlfyRX5ogGxdTw7PGHLQyNt6a1lmRYahTcjpA6GZ0VKfjoeG1dKwxlNf578MumNjj95GxT1jXG+4r5vPJ3WM9NaDIfskVNbcriyDtT5OZ70+oEkQs9L3tN27TjxpJPhUday0QvNxEcWEcmnM6F2R+oePt9Owmsvyy0Or0YM/r8J93KHSsTpN45pYTQZ1jYmvl54j6tWSXvitb28Zk6h4VR5esA8uORK102F15APgmceIfj/9vue2y/tPZc8h/eGrhGmJIv00Ar5XuwuybD9m8Fq5bXDYSUjfgrm+ZmX6ToKWWTEtQw6c8uSGxyvRdai0pE3jtfQNwn88Zfm2crkVur/AchTkTZy/3XzYP5hcUcT4l+e7F7s +sidebar_class_name: "post api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-stream.ParamsDetails.json b/website/docs/api/HTTP/mcp-stream.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/docs/api/HTTP/mcp-stream.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/docs/api/HTTP/operation-id.RequestSchema.json b/website/docs/api/HTTP/mcp-stream.RequestSchema.json similarity index 100% rename from website/docs/api/HTTP/operation-id.RequestSchema.json rename to website/docs/api/HTTP/mcp-stream.RequestSchema.json diff --git a/website/docs/api/HTTP/mcp-stream.StatusCodes.json b/website/docs/api/HTTP/mcp-stream.StatusCodes.json new file mode 100644 index 000000000..ca69fa03f --- /dev/null +++ b/website/docs/api/HTTP/mcp-stream.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"SSE stream (`text/event-stream`) of server-originated MCP messages."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-stream.api.mdx b/website/docs/api/HTTP/mcp-stream.api.mdx new file mode 100644 index 000000000..93e371874 --- /dev/null +++ b/website/docs/api/HTTP/mcp-stream.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-stream +title: "Open an MCP server-to-client SSE stream" +description: "Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`." +sidebar_label: "Open an MCP server-to-client SSE stream" +hide_title: true +hide_table_of_contents: true +api: eJzdVU2P00AM/SvWnEDatF3gAL0hxMdKIFZqOaHVZpq4rcVkZphxsluq/e/YSVp2t8AZcaiajD328/OzszdsN9nMv5qmiubqzNSYq0SRKXgzN58jerDggt8UjjqsIWPqMBUcisoReobF4i1kTmgbWIcEvEWo2pTU9OnNpfjnLLHAZqhxTV5CrHa916K/ZFcO4cNyeQmcrM8xJJ7AUszlpyoWi+F2cVGXsEVbY4KmzQxUS3xa78B6wFvKTH5zTFVJXJY8HVkoLz8vljDtzqdSXzkxZyZETFbLu6ilQDm9HtCLKdpkG2RMSsjeeHkRl4c4xI2UmQGNeUzY6HgASAI4IbfpXt0DgyBOJXliso5+YCmV1OL6vaUkrmLM7SrLq/Kox5g5AwdoLHmW3wNyqyDJfEu80woPUcx8bV3Guys9Ema9uJv53jybzfTvEfBfbXxSMt7yFDvJXQxn5VMI60PvQ6IN+Z5iBdEICLvBPDF3Z+bF7Pw09hdvW97KtR9Yj809dATQ1zHQWKSgzlCmVqppcKKXSq15hVrhmjZt0gBvDs/a/deXF/ANdxBT6Ej1IdTsQptgEanCGOqRWE47uCHeqjr63gg1I+Lnp4jfhbSiWvxGuB9C5qMCO+taBMrgA2s6beoRtBQ1sc6FG6yvt3Irl+BEn2OqF78j55sPNx5kdvA29t1/LH25LLdFmdugmt0g92LlrbyMRMrB0J1Bum1yqlHmOJ9OXaisUyzzl7NXsxPJflSzDGeHLsRG9TZEuk90z1xZFBpR4VxpOhlzUVyfz0a6li7I85XayK+DVsrETkdoJOcktXKbtU/SoaOLk3eRqt4fJ/B1tNUWi2cTBf9rsh5ahCEtfwgsB5NZ0frMul/UFqX+xvp7UYfddhikP261x6D3RqdNfP7P9ci7qOT0GyA6WTRKXi+n/Si5r6Y7F8fxe6G60rP9fmUzfknu7k6PZWGlXg7SFZuo74KK4+ywOFU1NWU1HBbVX4j+F9bqb5npRX/6iehXhBj6STkO7vu3S5nkn6SAmfA= +sidebar_class_name: "get api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-terminate-session.ParamsDetails.json b/website/docs/api/HTTP/mcp-terminate-session.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/docs/api/HTTP/mcp-terminate-session.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.RequestSchema.json b/website/docs/api/HTTP/mcp-terminate-session.RequestSchema.json similarity index 100% rename from website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.RequestSchema.json rename to website/docs/api/HTTP/mcp-terminate-session.RequestSchema.json diff --git a/website/docs/api/HTTP/mcp-terminate-session.StatusCodes.json b/website/docs/api/HTTP/mcp-terminate-session.StatusCodes.json new file mode 100644 index 000000000..8dd072b73 --- /dev/null +++ b/website/docs/api/HTTP/mcp-terminate-session.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"204":{"description":"Session terminated."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or already-terminated `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/docs/api/HTTP/mcp-terminate-session.api.mdx b/website/docs/api/HTTP/mcp-terminate-session.api.mdx new file mode 100644 index 000000000..f913d7aa1 --- /dev/null +++ b/website/docs/api/HTTP/mcp-terminate-session.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-terminate-session +title: "Terminate an MCP Streamable HTTP session" +description: "Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`." +sidebar_label: "Terminate an MCP Streamable HTTP session" +hide_title: true +hide_table_of_contents: true +api: eJzNVE1PGzEQ/Ssjn/MFzaHNDVEQSFAhJZxQxDprh7VwbNf2hqZR/nvfbDYJkKhnDqvd9YzH771547XI8iWJ0ZNYlEFMO0LpVEYTsvFOjMREx4VxMmvKlab7ywdKOiXEyCjtspkbrWi2aqLFfRm64224e6sKqrRUOvZoXM+S/l0jnyK/U0400zIa99JsTHKh39WlN2MtMkttlqg6HAzpl8907Wunip7oCB90lAzwVgEicD/nHczntgyygoyoiwizWwuHH2R/xIg0wzS3SMVn9uPPXCNg5Tq6A+mk4xLLSCqMM9lIa/7qgqRTDVcTkYpgOiFB9rSQxmU8H5QtPQ5ztckrJrurIkZzaZPeTHkpBe+QLkZrcT4Y8us08L0uqic2HTEcnB3nPjpZ58pH4FY9mnAj+8uzPmQtSDsVvGlBA0WiItZAt9A93lQwh5lmxHPzUkcucLn7hgZ08XBLr3pFIfolRIwEqitfRxoHU+rgVStUjit0PVdUogZrDaot4m/HiK99nBmFvBbujU955zZaSltrMokcPIPjGmfuQINUT1rr37R6rrArFWRNyu1RJ4R8dK/OvznykaSNOGHVPWh65HjUQSGYrvLsTKUt/NdYMVf4b2XFwtY1W2PW0bIDcw6jft/6UlpGNvo++DE4MuQdh0nppbY+LNhN20rvZW90LLpdrsiIpnxcWUf4qTlPBvOMnuB7yjHj5p55Z5MtD0gr1dHRrHTirqFf+xSLfxiR97fzdRFkWenueY/BH+bmYwQiMf1tYSz0Bt3apSxnQIBYAP+FdO+qHq4huZ2VcUYzFryBbiaT/ex8Rr0WPEwA8VWvsrwKzC/rP7kfLG4C5t84Yt265kksz5DY3s5sDV5br2cy6cdoNxteBpLYdBTCAkwjJPe3s7vZuPHKJA7sbpL/SPUV7r2TyjS+Pb7Dm5lHoDH7fvx+Xt1dTa4wkv8AsJFpLQ== +sidebar_class_name: "delete api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/docs/api/HTTP/operation-id.StatusCodes.json b/website/docs/api/HTTP/operation-id.StatusCodes.json deleted file mode 100644 index bfc5cbb0c..000000000 --- a/website/docs/api/HTTP/operation-id.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{}} \ No newline at end of file diff --git a/website/docs/api/HTTP/operation-id.api.mdx b/website/docs/api/HTTP/operation-id.api.mdx deleted file mode 100644 index 538a9590c..000000000 --- a/website/docs/api/HTTP/operation-id.api.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -id: operation-id -title: "Establish an MCP SSE Connection" -description: "Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools." -sidebar_label: "Establish an MCP SSE Connection" -hide_title: true -hide_table_of_contents: true -api: eJzlU8Fu2zAM/RWCpxZwnLSnzbchCIYCKxrA2akLGlVmY2KypEm0t8Lwvw90tjbtPmHWxdYT36Men0cUc8xY3WNnI+4LbCjbxFE4eKzwxrOwEcpgoKY0UFrU5AU2A3nJcFHXm0uwwXuyWgF9Zn8EaQluQ0MO1sEL/RLYpiDBBgcXt+vtJUgA9kLJWIGfLC3UkS2BhOBy+c3rgvPnzlv6K0NNAdbxrG+Nh0y+gY5yNkfKMLCBw/au3sFyuFp2Ni5zpgMY30AiSzwQJMox+EwZpE2hP7YgLWeo6w1kSWS6EgsMkZLRK900WL1+PXCDBb4wYDVOBXYkbdBjRxIsMBppscIzfSwwz+ap0SP2yWGFrUislksXrHFtyFJ9WH1c4fsBfFEYGhrIhdip9SemUq194mOf6OTgYbFQxkOJ017lbJ9Ynmc9E/nhO+n7XjH2TwGrEYXFEVaYei/c0T/Su5Yg61waeD3i2JLPpPXedFr+KRrb0uK61Oa5IS/8xJTeIlOBev0T8XW5KleL3mcxj44UiyFLZ/wZ62YGObdgPNyut/N41i9Be9/siFaT5uV/zqw8R7VOm19GZ9irtXPYxj+hvMfhCov5Vy9Qg7kvULOnyDg+mkxfk5sm3f7RU5ojU+BgEs+T0gCdxf3zZofT9BtPaXHY -sidebar_class_name: "get api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools. - - - Once connected, clients can send messages via `POST /v1/mcp/sse` and receive responses through this SSE stream. - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/docs/api/HTTP/sidebar.ts b/website/docs/api/HTTP/sidebar.ts index 10c535a25..742fb51cc 100644 --- a/website/docs/api/HTTP/sidebar.ts +++ b/website/docs/api/HTTP/sidebar.ts @@ -138,16 +138,22 @@ const sidebar: SidebarsConfig = { items: [ { type: "doc", - id: "api/HTTP/operation-id", - label: "Establish an MCP SSE Connection", + id: "api/HTTP/mcp-stream", + label: "Open an MCP server-to-client SSE stream", className: "api-method get", }, { type: "doc", - id: "api/HTTP/mcp-event", - label: "Send message to MCP server", + id: "api/HTTP/mcp-message", + label: "Send a Model Context Protocol message", className: "api-method post", }, + { + type: "doc", + id: "api/HTTP/mcp-terminate-session", + label: "Terminate an MCP Streamable HTTP session", + className: "api-method delete", + }, ], }, { diff --git a/website/public/openapi.json b/website/public/openapi.json index 4e610ad00..036ea47f1 100644 --- a/website/public/openapi.json +++ b/website/public/openapi.json @@ -824,42 +824,103 @@ } } }, - "/v1/mcp/sse": { + "/v1/mcp": { "get": { "tags": [ "mcp" ], - "summary": "Establish an MCP SSE Connection", - "description": "Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools.\n\n\n Once connected, clients can send messages via `POST /v1/mcp/sse` and receive responses through this SSE stream.", - "operationId": "operation_id", - "responses": {} + "summary": "Open an MCP server-to-client SSE stream", + "description": "Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`.", + "operationId": "mcp_stream", + "parameters": [ + { + "name": "Mcp-Session-Id", + "in": "header", + "description": "Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.", + "required": false + } + ], + "responses": { + "200": { + "description": "SSE stream (`text/event-stream`) of server-originated MCP messages." + }, + "401": { + "description": "Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials." + }, + "403": { + "description": "Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list." + }, + "404": { + "description": "Unknown or expired `Mcp-Session-Id`." + } + } }, "post": { "tags": [ "mcp" ], - "summary": "Send message to MCP server", - "description": "Send message to the MCP endoint, for a given session.", - "operationId": "mcp_event", + "summary": "Send a Model Context Protocol message", + "description": "Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header.", + "operationId": "mcp_message", "parameters": [ { - "name": "sessionId", - "in": "query", - "required": true + "name": "Mcp-Session-Id", + "in": "header", + "description": "Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.", + "required": false } ], "responses": { + "200": { + "description": "JSON-RPC response. Returned as `application/json` for a single response or `text/event-stream` when the server streams additional messages." + }, "202": { - "description": "Message accepted. Response will stream via SSE." + "description": "Message accepted (for JSON-RPC notifications / responses that do not require a reply)." + }, + "400": { + "description": "Malformed JSON-RPC payload." + }, + "401": { + "description": "Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials." + }, + "403": { + "description": "Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list. Configure `runtime.mcp.allowed_hosts` or set it to `[\"*\"]` to allow all hosts." }, "404": { - "description": "Session not found. No active session for the given `session_id`." + "description": "Unknown or expired `Mcp-Session-Id`." }, "413": { - "description": "Payload too large. Maximum allowed size is 4MB." + "description": "Payload too large. Maximum allowed size is 32 MiB." + } + } + }, + "delete": { + "tags": [ + "mcp" + ], + "summary": "Terminate an MCP Streamable HTTP session", + "description": "Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`.", + "operationId": "mcp_terminate_session", + "parameters": [ + { + "name": "Mcp-Session-Id", + "in": "header", + "description": "Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.", + "required": false + } + ], + "responses": { + "204": { + "description": "Session terminated." }, - "500": { - "description": "Internal server error. An unexpected issue occurred." + "401": { + "description": "Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials." + }, + "403": { + "description": "Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list." + }, + "404": { + "description": "Unknown or already-terminated `Mcp-Session-Id`." } } } diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.ParamsDetails.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.ParamsDetails.json deleted file mode 100644 index 914110a30..000000000 --- a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.ParamsDetails.json +++ /dev/null @@ -1 +0,0 @@ -{"parameters":[{"name":"sessionId","in":"query","required":true}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.StatusCodes.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.StatusCodes.json deleted file mode 100644 index 15aa2c9dc..000000000 --- a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{"202":{"description":"Message accepted. Response will stream via SSE."},"404":{"description":"Session not found. No active session for the given `session_id`."},"413":{"description":"Payload too large. Maximum allowed size is 4MB."},"500":{"description":"Internal server error. An unexpected issue occurred."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.api.mdx b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.api.mdx deleted file mode 100644 index d3ed20fa5..000000000 --- a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-event.api.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -id: mcp-event -title: "Send message to MCP server" -description: "Send message to the MCP endoint, for a given session." -sidebar_label: "Send message to MCP server" -hide_title: true -hide_table_of_contents: true -api: eJydU8Fu2zAM/RWCpw1wHDfrgM23rtihwLIVTXcqgla1mFiYLKkS7TYz/O8DbQ9rG/Sykw1Reu+Rj69HVvuE5Q02VcBthppSFU1g4x2WuCGnoaGU1J6APXBNsD6/BHLaG8cZ7HwEBXvTkYNEKRnvcszQB4pKMC40lgJ9Sx05xgyDiqohpiikPTrVEJY4P73QmKER4oeW4gEzjPTQmkgaS44tDVs5ScG7RAnLHlfFSj4vRa9nvaqqKDDpHK7mN/BorIXEkVQDnVGw2XzNccjwtDg9xtlMosB5hp1vnc7huwdVsenob7PjAGQq0wju5uNbo+8m4JMPx8CX6mC90sDeg1VxTzms1ZNp2gaUtf6RNCTzm8AkOF1/GXE+FsUxzoVjik5ZSBQ7ikAx+pjDmYPW0VOgikmDSakl8FXVxkg6x2HIsCGuvTgTfJpM4RpLXHYny6YKy5QIM5xAJ5vaaLHEmjmUy6X1lbK1T1x+Kj4X+HpnvkkZNHVkfWjI8Swvh3PvdmbfRvGBa7hbLARRBrUVuqqNhg8jnwrm9hfJ/1Zqxu28tM+GraxLbB2bho6or2uCFExFGv5dsaYil0jez9t2FlRV02KVi3ijybHZGYovK0OG0v4EvMqLvFi0LrG6tyQ1mVyj3DPU11mRnEydv9bZY+UdSx7+P2F8CELK9MTLYJVxImq0qZ/tvMHuBLMx1xmKpdsMxTWp9P29SvQz2mGQ4yltMvg3db67mpP4Ht5iHw17EeVO2VbujQZ3KppxemLqsx28/LG5xmH4A7yDirE= -sidebar_class_name: "post api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Send message to the MCP endoint, for a given session. - - - Request - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.ParamsDetails.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.RequestSchema.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.RequestSchema.json similarity index 100% rename from website/versioned_docs/version-2.0.x/api/HTTP/operation-id.RequestSchema.json rename to website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.RequestSchema.json diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.StatusCodes.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.StatusCodes.json new file mode 100644 index 000000000..976f5b93c --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"JSON-RPC response. Returned as `application/json` for a single response or `text/event-stream` when the server streams additional messages."},"202":{"description":"Message accepted (for JSON-RPC notifications / responses that do not require a reply)."},"400":{"description":"Malformed JSON-RPC payload."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list. Configure `runtime.mcp.allowed_hosts` or set it to `[\"*\"]` to allow all hosts."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."},"413":{"description":"Payload too large. Maximum allowed size is 32 MiB."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.api.mdx b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.api.mdx new file mode 100644 index 000000000..91911ee8b --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-message.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-message +title: "Send a Model Context Protocol message" +description: "Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header." +sidebar_label: "Send a Model Context Protocol message" +hide_title: true +hide_table_of_contents: true +api: eJztVk1vGzcQ/SsDnuJCX3ZyaHVzjRZxUTVC5JwcwUstRxIbLsmSXNmK4P/eGe5qK3uFADnl0oOkXXI482bem6EOIslNFNN7UZVeLAdCYSyD9kk7K6ZigVaBhD8WH/4afpzfQIUxyg1CcpC2CAuvS4TZzRwihh0GqKO2m7zFi4sUUFZyZRDe393NIQVpo3chjeCOTALSi40IOgJqOhQoFDsg+y5iZ/SmkN4bXUqGNv47OltcgKMjFhaL3yDmWGSV8CmNcYc2DZu14mJA8AyWCRXstMzwiuuyRJ8K2KJUGEawoMzIMZTOJm1rnfYMq5Qh6NNjs9IPW9PhreqOi4FwHkPGdquocFTNh7ZYtOdlkBUmDFzpg7D0QjYvfZGZ5pI3HkWfiQafVpSZXmsqVsBUB0voVvsMruWAjAptddLS6K9YUIEUmf5T60CmtBnrVaRXcpOXMabIfFZS20Sfls7X1eAUj17EdC1NxOclLzX0UGIHcTWZ8M9L4D0mR/DxCFxG6LMKa3cihI5/WjzDLTxu0Z5m36xHkEpp9inNUbRxJJ4HhPGqj3HWylpmURCwN4yhQ24dV7zBGGHcYaK6bWUC5djiWGOCHtCb/UUO9+5cSWbSkP+K4nQhvNwbJ1V75rJ/5pOVddq6QJSqpn2K8e5yTDorgJrUO207CFTVUBNxFY74UMH0rpDJXOtNHdjBzfGZ++d6fgtfcA8+uB3pKwCpYO/q0PS3d6rVUAp7eKRGhZJ8sAxJBS3it33Ev7uw0orsWrjvXez6DXbS1LnxuXK6YbADTUmNpDHuEdXDlk7FAoyO6RT1t2yJuojkNXHexf1n8dNnscxFyIb8Ddm0xf7uXLW/WPdo2RU++dw5r1u/OXx5JvF5wyUFdGBk2JDiZ/JJV3UFLVIS99ec/dsrmOlfyRX5ogGxdTw7PGHLQyNt6a1lmRYahTcjpA6GZ0VKfjoeG1dKwxlNf578MumNjj95GxT1jXG+4r5vPJ3WM9NaDIfskVNbcriyDtT5OZ70+oEkQs9L3tN27TjxpJPhUday0QvNxEcWEcmnM6F2R+oePt9Owmsvyy0Or0YM/r8J93KHSsTpN45pYTQZ1jYmvl54j6tWSXvitb28Zk6h4VR5esA8uORK102F15APgmceIfj/9vue2y/tPZc8h/eGrhGmJIv00Ar5XuwuybD9m8Fq5bXDYSUjfgrm+ZmX6ToKWWTEtQw6c8uSGxyvRdai0pE3jtfQNwn88Zfm2crkVur/AchTkTZy/3XzYP5hcUcT4l+e7F7s +sidebar_class_name: "post api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.ParamsDetails.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.RequestSchema.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.RequestSchema.json similarity index 100% rename from website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.RequestSchema.json rename to website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.RequestSchema.json diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.StatusCodes.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.StatusCodes.json new file mode 100644 index 000000000..ca69fa03f --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"SSE stream (`text/event-stream`) of server-originated MCP messages."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.api.mdx b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.api.mdx new file mode 100644 index 000000000..93e371874 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-stream.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-stream +title: "Open an MCP server-to-client SSE stream" +description: "Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`." +sidebar_label: "Open an MCP server-to-client SSE stream" +hide_title: true +hide_table_of_contents: true +api: eJzdVU2P00AM/SvWnEDatF3gAL0hxMdKIFZqOaHVZpq4rcVkZphxsluq/e/YSVp2t8AZcaiajD328/OzszdsN9nMv5qmiubqzNSYq0SRKXgzN58jerDggt8UjjqsIWPqMBUcisoReobF4i1kTmgbWIcEvEWo2pTU9OnNpfjnLLHAZqhxTV5CrHa916K/ZFcO4cNyeQmcrM8xJJ7AUszlpyoWi+F2cVGXsEVbY4KmzQxUS3xa78B6wFvKTH5zTFVJXJY8HVkoLz8vljDtzqdSXzkxZyZETFbLu6ilQDm9HtCLKdpkG2RMSsjeeHkRl4c4xI2UmQGNeUzY6HgASAI4IbfpXt0DgyBOJXliso5+YCmV1OL6vaUkrmLM7SrLq/Kox5g5AwdoLHmW3wNyqyDJfEu80woPUcx8bV3Guys9Ema9uJv53jybzfTvEfBfbXxSMt7yFDvJXQxn5VMI60PvQ6IN+Z5iBdEICLvBPDF3Z+bF7Pw09hdvW97KtR9Yj809dATQ1zHQWKSgzlCmVqppcKKXSq15hVrhmjZt0gBvDs/a/deXF/ANdxBT6Ej1IdTsQptgEanCGOqRWE47uCHeqjr63gg1I+Lnp4jfhbSiWvxGuB9C5qMCO+taBMrgA2s6beoRtBQ1sc6FG6yvt3Irl+BEn2OqF78j55sPNx5kdvA29t1/LH25LLdFmdugmt0g92LlrbyMRMrB0J1Bum1yqlHmOJ9OXaisUyzzl7NXsxPJflSzDGeHLsRG9TZEuk90z1xZFBpR4VxpOhlzUVyfz0a6li7I85XayK+DVsrETkdoJOcktXKbtU/SoaOLk3eRqt4fJ/B1tNUWi2cTBf9rsh5ahCEtfwgsB5NZ0frMul/UFqX+xvp7UYfddhikP261x6D3RqdNfP7P9ci7qOT0GyA6WTRKXi+n/Si5r6Y7F8fxe6G60rP9fmUzfknu7k6PZWGlXg7SFZuo74KK4+ywOFU1NWU1HBbVX4j+F9bqb5npRX/6iehXhBj6STkO7vu3S5nkn6SAmfA= +sidebar_class_name: "get api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.ParamsDetails.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.RequestSchema.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.RequestSchema.json similarity index 100% rename from website/versioned_docs/version-2.1.x/api/HTTP/operation-id.RequestSchema.json rename to website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.RequestSchema.json diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.StatusCodes.json b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.StatusCodes.json new file mode 100644 index 000000000..8dd072b73 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"204":{"description":"Session terminated."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or already-terminated `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.api.mdx b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.api.mdx new file mode 100644 index 000000000..f913d7aa1 --- /dev/null +++ b/website/versioned_docs/version-2.0.x/api/HTTP/mcp-terminate-session.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-terminate-session +title: "Terminate an MCP Streamable HTTP session" +description: "Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`." +sidebar_label: "Terminate an MCP Streamable HTTP session" +hide_title: true +hide_table_of_contents: true +api: eJzNVE1PGzEQ/Ssjn/MFzaHNDVEQSFAhJZxQxDprh7VwbNf2hqZR/nvfbDYJkKhnDqvd9YzH771547XI8iWJ0ZNYlEFMO0LpVEYTsvFOjMREx4VxMmvKlab7ywdKOiXEyCjtspkbrWi2aqLFfRm64224e6sKqrRUOvZoXM+S/l0jnyK/U0400zIa99JsTHKh39WlN2MtMkttlqg6HAzpl8907Wunip7oCB90lAzwVgEicD/nHczntgyygoyoiwizWwuHH2R/xIg0wzS3SMVn9uPPXCNg5Tq6A+mk4xLLSCqMM9lIa/7qgqRTDVcTkYpgOiFB9rSQxmU8H5QtPQ5ztckrJrurIkZzaZPeTHkpBe+QLkZrcT4Y8us08L0uqic2HTEcnB3nPjpZ58pH4FY9mnAj+8uzPmQtSDsVvGlBA0WiItZAt9A93lQwh5lmxHPzUkcucLn7hgZ08XBLr3pFIfolRIwEqitfRxoHU+rgVStUjit0PVdUogZrDaot4m/HiK99nBmFvBbujU955zZaSltrMokcPIPjGmfuQINUT1rr37R6rrArFWRNyu1RJ4R8dK/OvznykaSNOGHVPWh65HjUQSGYrvLsTKUt/NdYMVf4b2XFwtY1W2PW0bIDcw6jft/6UlpGNvo++DE4MuQdh0nppbY+LNhN20rvZW90LLpdrsiIpnxcWUf4qTlPBvOMnuB7yjHj5p55Z5MtD0gr1dHRrHTirqFf+xSLfxiR97fzdRFkWenueY/BH+bmYwQiMf1tYSz0Bt3apSxnQIBYAP+FdO+qHq4huZ2VcUYzFryBbiaT/ex8Rr0WPEwA8VWvsrwKzC/rP7kfLG4C5t84Yt265kksz5DY3s5sDV5br2cy6cdoNxteBpLYdBTCAkwjJPe3s7vZuPHKJA7sbpL/SPUV7r2TyjS+Pb7Dm5lHoDH7fvx+Xt1dTa4wkv8AsJFpLQ== +sidebar_class_name: "delete api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.StatusCodes.json b/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.StatusCodes.json deleted file mode 100644 index bfc5cbb0c..000000000 --- a/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.api.mdx b/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.api.mdx deleted file mode 100644 index 538a9590c..000000000 --- a/website/versioned_docs/version-2.0.x/api/HTTP/operation-id.api.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -id: operation-id -title: "Establish an MCP SSE Connection" -description: "Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools." -sidebar_label: "Establish an MCP SSE Connection" -hide_title: true -hide_table_of_contents: true -api: eJzlU8Fu2zAM/RWCpxZwnLSnzbchCIYCKxrA2akLGlVmY2KypEm0t8Lwvw90tjbtPmHWxdYT36Men0cUc8xY3WNnI+4LbCjbxFE4eKzwxrOwEcpgoKY0UFrU5AU2A3nJcFHXm0uwwXuyWgF9Zn8EaQluQ0MO1sEL/RLYpiDBBgcXt+vtJUgA9kLJWIGfLC3UkS2BhOBy+c3rgvPnzlv6K0NNAdbxrG+Nh0y+gY5yNkfKMLCBw/au3sFyuFp2Ni5zpgMY30AiSzwQJMox+EwZpE2hP7YgLWeo6w1kSWS6EgsMkZLRK900WL1+PXCDBb4wYDVOBXYkbdBjRxIsMBppscIzfSwwz+ap0SP2yWGFrUislksXrHFtyFJ9WH1c4fsBfFEYGhrIhdip9SemUq194mOf6OTgYbFQxkOJ017lbJ9Ynmc9E/nhO+n7XjH2TwGrEYXFEVaYei/c0T/Su5Yg61waeD3i2JLPpPXedFr+KRrb0uK61Oa5IS/8xJTeIlOBev0T8XW5KleL3mcxj44UiyFLZ/wZ62YGObdgPNyut/N41i9Be9/siFaT5uV/zqw8R7VOm19GZ9irtXPYxj+hvMfhCov5Vy9Qg7kvULOnyDg+mkxfk5sm3f7RU5ojU+BgEs+T0gCdxf3zZofT9BtPaXHY -sidebar_class_name: "get api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools. - - - Once connected, clients can send messages via `POST /v1/mcp/sse` and receive responses through this SSE stream. - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/versioned_docs/version-2.0.x/api/HTTP/sidebar.ts b/website/versioned_docs/version-2.0.x/api/HTTP/sidebar.ts index 10c535a25..742fb51cc 100644 --- a/website/versioned_docs/version-2.0.x/api/HTTP/sidebar.ts +++ b/website/versioned_docs/version-2.0.x/api/HTTP/sidebar.ts @@ -138,16 +138,22 @@ const sidebar: SidebarsConfig = { items: [ { type: "doc", - id: "api/HTTP/operation-id", - label: "Establish an MCP SSE Connection", + id: "api/HTTP/mcp-stream", + label: "Open an MCP server-to-client SSE stream", className: "api-method get", }, { type: "doc", - id: "api/HTTP/mcp-event", - label: "Send message to MCP server", + id: "api/HTTP/mcp-message", + label: "Send a Model Context Protocol message", className: "api-method post", }, + { + type: "doc", + id: "api/HTTP/mcp-terminate-session", + label: "Terminate an MCP Streamable HTTP session", + className: "api-method delete", + }, ], }, { diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.ParamsDetails.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.ParamsDetails.json deleted file mode 100644 index 914110a30..000000000 --- a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.ParamsDetails.json +++ /dev/null @@ -1 +0,0 @@ -{"parameters":[{"name":"sessionId","in":"query","required":true}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.StatusCodes.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.StatusCodes.json deleted file mode 100644 index 15aa2c9dc..000000000 --- a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{"202":{"description":"Message accepted. Response will stream via SSE."},"404":{"description":"Session not found. No active session for the given `session_id`."},"413":{"description":"Payload too large. Maximum allowed size is 4MB."},"500":{"description":"Internal server error. An unexpected issue occurred."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.api.mdx b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.api.mdx deleted file mode 100644 index d3ed20fa5..000000000 --- a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-event.api.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -id: mcp-event -title: "Send message to MCP server" -description: "Send message to the MCP endoint, for a given session." -sidebar_label: "Send message to MCP server" -hide_title: true -hide_table_of_contents: true -api: eJydU8Fu2zAM/RWCpw1wHDfrgM23rtihwLIVTXcqgla1mFiYLKkS7TYz/O8DbQ9rG/Sykw1Reu+Rj69HVvuE5Q02VcBthppSFU1g4x2WuCGnoaGU1J6APXBNsD6/BHLaG8cZ7HwEBXvTkYNEKRnvcszQB4pKMC40lgJ9Sx05xgyDiqohpiikPTrVEJY4P73QmKER4oeW4gEzjPTQmkgaS44tDVs5ScG7RAnLHlfFSj4vRa9nvaqqKDDpHK7mN/BorIXEkVQDnVGw2XzNccjwtDg9xtlMosB5hp1vnc7huwdVsenob7PjAGQq0wju5uNbo+8m4JMPx8CX6mC90sDeg1VxTzms1ZNp2gaUtf6RNCTzm8AkOF1/GXE+FsUxzoVjik5ZSBQ7ikAx+pjDmYPW0VOgikmDSakl8FXVxkg6x2HIsCGuvTgTfJpM4RpLXHYny6YKy5QIM5xAJ5vaaLHEmjmUy6X1lbK1T1x+Kj4X+HpnvkkZNHVkfWjI8Swvh3PvdmbfRvGBa7hbLARRBrUVuqqNhg8jnwrm9hfJ/1Zqxu28tM+GraxLbB2bho6or2uCFExFGv5dsaYil0jez9t2FlRV02KVi3ijybHZGYovK0OG0v4EvMqLvFi0LrG6tyQ1mVyj3DPU11mRnEydv9bZY+UdSx7+P2F8CELK9MTLYJVxImq0qZ/tvMHuBLMx1xmKpdsMxTWp9P29SvQz2mGQ4yltMvg3db67mpP4Ht5iHw17EeVO2VbujQZ3KppxemLqsx28/LG5xmH4A7yDirE= -sidebar_class_name: "post api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Send message to the MCP endoint, for a given session. - - - Request - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.ParamsDetails.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.RequestSchema.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.RequestSchema.json new file mode 100644 index 000000000..c96bcede2 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.RequestSchema.json @@ -0,0 +1 @@ +{"title":"Body"} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.StatusCodes.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.StatusCodes.json new file mode 100644 index 000000000..976f5b93c --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"JSON-RPC response. Returned as `application/json` for a single response or `text/event-stream` when the server streams additional messages."},"202":{"description":"Message accepted (for JSON-RPC notifications / responses that do not require a reply)."},"400":{"description":"Malformed JSON-RPC payload."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list. Configure `runtime.mcp.allowed_hosts` or set it to `[\"*\"]` to allow all hosts."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."},"413":{"description":"Payload too large. Maximum allowed size is 32 MiB."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.api.mdx b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.api.mdx new file mode 100644 index 000000000..91911ee8b --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-message.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-message +title: "Send a Model Context Protocol message" +description: "Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header." +sidebar_label: "Send a Model Context Protocol message" +hide_title: true +hide_table_of_contents: true +api: eJztVk1vGzcQ/SsDnuJCX3ZyaHVzjRZxUTVC5JwcwUstRxIbLsmSXNmK4P/eGe5qK3uFADnl0oOkXXI482bem6EOIslNFNN7UZVeLAdCYSyD9kk7K6ZigVaBhD8WH/4afpzfQIUxyg1CcpC2CAuvS4TZzRwihh0GqKO2m7zFi4sUUFZyZRDe393NIQVpo3chjeCOTALSi40IOgJqOhQoFDsg+y5iZ/SmkN4bXUqGNv47OltcgKMjFhaL3yDmWGSV8CmNcYc2DZu14mJA8AyWCRXstMzwiuuyRJ8K2KJUGEawoMzIMZTOJm1rnfYMq5Qh6NNjs9IPW9PhreqOi4FwHkPGdquocFTNh7ZYtOdlkBUmDFzpg7D0QjYvfZGZ5pI3HkWfiQafVpSZXmsqVsBUB0voVvsMruWAjAptddLS6K9YUIEUmf5T60CmtBnrVaRXcpOXMabIfFZS20Sfls7X1eAUj17EdC1NxOclLzX0UGIHcTWZ8M9L4D0mR/DxCFxG6LMKa3cihI5/WjzDLTxu0Z5m36xHkEpp9inNUbRxJJ4HhPGqj3HWylpmURCwN4yhQ24dV7zBGGHcYaK6bWUC5djiWGOCHtCb/UUO9+5cSWbSkP+K4nQhvNwbJ1V75rJ/5pOVddq6QJSqpn2K8e5yTDorgJrUO207CFTVUBNxFY74UMH0rpDJXOtNHdjBzfGZ++d6fgtfcA8+uB3pKwCpYO/q0PS3d6rVUAp7eKRGhZJ8sAxJBS3it33Ev7uw0orsWrjvXez6DXbS1LnxuXK6YbADTUmNpDHuEdXDlk7FAoyO6RT1t2yJuojkNXHexf1n8dNnscxFyIb8Ddm0xf7uXLW/WPdo2RU++dw5r1u/OXx5JvF5wyUFdGBk2JDiZ/JJV3UFLVIS99ec/dsrmOlfyRX5ogGxdTw7PGHLQyNt6a1lmRYahTcjpA6GZ0VKfjoeG1dKwxlNf578MumNjj95GxT1jXG+4r5vPJ3WM9NaDIfskVNbcriyDtT5OZ70+oEkQs9L3tN27TjxpJPhUday0QvNxEcWEcmnM6F2R+oePt9Owmsvyy0Or0YM/r8J93KHSsTpN45pYTQZ1jYmvl54j6tWSXvitb28Zk6h4VR5esA8uORK102F15APgmceIfj/9vue2y/tPZc8h/eGrhGmJIv00Ar5XuwuybD9m8Fq5bXDYSUjfgrm+ZmX6ToKWWTEtQw6c8uSGxyvRdai0pE3jtfQNwn88Zfm2crkVur/AchTkTZy/3XzYP5hcUcT4l+e7F7s +sidebar_class_name: "post api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.ParamsDetails.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.RequestSchema.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.RequestSchema.json new file mode 100644 index 000000000..c96bcede2 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.RequestSchema.json @@ -0,0 +1 @@ +{"title":"Body"} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.StatusCodes.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.StatusCodes.json new file mode 100644 index 000000000..ca69fa03f --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"200":{"description":"SSE stream (`text/event-stream`) of server-originated MCP messages."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or expired `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.api.mdx b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.api.mdx new file mode 100644 index 000000000..93e371874 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-stream.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-stream +title: "Open an MCP server-to-client SSE stream" +description: "Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`." +sidebar_label: "Open an MCP server-to-client SSE stream" +hide_title: true +hide_table_of_contents: true +api: eJzdVU2P00AM/SvWnEDatF3gAL0hxMdKIFZqOaHVZpq4rcVkZphxsluq/e/YSVp2t8AZcaiajD328/OzszdsN9nMv5qmiubqzNSYq0SRKXgzN58jerDggt8UjjqsIWPqMBUcisoReobF4i1kTmgbWIcEvEWo2pTU9OnNpfjnLLHAZqhxTV5CrHa916K/ZFcO4cNyeQmcrM8xJJ7AUszlpyoWi+F2cVGXsEVbY4KmzQxUS3xa78B6wFvKTH5zTFVJXJY8HVkoLz8vljDtzqdSXzkxZyZETFbLu6ilQDm9HtCLKdpkG2RMSsjeeHkRl4c4xI2UmQGNeUzY6HgASAI4IbfpXt0DgyBOJXliso5+YCmV1OL6vaUkrmLM7SrLq/Kox5g5AwdoLHmW3wNyqyDJfEu80woPUcx8bV3Guys9Ema9uJv53jybzfTvEfBfbXxSMt7yFDvJXQxn5VMI60PvQ6IN+Z5iBdEICLvBPDF3Z+bF7Pw09hdvW97KtR9Yj809dATQ1zHQWKSgzlCmVqppcKKXSq15hVrhmjZt0gBvDs/a/deXF/ANdxBT6Ej1IdTsQptgEanCGOqRWE47uCHeqjr63gg1I+Lnp4jfhbSiWvxGuB9C5qMCO+taBMrgA2s6beoRtBQ1sc6FG6yvt3Irl+BEn2OqF78j55sPNx5kdvA29t1/LH25LLdFmdugmt0g92LlrbyMRMrB0J1Bum1yqlHmOJ9OXaisUyzzl7NXsxPJflSzDGeHLsRG9TZEuk90z1xZFBpR4VxpOhlzUVyfz0a6li7I85XayK+DVsrETkdoJOcktXKbtU/SoaOLk3eRqt4fJ/B1tNUWi2cTBf9rsh5ahCEtfwgsB5NZ0frMul/UFqX+xvp7UYfddhikP261x6D3RqdNfP7P9ci7qOT0GyA6WTRKXi+n/Si5r6Y7F8fxe6G60rP9fmUzfknu7k6PZWGlXg7SFZuo74KK4+ywOFU1NWU1HBbVX4j+F9bqb5npRX/6iehXhBj6STkO7vu3S5nkn6SAmfA= +sidebar_class_name: "get api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Open a long-lived server-to-client SSE stream for the current MCP session as defined by the Streamable HTTP transport. The `Mcp-Session-Id` header must identify an existing session created via `POST /v1/mcp`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.ParamsDetails.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.ParamsDetails.json new file mode 100644 index 000000000..99817a9c1 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.ParamsDetails.json @@ -0,0 +1 @@ +{"parameters":[{"name":"Mcp-Session-Id","in":"header","description":"Session identifier returned by the server on `initialize` and required on subsequent requests to maintain MCP session continuity.","required":false}]} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.RequestSchema.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.RequestSchema.json new file mode 100644 index 000000000..c96bcede2 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.RequestSchema.json @@ -0,0 +1 @@ +{"title":"Body"} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.StatusCodes.json b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.StatusCodes.json new file mode 100644 index 000000000..8dd072b73 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.StatusCodes.json @@ -0,0 +1 @@ +{"responses":{"204":{"description":"Session terminated."},"401":{"description":"Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials."},"403":{"description":"Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list."},"404":{"description":"Unknown or already-terminated `Mcp-Session-Id`."}}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.api.mdx b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.api.mdx new file mode 100644 index 000000000..f913d7aa1 --- /dev/null +++ b/website/versioned_docs/version-2.1.x/api/HTTP/mcp-terminate-session.api.mdx @@ -0,0 +1,70 @@ +--- +id: mcp-terminate-session +title: "Terminate an MCP Streamable HTTP session" +description: "Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`." +sidebar_label: "Terminate an MCP Streamable HTTP session" +hide_title: true +hide_table_of_contents: true +api: eJzNVE1PGzEQ/Ssjn/MFzaHNDVEQSFAhJZxQxDprh7VwbNf2hqZR/nvfbDYJkKhnDqvd9YzH771547XI8iWJ0ZNYlEFMO0LpVEYTsvFOjMREx4VxMmvKlab7ywdKOiXEyCjtspkbrWi2aqLFfRm64224e6sKqrRUOvZoXM+S/l0jnyK/U0400zIa99JsTHKh39WlN2MtMkttlqg6HAzpl8907Wunip7oCB90lAzwVgEicD/nHczntgyygoyoiwizWwuHH2R/xIg0wzS3SMVn9uPPXCNg5Tq6A+mk4xLLSCqMM9lIa/7qgqRTDVcTkYpgOiFB9rSQxmU8H5QtPQ5ztckrJrurIkZzaZPeTHkpBe+QLkZrcT4Y8us08L0uqic2HTEcnB3nPjpZ58pH4FY9mnAj+8uzPmQtSDsVvGlBA0WiItZAt9A93lQwh5lmxHPzUkcucLn7hgZ08XBLr3pFIfolRIwEqitfRxoHU+rgVStUjit0PVdUogZrDaot4m/HiK99nBmFvBbujU955zZaSltrMokcPIPjGmfuQINUT1rr37R6rrArFWRNyu1RJ4R8dK/OvznykaSNOGHVPWh65HjUQSGYrvLsTKUt/NdYMVf4b2XFwtY1W2PW0bIDcw6jft/6UlpGNvo++DE4MuQdh0nppbY+LNhN20rvZW90LLpdrsiIpnxcWUf4qTlPBvOMnuB7yjHj5p55Z5MtD0gr1dHRrHTirqFf+xSLfxiR97fzdRFkWenueY/BH+bmYwQiMf1tYSz0Bt3apSxnQIBYAP+FdO+qHq4huZ2VcUYzFryBbiaT/ex8Rr0WPEwA8VWvsrwKzC/rP7kfLG4C5t84Yt265kksz5DY3s5sDV5br2cy6cdoNxteBpLYdBTCAkwjJPe3s7vZuPHKJA7sbpL/SPUV7r2TyjS+Pb7Dm5lHoDH7fvx+Xt1dTa4wkv8AsJFpLQ== +sidebar_class_name: "delete api-method" +info_path: docs/api/HTTP/runtime +custom_edit_url: null +proxy: http://localhost:8090 +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; +import Translate from "@docusaurus/Translate"; + + + + + + + + + + +Terminate the MCP session identified by the `Mcp-Session-Id` header. Subsequent requests bearing the same session id will receive `404 Not Found`. + + + Request + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.StatusCodes.json b/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.StatusCodes.json deleted file mode 100644 index bfc5cbb0c..000000000 --- a/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.StatusCodes.json +++ /dev/null @@ -1 +0,0 @@ -{"responses":{}} \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.api.mdx b/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.api.mdx deleted file mode 100644 index 538a9590c..000000000 --- a/website/versioned_docs/version-2.1.x/api/HTTP/operation-id.api.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -id: operation-id -title: "Establish an MCP SSE Connection" -description: "Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools." -sidebar_label: "Establish an MCP SSE Connection" -hide_title: true -hide_table_of_contents: true -api: eJzlU8Fu2zAM/RWCpxZwnLSnzbchCIYCKxrA2akLGlVmY2KypEm0t8Lwvw90tjbtPmHWxdYT36Men0cUc8xY3WNnI+4LbCjbxFE4eKzwxrOwEcpgoKY0UFrU5AU2A3nJcFHXm0uwwXuyWgF9Zn8EaQluQ0MO1sEL/RLYpiDBBgcXt+vtJUgA9kLJWIGfLC3UkS2BhOBy+c3rgvPnzlv6K0NNAdbxrG+Nh0y+gY5yNkfKMLCBw/au3sFyuFp2Ni5zpgMY30AiSzwQJMox+EwZpE2hP7YgLWeo6w1kSWS6EgsMkZLRK900WL1+PXCDBb4wYDVOBXYkbdBjRxIsMBppscIzfSwwz+ap0SP2yWGFrUislksXrHFtyFJ9WH1c4fsBfFEYGhrIhdip9SemUq194mOf6OTgYbFQxkOJ017lbJ9Ynmc9E/nhO+n7XjH2TwGrEYXFEVaYei/c0T/Su5Yg61waeD3i2JLPpPXedFr+KRrb0uK61Oa5IS/8xJTeIlOBev0T8XW5KleL3mcxj44UiyFLZ/wZ62YGObdgPNyut/N41i9Be9/siFaT5uV/zqw8R7VOm19GZ9irtXPYxj+hvMfhCov5Vy9Qg7kvULOnyDg+mkxfk5sm3f7RU5ojU+BgEs+T0gCdxf3zZofT9BtPaXHY -sidebar_class_name: "get api-method" -info_path: docs/api/HTTP/runtime -custom_edit_url: null -proxy: http://localhost:8090 ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; -import Translate from "@docusaurus/Translate"; - - - - - - - - - - -Initiates a Server-Sent Events (SSE) connection using the Model Context Protocol (MCP) to interact with Spice tools. - - - Once connected, clients can send messages via `POST /v1/mcp/sse` and receive responses through this SSE stream. - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/versioned_docs/version-2.1.x/api/HTTP/sidebar.ts b/website/versioned_docs/version-2.1.x/api/HTTP/sidebar.ts index 10c535a25..742fb51cc 100644 --- a/website/versioned_docs/version-2.1.x/api/HTTP/sidebar.ts +++ b/website/versioned_docs/version-2.1.x/api/HTTP/sidebar.ts @@ -138,16 +138,22 @@ const sidebar: SidebarsConfig = { items: [ { type: "doc", - id: "api/HTTP/operation-id", - label: "Establish an MCP SSE Connection", + id: "api/HTTP/mcp-stream", + label: "Open an MCP server-to-client SSE stream", className: "api-method get", }, { type: "doc", - id: "api/HTTP/mcp-event", - label: "Send message to MCP server", + id: "api/HTTP/mcp-message", + label: "Send a Model Context Protocol message", className: "api-method post", }, + { + type: "doc", + id: "api/HTTP/mcp-terminate-session", + label: "Terminate an MCP Streamable HTTP session", + className: "api-method delete", + }, ], }, {