Skip to content

Editor and IDE Connection Guide (Cursor & VS Code)

This guide describes how to connect modern editor environments—specifically Cursor and Visual Studio Code—to SnatchArr's Model Context Protocol (MCP) server.


Protocol and Transport

SnatchArr exposes a native Model Context Protocol server over two transports:

  • Streamable HTTP: http://localhost:8080/api/v1/mcp (sessionless JSON-RPC 2.0).
  • Subprocess stdio: snatcharr mcp stdio (or docker exec -i -e SNATCHARR_URL -e SNATCHARR_API_KEY <container> /snatcharr-api mcp stdio for container deployments), a thin proxy that delegates to /api/v1/mcp via SNATCHARR_URL and SNATCHARR_API_KEY.

Authentication and Prerequisites

Connecting to SnatchArr requires:

  1. Enabling the MCP server on the settings page (/settings) via the Enable MCP server (/api/v1/mcp) toggle.
  2. Generating a scoped bearer API key on the account page (/account) under the API keys section.

See Module Toggle Switch and Authentication and Permission Scopes for full scope descriptions, challenge behavior, and write-tool activation instructions.

Export the connection environment variables before launching your editor:

export SNATCHARR_URL="http://localhost:8080"
export SNATCHARR_API_KEY="your-snatcharr-api-key"

Cursor Configuration

Cursor reads MCP configurations from ~/.cursor/mcp.json (global) or .cursor/mcp.json (workspace root).

Option A: Subprocess stdio Transport (.cursor/mcp.json)

To compile and install the host snatcharr CLI binary, see Install the proxy.

Configure the stdio server using the local proxy or container:

{
  "mcpServers": {
    "snatcharr": {
      "command": "snatcharr",
      "args": ["mcp", "stdio"],
      "env": {
        "SNATCHARR_URL": "http://localhost:8080",
        "SNATCHARR_API_KEY": "${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

For containerized deployments:

{
  "mcpServers": {
    "snatcharr": {
      "command": "docker",
      "args": ["exec", "-i", "-e", "SNATCHARR_URL", "-e", "SNATCHARR_API_KEY", "snatcharr-api", "/snatcharr-api", "mcp", "stdio"],
      "env": {
        "SNATCHARR_URL": "http://localhost:8080",
        "SNATCHARR_API_KEY": "${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

Option B: Streamable HTTP Transport (.cursor/mcp.json)

Alternatively, configure the HTTP endpoint directly:

{
  "mcpServers": {
    "snatcharr": {
      "url": "http://localhost:8080/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

[!IMPORTANT] The ${env:SNATCHARR_API_KEY} syntax dynamically pulls the token from the host environment. Never commit plaintext tokens to version control.

Cursor Skills Installation

Copy the official Agent Skills bundle from skills/snatcharr/ in the repository root (ADR-0021 section 8):

  • User global path: ~/.cursor/skills/snatcharr/SKILL.md or ~/.agents/skills/snatcharr/SKILL.md (verified in https://cursor.com/docs/context/skills)
  • Workspace path: .cursor/skills/snatcharr/SKILL.md or .agents/skills/snatcharr/SKILL.md (verified in https://cursor.com/docs/context/skills)
mkdir -p .cursor/skills/snatcharr
cp -r skills/snatcharr/* .cursor/skills/snatcharr/

Cursor Verification

  1. In Cursor, open Settings, select Features, then navigate to MCP.
  2. Locate the snatcharr server in the list.
  3. Verify that the indicator turns green and that the tool list displays standard read tools:
  4. snatcharr_get_system_status
  5. snatcharr_list_instances
  6. snatcharr_list_runs
  7. snatcharr_get_hourly_caps

Visual Studio Code Configuration

Visual Studio Code supports MCP servers via workspace configuration files located at .vscode/mcp.json or through profile-level settings.

Option A: Subprocess stdio Transport (.vscode/mcp.json)

To compile and install the host snatcharr CLI binary, see Install the proxy.

Configure the stdio server using the local proxy:

{
  "mcpServers": {
    "snatcharr": {
      "command": "snatcharr",
      "args": ["mcp", "stdio"],
      "env": {
        "SNATCHARR_URL": "http://localhost:8080",
        "SNATCHARR_API_KEY": "${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

For containerized deployments:

{
  "mcpServers": {
    "snatcharr": {
      "command": "docker",
      "args": ["exec", "-i", "-e", "SNATCHARR_URL", "-e", "SNATCHARR_API_KEY", "snatcharr-api", "/snatcharr-api", "mcp", "stdio"],
      "env": {
        "SNATCHARR_URL": "http://localhost:8080",
        "SNATCHARR_API_KEY": "${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

Option B: Streamable HTTP Transport (.vscode/mcp.json)

Alternatively, configure the HTTP endpoint directly:

{
  "mcpServers": {
    "snatcharr": {
      "type": "http",
      "url": "http://localhost:8080/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SNATCHARR_API_KEY}"
      }
    }
  }
}

[!IMPORTANT] Use the ${env:SNATCHARR_API_KEY} reference to keep credentials out of repository files. Ensure VS Code is launched from a shell where SNATCHARR_API_KEY is exported.

Visual Studio Code Skills Installation

Copy the official Agent Skills bundle from skills/snatcharr/:

  • User global path: ~/.copilot/skills/snatcharr/SKILL.md or ~/.agents/skills/snatcharr/SKILL.md (verified in https://code.visualstudio.com/docs/agent-customization/agent-skills)
  • Workspace path: .github/skills/snatcharr/SKILL.md or .agents/skills/snatcharr/SKILL.md (verified in https://code.visualstudio.com/docs/agent-customization/agent-skills)
mkdir -p .github/skills/snatcharr
cp -r skills/snatcharr/* .github/skills/snatcharr/

Visual Studio Code Verification

  1. Open the VS Code Command Palette (Ctrl+Shift+P on Linux/Windows, Cmd+Shift+P on macOS).
  2. Run MCP: List Servers or inspect the MCP Output Channel in the Output panel.
  3. Confirm snatcharr is running and reports discovered tools including snatcharr_get_system_status and snatcharr_list_instances.

Official Documentation References