ReqKeydocs
Guides

MCP server

Let your AI coding agent build the ReqKey integration. The MCP server gives Claude Code, Cursor, VS Code and any other MCP client the full picture of ReqKey — the API, every SDK, and the playbooks for signup, billing and key management — plus tools to set up your project.

What it does

A complete integration touches three places in your codebase: creating a consumer when a customer signs up, validating keys on every request, and keeping consumers in step with billing. The MCP server teaches your agent each part, including the cases that are easy to get wrong:

  • which credit model fits — limit, refill, overage, shadow limit, expiry, rate limit, plans;
  • the right SDK and middleware for your framework, and which routes to leave unmetered;
  • create, roll, revoke and delete keys from your customers’ dashboard, with ownership checks;
  • payment failed, retries exhausted, cancelled but paid until period end, upgrade, downgrade, refund — and which ReqKey call each one maps to.

Connect your AI client

Claude Code:

claude mcp add --transport http reqkey "https://mcp.reqkey.com/mcp"

Cursor, VS Code, Claude Desktop, Windsurf and other clients that take a JSON config:

{
  "mcpServers": {
    "reqkey": { "url": "https://mcp.reqkey.com/mcp" }
  }
}

The first time the agent uses the server, your browser opens reqkey.com. Sign in, pick the project the agent should work on, and approve. Your root key is bound to the connection on our side — it never appears in a config file or in the agent’s context.

Ask it to build the integration

Describe your product in your own words. A prompt like this works well:

Integrate ReqKey into this project using the reqkey MCP server.

- Create a ReqKey consumer when a user signs up and store the consumerId on the user.
- Protect every route under /api/v1 with the ReqKey SDK; skip /health and the Stripe webhook.
- Add an "API keys" page where users create, roll and revoke their own keys.
- Sync Stripe to ReqKey: disable the consumer when payment retries are exhausted,
  keep access until the period ends on cancellation, reset credits on renewal.

Read the guides first, ask me anything that is undecided, then show me a plan.

Clients that support MCP prompts also get a ready-made integrate_reqkey prompt that runs the same workflow.

Tools

Knowledge (no sign-in needed): search_docs, list_guides, get_guide, list_endpoints, get_endpoint, list_sdks, get_sdk_guide. The endpoint reference is generated from the same source as this API reference, and the SDK guides come from each SDK’s repository.

Your project (after you connect): get_project_overview, create_api, plan tools, consumer tools, key tools, validate_key, recharge_credits and query_analytics. The agent uses these to create your plans and API, set up test consumers, and check that validations from your new integration are arriving.

Permissions & safety

  • The connection is scoped to the one project you pick. Other projects, billing and team settings are out of reach.
  • Deletes are always soft deletes (recoverable for 7 days). Permanent deletion is not available to the agent.
  • The root key is never shown to the agent and cannot be rerolled by it.
  • validate_key defaults to credits: 0, so test validations don’t spend a customer’s credits unless the agent is told to.
Use a staging project
Create a separate project for development and connect the agent to that one. Test consumers, keys and validations stay away from your real customers, and your production root key stays out of the loop entirely.

To disconnect an agent, remove the server from your client. To revoke access from our side, reroll the project’s root key in Project settings.

Docs-only mode

Want the knowledge without connecting an account? This endpoint needs no sign-in and exposes only the knowledge tools:

{
  "mcpServers": {
    "reqkey-docs": { "url": "https://mcp.reqkey.com/docs" }
  }
}

Headless & CI

Where a browser sign-in isn’t possible, send the project’s root key as a Bearer token instead. Keep it in an environment variable, never in a committed config file.

claude mcp add --transport http reqkey "https://mcp.reqkey.com/mcp" \
  --header "Authorization: Bearer $REQKEY_PROJECT_KEY"