The key is missing, mistyped, revoked or expired, or the person who created it lost access to the project. Check the header name x-ansehn-api-key, or create a new key.
Connect Claude Code, Cursor or VS Code
Coding agents connect to the Ansehn MCP server with a project API key that you add to the agent's configuration. Create the key first, then add the server address https://api.ansehn.com/v1/mcp and the key as the x-ansehn-api-key header.
For Claude (claude.ai, Claude Desktop and Cowork) and ChatGPT, you don't need a key: see Connect Claude or ChatGPT to Ansehn.
Before you start
You need the Owner, Admin or Agency role on the project to create an API key.
Create the key in Project Settings > API Keys with the Analytics Read scope. Add Content Actions Write only if the agent should update content action status. See API keys and scopes.
Copy the key when it is shown. We can't show it again.
Claude Code
Add the server once from your terminal. Replace YOUR_API_KEY with your key.
claude mcp add --transport http ansehn https://api.ansehn.com/v1/mcp --header "x-ansehn-api-key: YOUR_API_KEY"Start Claude Code and run /mcp. Ansehn shows as connected with its tools. To share the server with your team, add it to the project's .mcp.json instead and keep the key out of source control.
Cursor
Add the server to ~/.cursor/mcp.json for all projects, or to .cursor/mcp.json in one project.
{
"mcpServers": {
"ansehn": {
"url": "https://api.ansehn.com/v1/mcp",
"headers": { "x-ansehn-api-key": "YOUR_API_KEY" }
}
}
}Open Cursor's MCP settings and check that Ansehn is enabled and lists its tools.
VS Code
Add the server to .vscode/mcp.json in your workspace. Agent mode in GitHub Copilot can then use the Ansehn tools.
{
"servers": {
"ansehn": {
"type": "http",
"url": "https://api.ansehn.com/v1/mcp",
"headers": { "x-ansehn-api-key": "YOUR_API_KEY" }
}
}
}Other MCP clients
Any client that supports remote MCP servers over Streamable HTTP with custom headers works. Use the address https://api.ansehn.com/v1/mcp and send the key in the x-ansehn-api-key header. Clients that only support local servers can connect through the mcp-remote bridge.
Treat the key like a password: it can read your project data. Keep it in your client configuration or a secret store, never in a shared document or chat. If a key was exposed, revoke it in Project Settings > API Keys. Revoking takes effect immediately.
Troubleshooting
The agent says it can't connect or gets an authorization error
The agent connects but some tools are missing
The agent only sees the tools its key's scopes allow. Updating content action status needs the Content Actions Write scope.
Requests fail with a rate limit error
Each key can make 60 requests per minute, and your organization has a daily limit set by your plan. Wait for the time the error names, or spread the work over time.