OAuth 2.1 has landed. Starting with v0.5, you can connect ApiCrate's MCP server to Claude Code, Cursor, or any MCP client by logging in through your browser — no more pasting a long-lived API key into a config file.
The Problem With Keys in Config Files¶
Until now, connecting an AI agent to ApiCrate's MCP server meant copying your API key into a JSON config:
{
"mcpServers": { "apicrate": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.apicrate.io/mcp/sse"], "env": { "API_KEY": "ac_usr_your_secret_key_here" } } }}
It works, but a long-lived secret ends up sitting in a plaintext file on every machine you connect from. Rotate the key and every config breaks. Share your setup and you've leaked a credential.
OAuth fixes this. The client logs you in through the browser, gets a short-lived token scoped to exactly what it needs, and never touches your account password or your API key.
Log In, Don't Paste¶
As a part of this release the MCP client handles auth for you. Point a client at the MCP endpoint and it does the rest:
# Claude Code example
claude mcp add --transport http apicrate https://api.apicrate.io/mcp
The first time a tool is called, your browser opens to an ApiCrate consent screen: it shows which app is asking, what it wants access to ("Access all MCP tools"), and an Approve / Deny choice. Approve once, and the agent gets a token. That's the entire setup — no key to find, copy, or store.
Under the hood this is a full OAuth 2.1 authorization-code flow, and the client never had to be pre-registered. ApiCrate supports Dynamic Client Registration (RFC 7591), so the MCP client registers itself automatically. There's nothing to set up in your dashboard first.
Built to the Spec¶
If you care about the details, This release implements the modern OAuth 2.1 + MCP authorization stack end to end:
| Standard | What it gives you |
|---|---|
| RFC 8414 / RFC 9728 | Metadata discovery — clients find the auth server and resource automatically |
| RFC 7591 | Dynamic Client Registration — no manual app setup |
| RFC 7636 (PKCE) | S256 proof-key on every flow, required — not optional |
| RFC 8707 | Tokens are audience-bound to the MCP resource |
| RFC 7009 | Token revocation endpoint |
Clients are public by design — there are no client secrets to leak. PKCE does the work that a secret used to, which is exactly the model OAuth 2.1 recommends for the kind of native and CLI apps that speak MCP.
Security That Doesn't Stop at Login¶
The interesting part of an OAuth implementation is what happens after you log in:
- Refresh-token rotation with reuse detection. Every refresh mints a brand new refresh token and retires the old one. If an old token is ever replayed — the classic sign of a stolen token — the entire token family is revoked immediately. An attacker can't quietly ride a leaked refresh token.
- Sub-second revocation. Revoke an app and its access token stops working across the API within a second, not whenever a cache happens to expire.
- Nothing stored in the clear. Authorization codes, access tokens, and refresh tokens are only ever persisted as SHA-256 hashes. A database dump leaks no usable credentials.
See and Revoke Connected Apps¶
Every app you authorize shows up in your dashboard under Authorized Apps: which client, when you first approved it, when it was last used, and what scope it holds. One Revoke button kills every token that app holds for your account. Connect Claude Code on your laptop and a second client on a server, and you can cut off either one independently without disturbing the other.
Your Existing API Keys Still Work¶
This is additive. OAuth is the new way to connect interactive MCP clients — your ac_usr_ API keys keep working exactly as before for REST calls and for programmatic MCP access. Both auth methods even share the same quota counter, so your usage and limits look identical no matter how you authenticate. Nothing you've already built needs to change.
Try It¶
Any MCP client that speaks OAuth discovery works today. The quickest way to see the whole flow is the MCP Inspector:
npx @modelcontextprotocol/inspector
Set the server URL to https://api.apicrate.io/mcp, choose OAuth 2.1 for auth, and the Inspector will discover the endpoints, register itself, open the consent screen, and list all 22 ApiCrate tools once you approve.
What's Next¶
We're expanding scopes beyond mcp:tools so you'll be able to grant agents narrower, per-API access, and bringing the same browser-login experience to more clients as the MCP ecosystem standardizes on OAuth.
Sign up for free or read the full documentation to get started — the free tier includes MCP access so you can try the whole flow end to end.