How to Connect MCP Servers to Claude
This guide shows how to connect a Sonalabs MCP server (for example, the AI Visibility Server) to Claude Code, Claude Desktop, and claude.ai. All three connect the same way in principle: a remote HTTP MCP server plus a custom auth header, but each client exposes that differently today.
Prerequisite: Get Your Organization's MCP API Key
- In the platform, go to Workspace Settings → Access Keys (
/access-keys/list). - Find the key named "Ask Your Data API Key". It's auto-provisioned per organization when the org is created, and it's the same key every MCP server (AI Visibility, Revenue, Outbound, Sales Prioritization, etc.) authenticates with. It only shows up in the list for users who have the MCP Access permission.
- Copy its value. It gets sent as the
x-api-keyheader on every request below.
This key is organization-wide, not scoped to a single MCP server. Anyone who has it can query every MCP server your org has access to. Handle it like a password.
Server Details
| Endpoint | https://ask.sonalabs.com/mcp/\{server-type\} (e.g. https://ask.sonalabs.com/mcp/ai-visibility) |
| Transport | Streamable HTTP |
| Auth header | x-api-key: <your org's Ask Your Data API Key> |
See MCP Servers Overview for the full list of available \{server-type\} values.
Claude Code (CLI)
Fully supported, including the custom header, directly from the CLI:
claude mcp add --transport http ai-visibility https://ask.sonalabs.com/mcp/ai-visibility \
--header "x-api-key: YOUR_ORG_API_KEY"
By default this writes to the local scope (current project only, in ~/.claude.json). Add --scope project to write a .mcp.json you can commit and share with your team, or --scope user to make it available across all your projects.
Equivalent manual config (e.g. in .mcp.json):
{
"mcpServers": {
"ai-visibility": {
"type": "http",
"url": "https://ask.sonalabs.com/mcp/ai-visibility",
"headers": {
"x-api-key": "YOUR_ORG_API_KEY"
}
}
}
}
Verify with claude mcp list, then ask something like "list our AI Visibility brands" in a Claude Code session.
Claude Desktop
The Settings → Connectors UI in Claude Desktop only walks you through OAuth-based connectors, with no field to enter a static API key. Add this server by editing the config file directly instead.
- Close Claude Desktop.
- Open its config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the server entry:
{
"mcpServers": {
"ai-visibility": {
"type": "http",
"url": "https://ask.sonalabs.com/mcp/ai-visibility",
"headers": {
"x-api-key": "YOUR_ORG_API_KEY"
}
}
}
} - Restart Claude Desktop and confirm the server shows up as connected (hammer/plug icon in the chat composer).
claude.ai (Web)
claude.ai's custom connectors support request headers, but it's a beta feature with an allowlist of accepted header names. x-api-key is on that allowlist, so this server works.
- Go to Settings → Connectors → Add custom connector.
- Enter the URL:
https://ask.sonalabs.com/mcp/ai-visibility. - Open Request headers, add a header named
x-api-key, and paste in your org's key. Mark it required. - Save, then enable the connector in a chat to start querying it.
If you don't see a "Request headers" option, your workspace may not have this beta feature enabled yet. In that case, use Claude Code or Claude Desktop instead until it rolls out further.
Sanity-Check Prompts
- "List our AI Visibility brands."
- "What's our brand visibility on ChatGPT for the last 30 days?"
- "Which sites get cited most often when our brand comes up?"
Client-side MCP support (headers, connector UI) moves quickly. If a step above doesn't match what you see, check the current Claude Code / Claude Desktop / claude.ai docs before assuming the server is broken.