How your API key scopes access
MCP authentication uses a project API key. The key is scoped to one or more projects within a team, and the MCP server forwards it to Catalyst APIs, where permissions are enforced. Authentication is by API key only. Because the key already identifies its project, you rarely need to name one. Every tool that takes a project treats it as optional and resolves it from the key automatically, so prompts like “list recent inferences” or “show the latest HALO runs” work without specifying a project.- Single-project key (most common): all tools target that project. You never pass a project.
- Multi-project key: tools use the key’s default project unless you name a specific one. Mention the project in your prompt to switch.
- Switching projects: to work in a project the key isn’t scoped to, use a different key — there is no in-session project switch. If you regularly work across projects, add the MCP server multiple times under different names, each with its own key (e.g.
inference-prod,inference-staging), so all projects stay available at once.
whoami tool at any time to see the current team, the projects the key can access, and the project it resolves to by default.
Read vs. write keys. A read-only key is the safer default: it can browse and read everything but cannot change anything, so the MCP server can never modify your resources. Use a key with write access only when you want MCP tools to make changes, such as creating datasets, running evals, launching training jobs, or changing deployments. Read and write scopes are set per project when you create the key.
Configure your client
Create or choose a project API key
Open API Keys in the dashboard and choose a key scoped to the project you want your MCP client to access.
Add the MCP server to your tool
Use
https://mcp.inference.net/mcp as the server URL and pass your key in the Authorization header. Examples for common clients are below.Claude Code
SetINFERENCE_API_KEY in your shell, then add the hosted MCP server:
Cursor
Add the server to.cursor/mcp.json for one project, or ~/.cursor/mcp.json for all projects.
VS Code
Create or edit.vscode/mcp.json. VS Code will prompt for the key the first time it starts the server and store it securely.
Windsurf
Edit~/.codeium/windsurf/mcp_config.json and add the server:
Codex
SetINFERENCE_API_KEY, then add the server with the Codex CLI:
OpenCode
Add the server undermcp in your OpenCode config:
Gemini CLI
Add the server to~/.gemini/settings.json or .gemini/settings.json:
Other clients
Use Streamable HTTP with this URL and header. The client must support custom headers; OAuth-only or SSE-only clients are not supported.Example prompts
You drive the MCP server in natural language. Your assistant picks the right tools and resolves the project from your key, so you can describe what you want rather than name tools or IDs.Apply HALO fixes for an agent
HALO analyzes an agent’s traces and writes a report with suggested fixes. To apply them, name the agent in plain language:Run HALO on demand or on a schedule
If there’s no recent report, ask your assistant to run HALO now, then apply the result once it finishes:More examples
Read actions (listing, summarizing, reading reports) work with a read-only key. Write actions (creating datasets, running evals, launching training jobs, changing deployments) need a key with write access.
Troubleshooting
| Error | What it means | How to fix |
|---|---|---|
401 | The Authorization header is missing or the API key is invalid. | Check that the header is Authorization: Bearer <your-project-api-key> and that the key starts with sk-inference-. |
403 | The key is valid but does not have the permission needed for the tool. | Use a key with the required read or write scope for that action. |
Project ID is required | The key is scoped to multiple projects and has no default, so a tool could not pick one. | Name the project in your prompt, or run whoami to see the key’s projects. |
Project not found | The requested project is outside the key’s scope. | Use a key scoped to that project; a single key cannot reach projects it isn’t scoped to. |