NewConnect Claude, Cursor, ChatGPT, and other AI agents to API Ninjas via our MCP server
Model Context Protocol

Connect your AI agent to API Ninjas

A single MCP endpoint exposes our entire API as ~170 tools your agent can call. Bring your own API key — works with Claude, Cursor, ChatGPT, GitHub Copilot, Gemini, and a dozen other clients. Sign up to get a key.

Endpoint
https://mcp.api-ninjas.com/mcp/
Streamable HTTP transport
Authentication
X-Api-Key: YOUR_API_NINJAS_KEY
Find your key on the profile page
Command line

Claude Code

Official docs

Anthropic's official CLI for Claude. Native support for remote streamable-http servers and per-request headers.

Add via the CLI
claude mcp add --transport http apininjas https://mcp.api-ninjas.com/mcp/ \
  --header "X-Api-Key: YOUR_API_NINJAS_KEY"
Or edit .mcp.json directly (project-scoped)
{
  "mcpServers": {
    "apininjas": {
      "type": "http",
      "url": "https://mcp.api-ninjas.com/mcp/",
      "headers": { "X-Api-Key": "YOUR_API_NINJAS_KEY" }
    }
  }
}

Troubleshooting

401 Unauthorized

Your X-Api-Key header isn't reaching the server. Confirm the value matches the key on your profile page. Header names are case-insensitive — that part is fine.

Tool count looks short

A successful connection lists roughly 170 tools (one per API Ninjas endpoint). Some clients filter or paginate — check your client's tool browser settings.

Client doesn't support remote MCP

Wrap our endpoint with the mcp-remote bridge to convert it into a stdio process: npx -y mcp-remote https://mcp.api-ninjas.com/mcp/ --header "X-Api-Key:YOUR_KEY"

Hitting rate limits

Each tool call counts against your normal API Ninjas quota. Upgrade your plan for higher rate limits, more requests per month, and access to premium-only fields. Still stuck? Contact us.