Model Context Protocol (MCP) Client Configuration Guide
The Egulu Developer Cloud provides a native Model Context Protocol (MCP) server implementation per project (ADR-0901).
External AI coding agents (Claude Code, Cursor, Codex CLI, Antigravity) connect either: 1. Directly over Streamable HTTP with an OAuth 2.1 CIMD token. 2. Locally over standard I/O (stdio) via the egulu mcp proxy CLI command (ADR-0705).
1. CLI Stdio Proxy (egulu mcp proxy)
Local agents that speak MCP over stdio connect through the CLI proxy:
egulu mcp proxy --project <project-id> [--agent <agent>] [--toolset <toolset>]
Aliases: egulu mcp serve
Options
- --project <project-id>: Target project ID (required, RFC 8707 resource). - --agent <agent>: The agent to act as: its ID (ci-bot) or its token subject (agt_ and 32 hex digits, shown as tokenSubject by egulu agents list --project <project-id>). Without it the proxy lists your agents in the project and takes your only ACTIVE one; with none, or several, it stops and says so. The exchange succeeds only for an ACTIVE agent you sponsor in that project. Your token goes to your API for that listing and the exchange, never to the MCP endpoint. - --toolset <toolset>: Restrict exposed tools to a single vertical toolset (compute, containers, data, network, observability, billing). - --mcp-url <url>: Override the direct MCP endpoint URL (env PLAT_MCP_URL). - --mcp-origin <origin>: Override the MCP base origin (env PLAT_MCP_ORIGIN). By default it follows --api: https://api.{api-domain} gives https://mcp.{api-domain}, and a loopback API (the lab AppHost, https://localhost:5170) gives http://localhost:5240, the AppHost's MCP endpoint. Pass it when Plat:Lab:McpOrigin moved that endpoint. - --token <token>: Explicit bearer token (env PLAT_TOKEN or PLAT_MCP_TOKEN). When omitted, uses your saved session credentials. It is your own API token, which the proxy exchanges, or an agent token already issued for this endpoint.
When the proxy cannot connect
The proxy gets its agent token before it reads anything from your MCP client. When it cannot (you are not signed in, it cannot choose an agent, the token service cannot be reached, or the exchange is refused), it prints the reason on stderr and exits with code 5, and your client reports that the server failed to start. Run the same command in a terminal to read the reason. Two examples from the lab (the first when you have no active agent, the second when the exchange is refused):
[egulu mcp proxy] error: no agent token for project 'my-project': you sponsor no ACTIVE agent in project 'my-project'; create one with `egulu agents create` or pass --agent
[egulu mcp proxy] error: no agent token for project 'my-project': the token exchange at https://localhost:5170/v1/auth/token answered HTTP 403 access_denied: the agent is not an active agent of yours for that project
[egulu mcp proxy] hint: the exchange asked for agent 'agt_0123456789abcdef0123456789abcdef' and resource http://localhost:5240/v1/projects/my-project
---
2. Configuring Claude Code
Add Egulu to Claude Code using claude mcp add or by adding it to your .mcp.json:
{
"mcpServers": {
"egulu": {
"command": "egulu",
"args": ["mcp", "proxy", "--project", "my-project"]
}
}
}
Or via the Claude Code CLI:
claude mcp add egulu -- egulu mcp proxy --project my-project
---
3. Configuring Cursor / VS Code
In Cursor's MCP settings (settings.json or .cursor/mcp.json):
{
"mcpServers": {
"egulu": {
"command": "egulu",
"args": ["mcp", "proxy", "--project", "my-project"]
}
}
}
---
4. Configuring Codex CLI and Custom MCP Clients
For Codex CLI or any generic stdio-based agent:
egulu mcp proxy --project my-project --agent codex-cli
---
5. Security & Token Delegation (cliProxy)
Per ADR-0210: - The CLI proxy never passes your human master token to the MCP endpoint. When the exchange fails, it stops with exit code 5 instead. - It performs an RFC 8693 token exchange at the security token service (POST /v1/auth/token on --api) for an agent-scoped token (act.sub = <agent>) bound to the project audience (https://mcp.{api-domain}/v1/projects/{project}; in the lab http://localhost:5240/v1/projects/{project}). - The agent token lives at most ten minutes and never past your own token. The proxy exchanges again when 80% of its life has passed, and once more, retrying the call, when the endpoint answers 401. If an exchange is refused in the middle of a session, the call gets a JSON-RPC error -32001 that names the reason, the proxy keeps using the token it has while that is still valid, and it asks the service again no sooner than 15 seconds later. A token you pass in that is already an agent token for the endpoint cannot be renewed: when it expires, the proxy says so on stderr. - Tools are default-deny and limited to the agent's ceiling (R0 read-only, R1 reversible mutations, R2 mutations requiring passkey approval). - Destructive operations require human passkey approval (mcp:apply).