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

# MCP Client Setup

> Step-by-step setup for instance-mcp in Claude Desktop, Cursor, Windsurf, Claude Code CLI, and Self-Hosted Instance.

Before configuring your AI client, generate a workspace API key in **Dashboard -> Settings -> API Keys** (`inst_live_...`).

***

## 1. Claude Desktop

Add `instance` to your Claude Desktop configuration file:

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json theme={null}
{
  "mcpServers": {
    "instance": {
      "command": "npx",
      "args": ["-y", "instance-mcp"],
      "env": {
        "INSTANCE_API_KEY": "inst_live_your_secret_key_here",
        "INSTANCE_API_URL": "https://api.yourdomain.com"
      }
    }
  }
}
```

Restart Claude Desktop. You will see the Instance tools ready to use inside your chat.

***

## 2. Cursor and Windsurf

In Cursor settings under **Features -> MCP Servers**:

1. Click **+ Add New MCP Server**.
2. Set **Name** to `instance` and **Type** to `command`.
3. Set **Command** to `npx -y instance-mcp`.
4. Add environment variables `INSTANCE_API_KEY` and `INSTANCE_API_URL`.

***

## 3. Claude Code CLI

Add the server directly from your terminal:

```bash theme={null}
claude mcp add instance -- npx -y instance-mcp
```

Set `INSTANCE_API_KEY` and `INSTANCE_API_URL` in your shell environment.

***

## 4. Local Self-Hosted (Docker or Dev)

If you are running Instance locally on your own machine or private server, point `INSTANCE_API_URL` to `http://localhost:4000`:

```json theme={null}
{
  "mcpServers": {
    "instance": {
      "command": "npx",
      "args": ["-y", "instance-mcp"],
      "env": {
        "INSTANCE_API_KEY": "inst_live_your_secret_key_here",
        "INSTANCE_API_URL": "http://localhost:4000"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.