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

# Model Context Protocol (MCP)

> Let AI agents interact with the Latitude.sh API using our MCP server

The Latitude.sh MCP server enables AI agents to access the Latitude.sh API through natural language. Manage your bare metal infrastructure directly from chat-based IDEs.

<Columns cols={2}>
  <Card title="MCP server repository" href="https://github.com/latitudesh/latitudesh-mcp" icon="github" horizontal />
</Columns>

## What you can do

* 🔎 List and inspect servers, projects, and SSH keys
* ⚙️ Create or delete bare-metal instances
* 📡 Manage networking and automation

## Prerequisites

Before installing the MCP server, you'll need an API key from your [dashboard](https://www.latitude.sh/dashboard/api-keys).

## Installation

### Claude Desktop

The easiest way to get started is using the DXT installer:

1. Download `mcp-server.dxt` from the [GitHub releases](https://github.com/latitudesh/latitudesh-mcp/releases)
2. Drag and drop the file onto Claude Desktop
3. The server will be automatically configured

Alternatively, manually configure in `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "latitudesh": {
      "command": "npx",
      "args": ["latitudesh", "start", "--bearer", "YOUR_LATITUDE_API_TOKEN"]
    }
  }
}
```

### Claude Code CLI

```bash theme={null}
claude mcp add latitudesh npx latitudesh start -- --bearer YOUR_LATITUDE_API_TOKEN
```

### Cursor

1. Open **Settings → Tools and Integrations → New MCP Server**
2. Paste the following configuration:

```json theme={null}
{
  "mcpServers": {
    "latitudesh": {
      "command": "npx",
      "args": ["latitudesh", "start", "--bearer", "YOUR_LATITUDE_API_TOKEN"]
    }
  }
}
```

### VS Code (Copilot)

1. Open Command Palette and run **"MCP: Open User Configuration"**
2. Add the server configuration:

```json theme={null}
{
  "servers": {
    "latitudesh": {
      "command": "npx",
      "args": ["latitudesh", "start", "--bearer", "YOUR_LATITUDE_API_TOKEN"]
    }
  }
}
```

3. Restart VS Code and enable Agent mode in Copilot Chat

<Note>
  Be explicit in your prompts (e.g., "List my servers from Latitude.sh") to
  avoid local file searches.
</Note>

### Windsurf

1. Go to **Settings → Cascade → Manage MCPs → View raw config**
2. Add the server configuration:

```json theme={null}
{
  "mcpServers": {
    "latitudesh": {
      "command": "npx",
      "args": ["latitudesh", "start", "--bearer", "YOUR_LATITUDE_API_TOKEN"]
    }
  }
}
```

### Standalone CLI

Run the MCP server directly from the command line:

```bash theme={null}
npx latitudesh start --bearer YOUR_LATITUDE_API_TOKEN
```

**Optional flags:**

* `--server-index <0|1>` — API endpoint selection
* `--latitude-api-key <key>` — URL templating
* `--log-level <level>` — Logging verbosity (debug|warning|info|error)

## Development

To run the MCP server locally for development:

```bash theme={null}
# Clone the repository
git clone https://github.com/latitudesh/latitudesh-mcp.git
cd latitudesh-mcp

# Install dependencies
npm install

# Build
npm run build

# Run
node ./bin/mcp-server.js start --bearer YOUR_LATITUDE_API_TOKEN
```

### Testing with MCP Inspector

Use the MCP Inspector for local testing and debugging:

```bash theme={null}
npx @modelcontextprotocol/inspector node ./bin/mcp-server.js start --bearer YOUR_LATITUDE_API_TOKEN
```

This opens an interactive UI at [http://localhost:6274](http://localhost:6274)

## Contributing

The Latitude.sh MCP server is open source and welcomes contributions. Visit the [GitHub repository](https://github.com/latitudesh/latitudesh-mcp) to open issues or submit pull requests.
