Data as of

Kubernetes MCP Server for Cursor: Setup & Config

Cursor: Give MCP assistants direct Kubernetes and OpenShift API access.

What you can do with Kubernetes in Cursor

Choose it for direct Kubernetes API access with native distribution and configurable operational limits.

  • Investigate pod logs, events, and resource consumption with an assistant.
  • Start or restart Tekton pipeline and task executions.
  • Work across kubeconfig-defined clusters from one MCP connection.

Before you start: Kubernetes in Cursor

  • Access to a Kubernetes cluster
  • Usable kubeconfig or in-cluster credentials
  • Node.js and npm for this npx option
  • An MCP-compatible client

This is the documented Claude Desktop and Cursor launch, without the help-only flag from the input hint. Native binaries do not require Node.js or Python. Review read-only mode, toolsets, and resource restrictions before granting production access.

Kubernetes Cursor configuration

  1. Choose Cursor configuration scope

    For Kubernetes MCP Server, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.

  2. Add Kubernetes MCP Server to Cursor

    Use the kubernetes-mcp-server entry below in mcpServers. Keep Kubernetes MCP Server's documented stdio connection fields and your other Cursor entries.

  3. Check Kubernetes MCP Server in Cursor

    Kubernetes MCP Server: Enable in Cursor’s MCP settings; inspect tools.

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

JSON
{
  "mcpServers": {
    "kubernetes-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server@latest"
      ],
      "env": {}
    }
  }
}

Troubleshooting Kubernetes in Cursor

  • Cursor must find npx kubernetes-mcp-server@latest (Node.js/npm) for Kubernetes MCP Server. Enable the project/user entry in MCP settings and inspect its tools.
  • Kubernetes MCP Server uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires access credentials for a Kubernetes cluster.
  • Known limitation: Write-capable operations need deliberate restrictions for production use.
  • Known limitation: Exact tool identifiers are not stated in the supplied README excerpt.
  • General Cursor troubleshooting lives in the /clients/cursor guide.

Kubernetes MCP Server — details. Cursor guide

Frequently asked questions

Cursor's Kubernetes MCP Server entry belongs under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (user). Confirm the active scope in MCP settings.

Cursor's kubernetes-mcp-server example uses stdio.

Kubernetes MCP Server's Cursor configuration invokes npx kubernetes-mcp-server@latest (Node.js/npm).

Yes. Multi-cluster support uses configured clusters, and it can be disabled to retain only the current context.

Setting a port enables streamable HTTP at /mcp and SSE at /sse.