What MCP actually changes
MCP is a standard way for an AI client to discover and call tools on a server. Before MCP, every agent framework invented its own plugin format, so the same capability had to be re-implemented for Claude Code, Cursor, Codex, and everything else.
The practical result: your agent gains a stable capability surface, and you stop maintaining parallel integrations.
Two layers you configure separately
This is the most common source of confusion, so separate them before you start.
RockAPI sits on the tool layer when you add it as an MCP server. It sits on the model layer when you use it as the model provider through the OpenAI-compatible API. You can use both at once, but they are two separate entries.
Before you start
- Create an API key. Generate one at rockapi.ai/keys and store it in an environment variable, never in a file you commit.
- Copy the MCP configuration. Your console shows the MCP endpoint and the header format for your account. Use the value shown there rather than typing a URL from memory.
- Confirm your client supports MCP. Claude Code, Cursor, Codex, VS Code, and Claude Desktop all ship MCP support. Check your client version if the command below is rejected.
- Decide the model. Whichever client you use, the agent still needs an LLM. Pick it in the client’s provider settings, or route it through RockAPI.
Add the MCP server
The command differs per client, but the inputs are identical: a URL, a transport, and anAuthorization: Bearer header.
Claude Code
Codex
Add the server to~/.codex/config.toml. Reading the token from an environment variable keeps the secret out of the file:
Cursor and VS Code
Both accept an HTTP MCP server in their JSON config. Use the env interpolation syntax your client documents so the key is not stored in plain text:Claude Desktop
Claude Desktop launches command-based servers, so point it at themcp-remote bridge:
Verify the connection
Do not move to production after a server shows as connected. Confirm the four behaviors below.
If the server connects but calls fail, the problem is usually the token, not the transport. Rotate the key and retest before you debug anything else.
Operating rules that save incidents
- Scope the key. Use a dedicated key for the MCP integration instead of your main production key, so you can revoke one without breaking the other.
- Prefer read-only first. Give the agent the narrowest capability that completes the task, and expand only when a real workflow requires it.
- Watch spend separately. Tool-driven agents issue many small calls. A separate key makes per-agent cost visible in the dashboard.
- Keep secrets in the environment. Keys pasted into committed config files are the most common leak in agent setups. See secure API key management.
- Log tool calls. When an agent misbehaves, the tool call sequence explains it faster than the final answer.
FAQ
Is MCP the same thing as an OpenAI-compatible API?
No. An OpenAI-compatible API standardizes how your code calls a model. MCP standardizes how an AI client discovers and calls tools. RockAPI offers both, and they are configured in different places.Do I still need an API key with MCP?
Yes. The MCP server is reachable, but the key is what identifies your account, applies your rate limits, and records usage on your bill.Can one MCP server serve several agents?
Yes, and that is the point. The same server entry works across clients, so a Claude Code session and a Cursor session reach the same capability set with the same key.Does MCP change how models are billed?
No. Billing follows the underlying model calls. See pricing and billing for how usage is counted.What if my client does not support HTTP MCP servers yet?
Use themcp-remote bridge shown in the Claude Desktop example. It translates the HTTP endpoint into a local stdio process that any command-based client can launch.
Next step
If you have not sent a request yet, start with the quickstart, then read models and providers to pick the model behind your agent. For cost control across several agents, compare the AI API gateway approach.Create an API key and connect your agent
Generate a key, copy the MCP configuration from your console, and verify the connection before production traffic.
