> ## Documentation Index
> Fetch the complete documentation index at: https://getalchemystai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Visual Studio Code

> Configure Visual Studio Code MCP with Alchemyst AI

This guide explains **two integration methods**:

1. HTTP / Server-Sent Events (recommended)
2. Direct configuration via `settings.json`

## Prerequisites

Before proceeding, ensure that:

* You have **Visual Studio Code v1.101+** installed.
* You have a valid **Alchemyst Platform API key**.
* Your VS Code supports **MCP integration** (either via the OpenAI MCP extension or natively if available).
* You are familiar with editing VS Code's `settings.json`

### 1. Integration via HTTP (Server-Sent Events)

1. Open Command Palette via: `Ctrl` (or `Cmd`) + `Shift` + `P`.
2. Type MCP and select `MCP: Add Server....`
3. Choose HTTP (HTTP or Server-Sent Events) as the transport type.
4. Enter the URL:
   `https://mcp.getalchemystai.com/mcp/sse`
5. Select Server ID: This is going to be your server name. e.g., `Alchemyst-server-mcp`.
6. Then, you will be asked to choose whether to save settings at User-level `settings.json` or Workspace level.
7. You'll be redirected to your respective `settings.json` file.
8. Then edit the headers inside the MCP server object (name you gave to your server) in `settings.json` with:

```json theme={null}
"headers": {
  "Authorization": "Bearer YOUR_ALCHEMYST_PLATFORM_API_KEY"
}
```

9. You will see a faint Start button popping right up on top of the MCP object in your present settings.json file.
10. Click on that and your MCP server will be ready to use!

**You're done! Your MCP server is now connected via HTTP (SSE).**

### 2. Configuration via `settings.json`

1. **Open Command Palette**

   * Press `Ctrl` (or `Cmd`) + `Shift` + `P`.
   * Type and select **"Preferences: Open User Settings (JSON)"**.

2. Now, you are in **User Settings JSON**.

3. Add the following **MCP Configuration block**.

```json theme={null}
"mcp": {
  "servers": {
    "alchemyst-context-mcp": {
      "url": "https://mcp.getalchemystai.com/mcp/sse",
      "headers": {
        "Authorization": "Bearer YOUR_ALCHEMYST_PLATFORM_API_KEY"
      }
    }
  }
}
```

4. Save your `settings.json` file.
5. You will see a faint Start button popping right up on top of the MCP object in your present settings.json file.
6. Click on that and your MCP server will be ready to use!

**You're done! Your MCP server is now connected via directly configuring the `settings.json` file.**

## Troubleshooting

| **Issue**                  | **Possible Cause**              | **Fix**                                                                                    |
| :------------------------- | :------------------------------ | :----------------------------------------------------------------------------------------- |
| MCP server not starting    | Invalid or expired API key      | Regenerate your API key from **[Alchemyst Platform](https://platform.getalchemystai.com)** |
| "Start" button not visible | Outdated VS Code version        | Upgrade to v1.101+                                                                         |
| No response from server    | Network/firewall blocking SSE   | Allow outbound access to `https://mcp.getalchemystai.com`                                  |
| Local setup not working    | Missing Node/Python environment | Verify local dependencies                                                                  |
