http://localhost:8000/mcp after launching the Supergateway command below.
1) Start the Supergateway-backed MCP
Run the following command to start Supergateway which launches the MCP container and exposes the Streamable HTTP endpoint:Keep the Supergateway process running in its terminal while you run the curl checks below from another terminal.
2) Health check
Open a new terminal and verify the health endpoint:3) Initialize (JSON-RPC handshake)
Next, perform a JSON-RPCinitialize handshake to learn the MCP’s protocol version and capabilities. The MCP supports Server-Sent Events (SSE), so include Accept: application/json, text/event-stream to receive SSE-style responses.
Example request (single-line JSON payload for brevity):
event: message entry):
protocolVersion— MCP protocol version.capabilities— features the server exposes. Typical groups:prompts— LLM prompt/response integrationresources— managed resource typestools— tooling endpoints (e.g., kubectl-like commands)
serverInfo— server name and version.
prompts (LLM features) are not configured yet, tools may already be available for direct calls.
4) Invoke a tool — run kubectl_get to list namespaces
Withtools available, you can invoke tool methods exposed by the MCP. The example below calls the kubectl_get tool to list namespaces across the cluster and format output as name.
Request:
\n newline escapes inside the text field):
text string is plain command output; \n denotes newline characters. In this example you can see the namespaces returned by the Kubernetes API.
Quick reference — commands and expected responses
Summary
- You started the MCP via Supergateway and exposed a Streamable HTTP endpoint at
http://localhost:8000/mcp. - You confirmed the service health at
/healthz. - You completed a JSON-RPC
initializehandshake to discover MCP protocol version and capabilities. - You invoked a
tools/callforkubectl_getand retrieved Kubernetes namespaces from the cluster.
What’s next?
The next step is to integrate an LLM so you can issue natural-language requests that the system will translate into tool calls (for example, asking an LLM to “list all Kubernetes namespaces” which would trigger akubectl_get call). That integration and architecture will be covered in a subsequent lesson.
Links and references
- Kubernetes Basics
- Kubernetes API reference
- Supergateway & Supermachine: https://supermachine.ai