Skip to main content
How the server authenticates a call: the browser sign-in, and the API key for setups that have no browser.

Connect with an API key

Some setups cannot open a browser: a server, a scheduled job, or a client that only lets you set a fixed header. Connect those with an API key. Create one in Account Settings > API Keys (see API keys), then send it in the Authorization header of every call to the server URL.
Replace exp_pat_… with your key. Put the key in an environment variable and let the client read it from there. Set EXPLORATORY_API_KEY through your environment’s secret-management facility, such as your operating system’s credential store or the secrets of your CI, not through your shell’s startup file. Do not write the key itself on the command line or in a configuration file; it stays in your shell history or in that file. The configuration below assumes that this environment variable is already set. For example, in Claude Code, a client that accepts a fixed header, refer to the variable in .mcp.json.
For other clients, see the steps for Codex, Cursor and other clients.
  • A key reads what you can view, as your browser sign-in does. It is read-only (content:read). Only Authors can create one.
  • When a key fails, the server answers 401 or 403 with the reason. It does not start the browser sign-in (OAuth) instead. Fix the key.
  • Use the browser sign-in where you can. A key does not go through the consent page, SSO or MFA, so treat it like a password.
An administrator on an on-premises or Hosted server can turn API keys off or limit them to certain IP addresses; the two 403 messages above mean that. The publisher settings in Data and permissions apply to a key in the same way.
  • API keys - Create, expire, revoke and keep a key safe.

Transport and authorization

If a person uses it in a browser, use the browser sign-in. If there is no browser, or a job runs by itself, use an API key. Every call needs Authorization: Bearer <access token or API key>. A browser session cookie does not authenticate MCP calls. The consent page, the metadata URLs and the details of failed calls are in Data and permissions.