Skip to content

Client Configuration

GET/v1/mcp/:model_name/config

Generates a ready-to-paste configuration snippet for connecting an MCP-compatible IDE or CLI to a specific MCP server through SandBase. Pass the client query parameter to get the correct JSON format for your tool.

Authentication

HeaderRequiredDescription
AuthorizationYesBearer <API_KEY> — Your SandBase API key. The key is embedded into the generated config so the IDE can authenticate automatically.

Path Parameters

ParameterTypeDescription
model_namestringRequired. The MCP server identifier (e.g. exa/exa, browserbase/browserbase). Use the List Servers endpoint to discover available names.

Query Parameters

ParameterTypeDefaultDescription
clientstringclaudeTarget IDE/CLI. One of: claude, claude-code, cursor, vscode, codex, opencode.

Supported Clients

ValueIDE / CLIConfig File
claudeClaude Desktopclaude_desktop_config.json
claude-codeClaude Code (CLI).mcp.json
cursorCursor.cursor/mcp.json
vscodeVS Code / Copilot.vscode/mcp.json
codexOpenAI Codex CLICLI config
opencodeOpenCodeopencode.json

Response

Returns a JSON object formatted for the requested client. The response contains the server URL and authentication headers pre-filled with your API key.

TIP

The response is not wrapped in the standard { "code": 0, "data": ... } envelope — it returns the raw configuration JSON so you can paste it directly into your config file.

Example Request

bash
# Get config for Claude Desktop
curl "https://api.sandbase.ai/v1/mcp/exa/exa/config?client=claude" \
  -H "Authorization: Bearer sb-your-api-key"

# Get config for VS Code
curl "https://api.sandbase.ai/v1/mcp/exa/exa/config?client=vscode" \
  -H "Authorization: Bearer sb-your-api-key"

# Get config for Cursor
curl "https://api.sandbase.ai/v1/mcp/browserbase/browserbase/config?client=cursor" \
  -H "Authorization: Bearer sb-your-api-key"

Example Responses

Claude Desktop / Claude Code / Cursor

All three use the same mcpServers format:

json
{
  "mcpServers": {
    "Exa Search": {
      "url": "https://mcp.sandbase.ai/exa/exa/sse",
      "headers": {
        "Authorization": "Bearer sb-your-api-key"
      }
    }
  }
}

VS Code

VS Code uses a servers key with an explicit type field:

json
{
  "servers": {
    "Exa Search": {
      "type": "sse",
      "url": "https://mcp.sandbase.ai/exa/exa/sse",
      "headers": {
        "Authorization": "Bearer sb-your-api-key"
      }
    }
  }
}

Codex CLI

Codex uses an mcp_servers array:

json
{
  "mcp_servers": [
    {
      "name": "Exa Search",
      "url": "https://mcp.sandbase.ai/exa/exa/sse",
      "headers": {
        "Authorization": "Bearer sb-your-api-key"
      }
    }
  ]
}

OpenCode

json
{
  "mcpServers": {
    "Exa Search": {
      "url": "https://mcp.sandbase.ai/exa/exa/sse",
      "headers": {
        "Authorization": "Bearer sb-your-api-key"
      }
    }
  }
}

Using the Generated Config

Claude Desktop

  1. Open Settings → Developer → Edit Config
  2. Paste the response into claude_desktop_config.json
  3. Restart Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json   # macOS
%APPDATA%\Claude\claude_desktop_config.json                       # Windows

Claude Code (CLI)

Add the config to .mcp.json in your project root or home directory:

bash
# Project-level
echo '<paste response>' > .mcp.json

# Or global
echo '<paste response>' > ~/.mcp.json

Cursor

  1. Create .cursor/mcp.json in your project root
  2. Paste the response
  3. Restart Cursor or reload the window
your-project/.cursor/mcp.json

VS Code

  1. Create .vscode/mcp.json in your workspace
  2. Paste the response
  3. Reload the window (Ctrl+Shift+P → "Reload Window")
your-project/.vscode/mcp.json

Codex CLI

Pass the config via the --mcp-config flag or add it to your Codex configuration file:

bash
codex --mcp-config mcp.json

OpenCode

Add the config to opencode.json in your project root:

your-project/opencode.json

Combining Multiple Servers

You can merge configs from multiple calls. Each response uses the server's display name as the key, so merging is straightforward:

json
{
  "mcpServers": {
    "Exa Search": {
      "url": "https://mcp.sandbase.ai/exa/exa/sse",
      "headers": { "Authorization": "Bearer sb-your-api-key" }
    },
    "Browserbase": {
      "url": "https://mcp.sandbase.ai/browserbase/browserbase/sse",
      "headers": { "Authorization": "Bearer sb-your-api-key" }
    }
  }
}

Error Responses

StatusError CodeDescription
400invalid_requestMissing model_name path parameter
401unauthorizedMissing or invalid API key
404not_foundMCP server not found or not of type mcp

Error Example

json
{
  "error": "not_found",
  "message": "MCP server not found: invalid/server-name"
}