Connect a client
Copy-paste setup for Claude Code, Cursor, VS Code, the MCP Inspector, and any other MCP client via the mcp-remote bridge.
Every client below connects to the same endpoint over Streamable HTTP and
sends your key as the X-API-Key header. Pick yours, paste the config, and
swap in your key.
The snippets read the key from an environment variable (NEUROAPI_KEY) or a
secret prompt rather than hard-coding it. Keep it that way — a key committed
to a repo is a leaked key.
Add the server with one command:
claude mcp add --transport http neuroapi https://api.neurobro.ai/api/v1/mcp \
--header "X-API-Key: $NEUROAPI_KEY"Or commit it to a project by adding .mcp.json at the repo root. Claude Code
expands ${VAR} from your environment:
{
"mcpServers": {
"neuroapi": {
"type": "http",
"url": "https://api.neurobro.ai/api/v1/mcp",
"headers": { "X-API-Key": "${NEUROAPI_KEY}" }
}
}
}Then ask Claude a market question and it will call ask_neuroapi.
Add NeuroAPI to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per
project). Cursor resolves ${env:VAR} in the URL and headers:
{
"mcpServers": {
"neuroapi": {
"url": "https://api.neurobro.ai/api/v1/mcp",
"headers": { "X-API-Key": "${env:NEUROAPI_KEY}" }
}
}
}Add .vscode/mcp.json to your workspace. The type: "http" field is
required — without it VS Code treats the entry as a local stdio command and
tries to execute the URL. The inputs block prompts for the key once and
stores it in VS Code's secret storage:
{
"servers": {
"neuroapi": {
"type": "http",
"url": "https://api.neurobro.ai/api/v1/mcp",
"headers": { "X-API-Key": "${input:neuroapi-key}" }
}
},
"inputs": [
{
"id": "neuroapi-key",
"type": "promptString",
"description": "NeuroAPI API key",
"password": true
}
]
}The MCP Inspector is the quickest way to poke at the server. From the CLI:
npx @modelcontextprotocol/inspector --cli https://api.neurobro.ai/api/v1/mcp \
--transport http --method tools/list \
--header "X-API-Key: $NEUROAPI_KEY"In the Inspector UI: set Transport Type to Streamable HTTP, enter the
endpoint URL, then in Authentication change the header name to X-API-Key
and paste your key before you connect.
For a client that only speaks stdio (for example Claude Desktop, whose custom
connector UI is URL-and-OAuth only and has no field for an API-key header),
bridge to the remote server with
mcp-remote:
{
"mcpServers": {
"neuroapi": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.neurobro.ai/api/v1/mcp",
"--header",
"X-API-Key:${NEUROAPI_KEY}"
],
"env": { "NEUROAPI_KEY": "neuro_..." }
}
}
}mcp-remote splits --header on whitespace, so keep the value on one token:
write X-API-Key:${NEUROAPI_KEY} with no space after the colon and pass
the key through env. This is a big reason NeuroAPI uses a single-token
X-API-Key header rather than Authorization: Bearer <key>.
Verify the connection
Once configured, list the tools — you should see exactly one, ask_neuroapi.
Most clients show connected MCP servers and their tools in a status or settings
panel; the Inspector's tools/list call above prints them directly. Then ask a
question like "What's the macro setup for the euro this week?" and confirm the
client invokes the tool.
Troubleshooting
| Symptom | Cause & fix |
|---|---|
Tool call errors with a 401/403 message | Key is missing, invalid, revoked, or the account has no active plan. Verify it with curl .../api/v1/health -H "X-API-Key: $KEY". |
Tool error mentioning mode_not_in_plan | You asked for max on a plan that doesn't include it. Use fast/smart or upgrade. |
403 mcp_origin_not_allowed | A browser-based client sent a disallowed Origin. The remote server is meant for local tools and servers, not front-end fetch(). |
| VS Code tries to run the URL as a command | The type: "http" field is missing from the server entry. |
| Client connects but every call is unauthenticated | The client dropped your custom header. Update it, or use the mcp-remote bridge under Other clients. |
| Claude Desktop / claude.ai "custom connector" won't take a key | That UI is URL + OAuth only. Connect through Claude Code or the mcp-remote bridge instead. |
A previously working session suddenly 404s | The session ended (idle, restart, or an explicit close). The client just re-initializes; no action needed. |
Still stuck? Every response carries an X-Request-Id — quote it when you
reach out.