Connecting
How to configure Claude Desktop, Cursor, Windsurf, and curl to talk to the Spanly MCP server.
The Spanly MCP server speaks HTTP MCP at https://mcp.spanly.com.
Authenticate with your project API key as a bearer token.
Claude Desktop
{
"mcpServers": {
"spanly": {
"url": "https://mcp.spanly.com",
"transport": "http",
"headers": {
"Authorization": "Bearer ${SPANLY_API_KEY}"
}
}
}
}Claude Desktop expands ${SPANLY_API_KEY} from your environment.
Cursor
In cursor.config.json (or via the in-app MCP settings):
{
"mcpServers": {
"spanly": {
"url": "https://mcp.spanly.com",
"transport": "http",
"headers": {
"Authorization": "Bearer spanly_us_xxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}Windsurf
Same shape as Cursor – Windsurf's MCP block accepts the same url /
transport / headers triple.
curl smoke test
Verify connectivity and credentials without an MCP client by calling
initialize directly:
curl -X POST https://mcp.spanly.com/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SPANLY_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": { "name": "curl-test", "version": "1.0.0" }
}
}'A successful response returns the server's serverInfo and capabilities.
Hit tools/list next to see the full tool surface – or read the
Tools page.
Getting an API key
Sign in at spanly.com, open your project, and go to Settings → API keys. The same key works for the SDK, CLI, and Spanly MCP – no separate "MCP key" to manage.
The region (us / eu) is encoded in the key prefix and auto-routed
by the server.
Troubleshooting
- 401 Unauthorized – the bearer token is missing or invalid. Verify
it starts with
spanly_us_orspanly_eu_and was copied without trailing whitespace. - 403 Forbidden – the project this key is bound to is suspended, or you're calling a write tool with a read-only key. Check the project status in the dashboard.
- 404 on
/mcp– you may be on an old client version that expects a different endpoint shape. Use the URL above exactly.
If a tool call returns an error with a specific message, that's the backend speaking – open the request in your dashboard to see the same error in human form.