> For the complete documentation index, see [llms.txt](https://docs.cloud.olakrutrim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.olakrutrim.com/mcp/connect-claude-desktop.md).

# Connect Claude Code & Desktop

Connect Claude Code or Claude Desktop to Krutrim Cloud with your API key. Choose the configuration for your client below: Hosted MCP for Claude Code, or local stdio for Claude Desktop.

## Claude Code (Hosted MCP)

First, complete the shared endpoint and API-key prerequisites in [Hosted MCP](https://docs.cloud.olakrutrim.com/mcp/hosted-mcp.md). No local MCP package is required for this connection.

Set `KRUTRIM_API_KEY` privately in the environment that launches your client. Store only the raw API key, without a `Bearer` prefix. A shell export is not enough if a desktop app does not inherit that shell’s environment. Never put the real key in shared configuration, chat, logs, or source control.

{% stepper %}
{% step %}

### Configure Claude Code

Merge this server into your Claude Code MCP configuration. Set the private `KRUTRIM_API_KEY` launch variable first; the hosted endpoint is already included below.

```json
{
  "mcpServers": {
    "krutrim-cloud": {
      "type": "http",
      "url": "https://mcp.olakrutrim.com/mcp",
      "headers": {
        "Authorization": "Bearer ${KRUTRIM_API_KEY}"
      }
    }
  }
}
```

Claude Code uses `${KRUTRIM_API_KEY}`, not `${env:KRUTRIM_API_KEY}`. Restart Claude Code after changing the configuration or rotating the key, then verify the connection below.
{% endstep %}

{% step %}

### Verify readiness, then Cloud access

Ask your agent to call `krutrim_ping`. It reports server identity, version, readiness, and read-only mode without calling a Cloud API.

Then ask for a read-only Cloud request and review the region:

```
list_vpcs(region="In-Bangalore-1")
```

A successful Cloud response verifies access for that request. Server readiness or tool discovery alone does not prove Cloud permissions. Do not create or delete resources just to test the connection.
{% endstep %}
{% endstepper %}

## Claude Desktop (Local stdio)

Connect Krutrim Cloud MCP to Claude Desktop with a local stdio server. Claude Desktop starts the server using your privately configured Krutrim Cloud API key.

### Before you begin

* Complete the package installation and API-key setup in [Local MCP (stdio)](https://docs.cloud.olakrutrim.com/mcp/local-mcp-stdio.md) before using the local configuration below.
* Install `uv` so the `uvx` command is available.
* Use the raw API key as `KRUTRIM_API_KEY`, without a `Bearer` prefix or surrounding spaces. Keep it private and restart the client after changing the key.

> **Important:** Do not put credentials in a repository, shared config, prompt, or screenshot. Use only the placeholder values below until you add the configuration on your own device.

{% stepper %}
{% step %}

### Open the local Claude Desktop configuration

Claude Desktop's interface changes over time. For a local command-based MCP server, edit its standard local configuration file:

| Platform | Configuration file                                                |
| -------- | ----------------------------------------------------------------- |
| macOS    | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Windows  | `%APPDATA%\Claude\claude_desktop_config.json`                     |

If your Claude Desktop version offers an **Extensions** experience, that is intended for packaged desktop extensions. Krutrim Cloud MCP is configured here as a local `stdio` server.
{% endstep %}

{% step %}

### Add the Krutrim Cloud MCP server

Merge this entry with any existing `mcpServers` entries; do not overwrite other servers.

```json
{
  "mcpServers": {
    "krutrim-cloud": {
      "command": "uvx",
      "args": [
        "krutrim-mcp-server"
      ],
      "env": {
        "KRUTRIM_API_KEY": "YOUR_KRUTRIM_API_KEY"
      }
    }
  }
}
```

{% endstep %}

{% step %}

### Restart Claude Desktop

Close and reopen Claude Desktop after saving the file. This starts the local MCP server and loads its available tools.
{% endstep %}

{% step %}

### Verify with a read-only request

Then use a read-only prompt in Claude Desktop:

```
List my VPCs in In-Bangalore-1.
```

Review the proposed tool call and allow only the read-only request.
{% endstep %}
{% endstepper %}

## Next steps

Before changing Cloud resources, follow the safety guidance in the [MCP Overview](https://docs.cloud.olakrutrim.com/mcp/overview.md). Start with a read-only request and review the exact region and resource identifiers.

Need help? Open [Troubleshooting](https://docs.cloud.olakrutrim.com/mcp/troubleshooting.md) for startup, API-key, and tool-discovery checks.

Use the safe operating workflow before requesting changes to Cloud resources. For current Claude Desktop product guidance, see [Anthropic's MCP documentation](https://docs.anthropic.com/en/docs/mcp).
