<!-- Generated from the canonical HTML page. Do not edit separately. -->
# Kubernetes MCP Server for Claude and Cursor | Ankra

Canonical: https://ankra.ai/kubernetes-mcp-server

A hosted Kubernetes MCP server. Connect Claude Code, Claude or Cursor in one command and get 450+ tools across every cluster, read-only unless you grant mcp:write.

Hosted Kubernetes MCP server

# Kubernetes MCP for Claude and Cursor.  No kubeconfig.   No server.   One command.

One hosted endpoint for Claude Code, Claude, Cursor and other MCP clients, covering every cluster you connect to Ankra. Read-only unless you grant `mcp:write`.

- OAuth sign-in in the browser
- Read-only or read-write scopes
- Every cluster in one session
- Every call in your audit log

[Start free](https://platform.ankra.app/auth/signup)

**Free for 30 vCPU, for life.** Try it without a card. Unlimited team members.

Set up in Claude Code

1. Run one command

  `$ claude mcp add --transport http ankra https://platform.ankra.app/api/v1/mcp`
2. Sign in

  Run `/mcp` in Claude Code and choose Authenticate. Approve the access in your browser. No token to copy.
3. Connect a cluster

  The MCP server works on the clusters connected to Ankra. Import one you already run, such as EKS, AKS, GKE or k3s, with one `helm` command in a couple of minutes. Or have Ankra build one on your cloud account.

Then ask: `list my ankra clusters`.  [Cursor or the Claude app?](https://ankra.ai/kubernetes-mcp-server#connect)

## A kubeconfig MCP server, or a hosted one.

Open source servers that wrap your kubeconfig are a good fit for one cluster on one laptop. This is where the two differ.

| Compared | MCP server you run | Ankra MCP server |
| --- | --- | --- |
| Setup | Install and run it on your laptop or cluster | One command. Hosted by Ankra, or self-hosted on Enterprise |
| Credentials | Your kubeconfig | OAuth or a token scoped to mcp:read or mcp:write |
| Reach | Clusters in your kubeconfig | Every cluster in your Ankra organisation |
| Audit trail | Whatever you build | Every call in the organisation audit log |

Seven Kubernetes MCP servers side by side, with their read-only settings and how each one signs in, are in  [Kubernetes MCP servers compared](https://ankra.ai/blog/kubernetes-mcp-servers-compared-2026) .

In a session

## Ask about a cluster.  Approve the fix.

The client calls Ankra's tools, reads pods, logs, events and stack history, and asks before it changes anything.

claude code · ankra mcp

```
$ claude mcp add --transport http ankra https://platform.ankra.app/api/v1/mcp$ claude> /mcp  Authenticate opens the browser. Sign in, pick the organisation, approve.  ✓ ankra connected > why is checkout-api crashlooping on prod-eu?  ● list_clusters                    3 clusters, prod-eu found  ● get_pods           ns checkout   checkout-api  CrashLoopBackOff  14 restarts  ● get_pod_logs       previous      OOMKilled, exit code 137  ● get_events         checkout-api  Back-off restarting failed container  ● get_stack_history  checkout      2h ago  memory limit 512Mi -> 256Mi  checkout-api is being OOMKilled. A stack change two hours ago cut its
  memory limit from 512Mi to 256Mi. Rolling the add-on back restores 512Mi. > roll it back  ? Allow ankra · rollback_addon for checkout-api on prod-eu  › Yes  ● rollback_addon     checkout-api  operation started  ● wait_for_execution               succeeded in 41s  ● get_pods           ns checkout   checkout-api  Running  0 restarts  Done. checkout-api is Running with 512Mi again.  ↗ Open checkout-api in the Ankra portal
```

Sample session with example data. Green dots are read tools, amber needs mcp:write and your approval.

Connect

## Same endpoint,  any client.

- **Claude, Claude Desktop and Claude Code** sign in with OAuth. No token to copy.
- **Cursor and other clients** send a Bearer token from the portal or `ankra tokens create`.
- **Check it works** by asking for your clusters. The client calls `list_clusters`.
- **Streamable HTTP**, listed in the official MCP Registry as `ai.ankra/platform`.

# Register once, then sign in with OAuth

```
$ claude mcp add --transport http ankra \
    https://platform.ankra.app/api/v1/mcp
$ claude
> /mcp                  # ankra, Authenticate
> list my ankra clusters
```

Add `--scope user` to use it in every project. The OAuth grant lasts seven days, then run `/mcp` again.

# A read-only token, then your user-level MCP config

```
$ ankra tokens create cursor --scopes mcp:read

# ~/.cursor/mcp.json
{
  "mcpServers": {
    "ankra": {
      "url": "https://platform.ankra.app/api/v1/mcp",
      "headers": { "Authorization": "Bearer <ankra-token>" }
    }
  }
}
```

Use `--scopes mcp:read,mcp:write` only when the client should change resources. Keep the token out of files you commit.

# Claude web and desktop, as a custom connector

```
Settings › Connectors › Add › Add custom connector

  Name   Ankra
  URL    https://platform.ankra.app/api/v1/mcp

Connect › sign in to Ankra › pick the organisation › Approve
```

Custom connectors need a paid Claude plan. Leave the OAuth client fields empty.

Tools

## 450+ tools.  Not just kubectl.

The same tool registry runs Ankra's own AI. Cluster tools take a `cluster_id` from `list_clusters`, so one session covers the whole fleet.

### Workloads

- get\_pods
- get\_pod\_logs
- get\_events
- describe\_resource
- restart\_deployment
- scale\_deployment

### Clusters and nodes

- list\_clusters
- get\_nodes
- cordon\_node
- upgrade\_cluster
- create\_hetzner\_cluster

### Stacks, Helm and GitOps

- get\_stack\_details
- get\_stack\_history
- get\_gitops\_status
- update\_addon\_configuration
- rollback\_addon

### Metrics and logs

- query\_prometheus
- query\_prometheus\_range
- query\_logs
- get\_cluster\_attention\_summary

### Applications and pipelines

- list\_applications
- watch\_pipeline\_run
- deploy\_application
- promote\_application
- rerun\_application\_workflow

### Security, cost and backups

- list\_security\_findings
- get\_compliance\_reports
- get\_cluster\_cost
- list\_backup\_vaults
- create\_stack\_restore\_point

**mcp:read  **mcp:write

 [All 450+ tools with their scopes](https://docs.ankra.ai/platform/mcp-tools)

Access

## You pick the scope.  The token enforces it.

`mcp:read`

Every read-only tool. Pods, logs, events, metrics, stacks, findings and cost. Changes nothing.

`mcp:write`

Adds apply, scale, restart, rollback, upgrades and pull requests. Your client's approval prompt is the gate, so give it to clients you trust.

One organisation

Tokens and OAuth grants are bound to the organisation chosen when they were created.

Filtered tool list

tools/list returns only the tools the token's scope allows.

Checked before dispatch

Ankra verifies the cluster belongs to the token's organisation before a cluster tool runs.

No secrets in arguments

Mutating calls whose parameters contain literal secrets are refused.

Rate limited

120 read calls and 20 write calls per minute, per token.

Audited

Every resolved call, refused ones included, lands in the organisation audit log.

## FAQ

### What is a Kubernetes MCP server?

A Model Context Protocol server that exposes Kubernetes operations as tools an AI client can call. Instead of pasting kubectl output into a chat, the assistant lists pods, reads logs and events, and with permission makes the change itself.

### How do I connect Claude Code to Kubernetes?

Run claude mcp add --transport http ankra https://platform.ankra.app/api/v1/mcp, start Claude Code, run /mcp and authenticate in the browser. Then ask it to list your Ankra clusters.

### Can it change my clusters?

Only with mcp:write. With mcp:read the client sees read-only tools and cannot change anything. Ankra adds no second confirmation over MCP, so your client's approval prompt is the gate. Only grant mcp:write to clients you trust.

### Which clients work with it?

Any client that supports remote MCP servers over streamable HTTP. Claude web, desktop and Claude Code sign in with OAuth. Cursor and other clients send a Bearer token from the Ankra portal or ankra tokens create.

### What does it cost?

The MCP server is part of the Ankra platform and works on the free tier. Ankra bills on worker vCPUs only, every plan includes 30 worker vCPUs free, and a small trial needs no card; adding one unlocks full access and €59 of welcome credit.

## Connect a cluster.  Ask it anything.

Free tier with 30 worker vCPUs included, and a small trial without a card.

[Start free](https://platform.ankra.app/auth/signup)  [Read the MCP docs](https://docs.ankra.ai/platform/mcp-server)

Claude and Claude Code are products of Anthropic. Cursor is a product of Anysphere. Ankra is not affiliated with or endorsed by either. Product details were checked against the Ankra documentation in October 2026.
