Connect MCP Clients

MCP clients can register a ServiceStack MCP server via a single CLI command or by configuring their respective MCP settings.

Claude Code

Add via the Claude Code CLI:

claude mcp add --transport http coffeeshop https://example.org/chat/mcp --header "Authorization: Bearer ak-xxxx"

Or configure directly in ~/.claude.json:

{ "mcpServers": { "coffeeshop": { "url": "https://example.org/chat/mcp", "headers": { "Authorization": "Bearer ak-xxxx" } } } }

Claude Desktop

Claude Desktop connects to remote MCP servers using mcp-remote configured in claude_desktop_config.json

  • Windows: ~/Library/Application Support/Claude/claude_desktop_config.json
  • macOS: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "coffeeshop": { "command": "npx", "args": [ "mcp-remote@latest", "https://macbook.raptor-elver.ts.net/chat/mcp", "--header", "Authorization: Bearer ${AUTH_TOKEN}" ], "env": { "AUTH_TOKEN": "ak-3dcd3567656f49fbb5a791a35e464567" } } } }

Codex

Add via the Codex CLI:

codex mcp add coffeeshop https://example.org/chat/mcp --header "Authorization: Bearer ak-xxxx"

Or configure in ~/.codex/config.toml:

[mcp_servers.coffeeshop]
url = "https://example.org/chat/mcp"
http_headers = { "Authorization" = "Bearer ak-xxxx" }

Open Code

Configure in opencode.json (or .opencode/mcp.json):

{ "$schema": "https://opencode.ai/config.json", "mcp": { "coffeeshop": { "type": "remote", "url": "https://example.org/chat/mcp", "headers": { "Authorization": "Bearer ak-xxxx" } } } }

Antigravity

Configure in ~/.gemini/antigravity/mcp_config.json or .gemini/mcp.json:

{ "mcpServers": { "coffeeshop": { "url": "https://example.org/chat/mcp", "headers": { "Authorization": "Bearer ak-xxxx" } } } }

Or configure via the Antigravity IDE UI under Settings > MCP Servers.

ZCode

Configure in ~/.zcode/cli/config.json:

{ "mcp": { "servers": { "coffeeshop": { "type": "http", "url": "http://localhost:5000/chat/mcp", "headers": { "Authorization": "Bearer ak-xxxx" } } } } }

Oh My Pi

Register from the prompt:

/mcp add coffeeshop --url https://example.org/chat/mcp --token ak-xxxx

Once registered, the client discovers the available tools and lists them alongside its other MCP servers:

Troubleshooting

Local Development

For local development, many MCP clients won't accept .NET's self-signed development HTTPS certificate.

Workarounds include:

  • Connecting to the plaintext HTTP endpoint instead:
claude mcp add --transport http coffeeshop http://localhost:5000/chat/mcp --header "Authorization: Bearer ak-xxx"
  • Using Tailscale Funnel to expose your local port with a trusted TLS certificate:
tailscale funnel 5000