Connect with an API Key
An API Key is the fallback. It belongs to the whole organization, works in any MCP client that can set a request header, and needs no browser.
Before you start
- An assume agent and its MCP address. See Assume agents to create one.
- A fully authorized API Key (grant
all). Any other key is refused with 403ASSUME_KEY_GRANT_UNSUPPORTED.
Create the key in the same organization, as described in API Keys. Set it as PRAXIS_API_KEY through your environment-variable manager, readable by the client process. Keep the key out of project files.
Configure your client
Use praxis-assume as the server name. These snippets match the Console’s Connect dialog.
Add this to .mcp.json in your project root:
{ "mcpServers": { "praxis-assume": { "type": "http", "url": "https://api.deepraxis.com/agent/v1/agents/K7Q2M9XA/mcp", "headers": { "Authorization": "Bearer ${PRAXIS_API_KEY}" } } }}Add this to the project’s .codex/config.toml; the key is read from the environment only:
[mcp_servers.praxis-assume]url = "https://api.deepraxis.com/agent/v1/agents/K7Q2M9XA/mcp"bearer_token_env_var = "PRAXIS_API_KEY"Add this to the project’s .cursor/mcp.json:
{ "mcpServers": { "praxis-assume": { "url": "https://api.deepraxis.com/agent/v1/agents/K7Q2M9XA/mcp", "headers": { "Authorization": "Bearer ${env:PRAXIS_API_KEY}" } } }}The transport is MCP Streamable HTTP, and the credential is the Authorization: Bearer <API Key> header. The door reads only that header; it ignores cookies and X-API-Key.
Verify
Ask the client to run:
Use praxis_assume_bash to run echo hello-praxis and reply with the output only.Expected: hello-praxis, and a connection and call record appear on the agent’s Console page.
Limits
- The key belongs to the whole organization. One fully authorized key opens any assume agent’s endpoint in that organization; it does not narrow to one agent the way an OAuth grant does. Use OAuth when each agent needs its own grant and its own revocation.
- Revocation is the whole key. Disabling or deleting it in API Keys stops every place that uses it.
- Do not put it on a shared machine. Inject it from your CI platform’s secret store; keep it out of the repository, logs, and echoed commands.
- Keys do not renew. When one expires, every configuration that uses it needs the new key.
When something fails
| Result | Cause and recovery |
|---|---|
401 Bearer authentication required | The request carried no Authorization: Bearer header. Check that the client applied its headers entry. |
403 ASSUME_KEY_GRANT_UNSUPPORTED | The key is not fully authorized. Use a fully authorized key from the same organization. |
400 ASSUME_AGENT_REQUIRED | The URL identifies another agent kind. Create an assume agent and replace the URL. |
403 ASSUME_AGENT_MISMATCH | You sent an agent’s own login or token, not an organization key; it drives only its own agent. |
Tool refusals carry isError in the tool result; they are separate from HTTP connection errors. See Operate for confirmations and errors.