Skip to content

Developer MCP

Your app can serve an MCP server for your own developers, such as its admin tools, next to what it serves your users. On the web portal’s Developer MCP tab, press Turn on, tick Exposes MCP for internal developers and choose a path (default /mcp). The server is then at:

https://<the portal's address>/mcp

That path, and everything under it, takes an AgentSpaces API key that reaches the portal’s project (one for all projects of the organization, or with that project selected) and nothing else. Anyone with an active key that reaches the project is a developer there. The portal’s visitors, signed in or not, don’t get in: not with their session, not with their OAuth token, not on an anonymous portal. The rest of the app is the visitors’ as before.

The Developer MCP tab shows the URL with a copy button and the config for Mistral Vibe, Claude Code and Codex.

A portal's Developer MCP tab: the MCP at /mcp, its URL https://shop.example.com/mcp with a copy button, and the Mistral Vibe config for it, with an Edit button A portal's Developer MCP tab: the MCP at /mcp, its URL https://shop.example.com/mcp with a copy button, and the Mistral Vibe config for it, with an Edit button

For developers: connect

Make a key that reaches the project in Account → API keys and put it in the environment:

export AGENTSPACES_API_KEY=<key>

Then add the server as in Connect an agent, with the portal’s URL instead of the portal MCP’s. In Mistral Vibe, for example:

[[mcp_servers]]
name = "shop-dev"
transport = "streamable-http"
url = "https://quiet-harbor.agent-app.eu/mcp"

[mcp_servers.auth]
type = "static"
api_key_env = "AGENTSPACES_API_KEY"
api_key_header = "Authorization"
api_key_format = "Bearer {token}"

Any MCP client works the same way: the URL and Authorization: Bearer <key>. Without a key, or with one that isn’t the project’s, the edge answers 401 with WWW-Authenticate: Bearer realm="agentspaces-developer". It names no OAuth metadata there, so a client asks for a key instead of starting the visitors’ sign-in. A key makes at most 600 requests a minute at the path. A suspended machine resumes for a developer’s request.

For the app: who is calling

The edge removes the key and gives your app the developer in x-agentspaces-identity (identity header), with kind: "developer":

{"v": 1, "portal": "013190e5-…", "sub": "user:01a1c587-…", "kind": "developer",
 "email": "dev@example.com", "scope": "read_write", "exp": 1794315653}
FieldMeaning
subuser:<id>, the developer’s AgentSpaces account, not one of the portal’s users.
emailthe developer’s email address.
scopethe key’s: read_write, or read_only. Your app decides what read-only means: refuse its tools that change things.
expwhen the key expires; without an expiry, shortly after the request.

What you must do:

  • Serve your MCP at the path you chose, and require kind == "developer" there.
  • Don’t accept kind == "developer" anywhere else, and don’t accept the visitors’ kinds at the path: the edge only sends developers there, so a visitor identity there would mean someone reached your port another way.
  • Honour scope.

Revoking

A developer loses access when their key is revoked or expires, when they leave the organization, or when the developer MCP is turned off. The portal sends the region the keys that reach the project (only their SHA-256, never the keys) within seconds of each change, and the edge remembers an answer for up to 30 seconds. So access ends within about half a minute. An expired key is refused at once.

Last updated on