> 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/local-mcp-stdio.md).

# Local MCP (stdio)

Install and configure the package-based local stdio alternative.

Run the `krutrim-mcp-server` package on your own machine and let your AI client launch it over stdio. This is the package-based alternative to Hosted MCP.

Prefer a remote connection without installing Python? Start with [Hosted MCP](/mcp/hosted-mcp.md).

## Before you begin

* A Krutrim Cloud account.
* A Krutrim Cloud API key, stored privately.
* An MCP-compatible client.
* Your target region, such as `In-Bangalore-1` or `In-Hyderabad-1`.

## Install and configure

{% stepper %}
{% step %}

### Install the MCP server

You can run the server directly with `uvx`, or install it into a virtual environment. Python 3.10–3.13 is supported.

PyPI package: <https://pypi.org/project/krutrim-mcp-server/>

Latest version: **1.0.7**

Recommended for the client examples below: install uv so `uvx` is available, then check the package.

```bash
uvx krutrim-mcp-server --help
```

Optional: install into a virtual environment instead.

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install krutrim-mcp-server
```

On Windows, activate the environment with:

```powershell
.venv\Scripts\Activate.ps1
```

The connection guides use `uvx`. If you choose a virtual-environment installation, configure the client to launch that environment’s `krutrim-mcp-server` executable instead.
{% endstep %}

{% step %}

### Create and protect an API key

In Krutrim Cloud Console, go to **Administration → API keys → Create API Key**. 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.

> Keep the API key private. Never put it in prompts, screenshots, logs, shared configuration, or source control.

#### Optional: create a key with curl or Postman

Alternatively, create an API key with curl or Postman. `POST https://cloud.olakrutrim.com/iam/v1/apikey` requires an authorized Cloud Console access token. That token is for key creation only; MCP uses the returned API key, not the Console token.

{% code overflow="wrap" %}

```bash
curl --request POST 'https://cloud.olakrutrim.com/iam/v1/apikey' \
  --header "Authorization: Bearer ${KRUTRIM_CONSOLE_ACCESS_TOKEN}" \
  --header 'Content-Type: application/json' \
  --header 'x-region: In-Hyderabad-1' \
  --data '{"apiKeyName":"mcp-key"}'
```

{% endcode %}

Set `KRUTRIM_CONSOLE_ACCESS_TOKEN` privately before running the request. In Postman, import the curl request, choose Authorization → Bearer Token, and enter your authorized Console access token. Browser cookies are not needed. Store the returned `secretKey` securely and use it as `KRUTRIM_API_KEY`. Never share keys in prompts, screenshots, logs, or source control.
{% endstep %}

{% step %}

### Configure your client

Choose one of the connection guides below and use its Local MCP (stdio) section. Merge the example with your existing configuration; preserve other servers. Each client uses its own schema.

Save the configuration and restart the client after changing the configuration or API key.
{% endstep %}

{% step %}

### Verify Cloud access

Ask your connected client to make a read-only Cloud request:

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

Review the proposed `list_vpcs` invocation and confirm the region. A successful request verifies API-key access and permissions; local tool discovery alone does not.

For local package checks and connection failures, see [Troubleshooting](/mcp/troubleshooting.md).
{% endstep %}
{% endstepper %}

## Choose your client

These guides retain package-based stdio instructions. In guides that offer both transports, use the Local MCP (stdio) section.

| Connection guide                                 | Configuration                           |
| ------------------------------------------------ | --------------------------------------- |
| [Claude Desktop](/mcp/connect-claude-desktop.md) | JSON · local desktop configuration      |
| [Codex](/mcp/connect-codex.md)                   | TOML · local user configuration         |
| [Cursor](/mcp/connect-cursor.md)                 | JSON · global or project configuration  |
| [VS Code](/mcp/connect-vs-code.md)               | JSON · user profile with masked input   |
| [Hermes Agent](/mcp/connect-hermes.md)           | YAML · local agent configuration        |
| [OpenCode](/mcp/connect-opencode.md)             | JSON / JSONC · local user configuration |

## Use Cloud tools safely

List resources first, select exact identifiers and a supported region (`In-Bangalore-1` or `In-Hyderabad-1`), then review the proposed change.

Mutations require `confirm=true`; floating-IP allocation also requires `allow_public_ip=true`. Set `KRUTRIM_MCP_READ_ONLY=true` to block mutations.

{% hint style="warning" %}
Note: After a create timeout, check whether the resource exists before retrying.
{% endhint %}

Connection or tool errors? See [Troubleshooting](/mcp/troubleshooting.md).
