> 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-vs-code.md).

# Connect VS Code

Connect Krutrim Cloud MCP to Visual Studio Code with protected token prompts.

Connect Krutrim Cloud MCP to Visual Studio Code with a local stdio server. Use a masked API-key prompt so the raw key is not stored in your configuration file.

## Before you begin

* Visual Studio Code with chat and MCP support, with `uvx` available on your local path.
* First, complete the shared installation and API-key setup in the [MCP Overview](/mcp/overview.md). These guides use local stdio, not a hosted OAuth connection.
* Enter the raw API key without a `Bearer` prefix or surrounding spaces. Do not paste a Console access token into the prompt.

## Connect to Krutrim Cloud

{% stepper %}
{% step %}

### Open the user MCP configuration

In the Command Palette, run `MCP: Open User Configuration`. This opens the `mcp.json` file for your VS Code user profile. Keep credentials out of workspace configuration and source control.
{% endstep %}

{% step %}

### Add the Krutrim Cloud server

Add this entry, preserving any servers and inputs already in the file:

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "krutrim-api-key",
      "description": "Krutrim Cloud API key",
      "password": true
    }
  ],
  "servers": {
    "krutrimCloud": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "krutrim-mcp-server"
      ],
      "env": {
        "KRUTRIM_API_KEY": "${input:krutrim-api-key}"
      }
    }
  }
}
```

VS Code prompts for the API key when the server starts. The masked prompt keeps the raw key out of `mcp.json`. Never commit the key or paste it into a shared workspace file. After changing the key, update the saved input and restart the MCP server.
{% endstep %}

{% step %}

### Verify with a read-only request

Save `mcp.json`, then run `MCP: List Servers` from the Command Palette. Start `krutrimCloud` and review the server configuration before trusting it. In Agent mode, start with a read-only request such as: `List my VPCs in In-Bangalore-1.`
{% endstep %}
{% endstepper %}

## Next steps

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

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloud.olakrutrim.com/mcp/connect-vs-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
