-
Notifications
You must be signed in to change notification settings - Fork 0
MCP Servers
English | 日本語
How maestro connects Claude Managed Agents to GitHub, Linear, Figma, and your own tools.
Managed Agents MCP constraints that drive the design:
| Supported | Not supported |
|---|---|
| Remote Streamable HTTP MCP | stdio MCP attached directly to the agent |
Auth via Vault credentials (static_bearer / mcp_oauth) |
Putting authorization_token on mcp_servers[]
|
sessions.create with vault_ids
|
Per-turn MCP headers on the session API |
| Up to ~20 MCP servers per agent | Local-only Agent SDK mcpServers: { command, args } shapes |
Three pieces must stay consistent:
-
Agent definition —
mcp_servers[]URL +mcp_toolsetwith matchingmcp_server_name -
Vault credential — same
mcp_server_urlas the definition -
DB row (
mcp_serverstable / WebUI) — what maestro ensures into the vault at run start
Agent definition ─┐
mcp_servers ├─ hash → agents.create / update
tools ─┘
Vault credentials ── vault_ids ──► sessions.create
DB mcp_servers ── ensure at run start ──► Vault
| Field | Value |
|---|---|
| name | github |
| URL | https://api.githubcopilot.com/mcp/ |
| Auth | GitHub App installation token for the target repo (minted per run) |
| WebUI | Builtin row — name/url/enabled locked; permission policy editable |
You do not configure a PAT. The App from Installation is enough.
Multi-repo warning: Vault MCP credentials are keyed by URL. A shared VAULT_ID across repos can let one installation token overwrite another. Prefer per-run managed vaults (default) or separate vaults; avoid one long-lived shared vault for many repos.
For origin: "linear_issue" runs:
- Enable an MCP server whose URL is
https://mcp.linear.app/mcp(constantLINEAR_MCP_URL) - Provide a vault-compatible token (
token_env_nameon the row must resolve at run time) - Start runs with
linearIssue+ primaryrepo(PR still lands on GitHub)
Without an enabled Linear MCP server, Linear-origin runs fail at validation.
stdio servers (e.g. figma-developer-mcp) cannot attach to Managed Agents. Bridge them:
flowchart LR
cma[Managed Agents]
vault[Vault static_bearer]
edge[HTTPS edge]
gw[MCP Gateway]
proxy[mcp-proxy]
stdio[stdio MCP]
vault -.->|Bearer| cma
cma --> edge --> gw --> proxy --> stdio
{
"mcpServers": {
"figma": {
"command": "node_modules/.bin/figma-developer-mcp",
"args": ["--stdio", "--skip-image-downloads"]
}
}
}- Keys become URL path segments → use URL-safe names (no spaces)
- Image-download tools write to the MCP host filesystem (not the agent sandbox) — prefer
--skip-image-downloadsor tool allowlists
Local: ENABLE_DEV_TUNNEL=true (ngrok + gateway + proxy). See docs/DEVELOPMENT.md.
Production: container start.sh / start-mcp.sh with public MCP hostname:
https://mcp.example.com/servers/figma/mcp
MCP servers → add:
| Field | Example |
|---|---|
| name | figma |
| url | https://mcp.example.com/servers/figma/mcp |
| enabled | on |
| token_env_name | MCP_GATEWAY_TOKEN |
maestro ensures a Vault static_bearer whose mcp_server_url matches the row URL and whose token comes from that env var.
| Secret | Lives where | Purpose |
|---|---|---|
MCP_GATEWAY_TOKEN |
maestro env + Vault bearer | CMA → your gateway |
| Anthropic outbound CIDR | edge / gateway allowlist | Who may call the gateway (160.79.104.0/21 today) |
FIGMA_API_KEY (etc.) |
host env for the stdio process | Upstream API — never needs to enter the agent vault |
No code change if the server is already HTTP MCP:
- Obtain a stable HTTPS URL and a bearer (or OAuth material)
- Put the bearer in an env var on the maestro host
- WebUI → MCP servers → name, url,
token_env_name, enable - Next run: vault ensure + agent registry hash update picks it up
- Optionally tighten system prompts so the agent knows when to use it
For builtins baked into agent definitions, follow the three-piece pattern in-repo:
- URL constant in
src/shared/constants.ts -
mcp_servers+mcp_toolseton parent/child agent builders - Vault ensure in
src/shared/vault.ts(mcp_server_urlexact match)
Registry hashes definitions and calls agents.update when they change.
MCP toolsets support Managed Agents permission policies (e.g. always_allow). Builtin GitHub uses allow-by-default for agent autonomy; tighten in WebUI when you need human gates.
| Environment | Typical MCP URL |
|---|---|
| Local + dev tunnel |
https://<random>.ngrok.app/servers/<name>/mcp (DB upserted on start) |
| Production | https://mcp.yourdomain.com/servers/<name>/mcp |
| GitHub builtin |
https://api.githubcopilot.com/mcp/ (Anthropic-reachable; no gateway) |
Free ngrok URLs change every process start — expect vault/DB churn unless you use a reserved domain.
❌ stdio command in agent mcp_servers
❌ authorization_token on mcp_servers in AgentCreateParams
❌ mcp_servers on sessions.create
❌ Putting upstream API keys (Figma, etc.) into the agent vault when only the stdio host needs them
❌ Exposing mcp-proxy to the internet without gateway Bearer + network allowlist
- Architecture — trust diagram
- Installation — gateway env sketch
- Troubleshooting — 401 / 405 / initialize failed
- Upstream docs: MCP connector · Vaults