Skip to main content
Welcome back. This guide walks you through validating that your local MCP (Managed Control Plane) service is connected to a Kubernetes cluster. We start the MCP wrapped by Supergateway and then run a few checks: a health probe, a JSON-RPC initialization handshake, and a tool invocation (kubectl_get) to list namespaces. The MCP Streamable HTTP endpoint will be available at 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:
Trimmed example startup output:
Keep this process running in its terminal. If you stop it, subsequent curl checks will fail.
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:
Expected output:
A successful response confirms the Supergateway process is alive and responding on the configured health endpoint.

3) Initialize (JSON-RPC handshake)

Next, perform a JSON-RPC initialize 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):
Example SSE-style response (one event: message entry):
Key fields to inspect:
  • protocolVersion — MCP protocol version.
  • capabilities — features the server exposes. Typical groups:
    • prompts — LLM prompt/response integration
    • resources — managed resource types
    • tools — tooling endpoints (e.g., kubectl-like commands)
  • serverInfo — server name and version.
Note: Even if 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

With tools 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:
Example SSE-style response containing the tool output (note \n newline escapes inside the text field):
The 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 initialize handshake to discover MCP protocol version and capabilities.
  • You invoked a tools/call for kubectl_get and 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 a kubectl_get call). That integration and architecture will be covered in a subsequent lesson. Links and references

Watch Video

Practice Lab