DocsAI assistants (MCP)
AI assistants (MCP)
Connect Claude, ChatGPT, Claude Code, Cursor, VS Code, Windsurf or Codex to INFRO with the MCP server: spend, requests, traces, findings and configuration.
INFRO is in private early access. Running these examples requires an early-access account, an active trial or subscription entitlement, and your own provider connection. Self-serve purchasing is not generally open. See Early access.
The MCP server is served at https://mcp.infro.io/mcp.
The INFRO MCP server lets an AI assistant read and operate your organization over the Model Context Protocol: what you spent and where, why a request failed, what a route does, which budget is close to its limit, and a small set of safe changes. It lives at https://mcp.infro.io/mcp. You connect an assistant by signing in from it (OAuth), or with a management token for clients that cannot sign in. Each tool is a documented management API operation, so the scopes, plan, role and audit rules are the management API's own.
It never calls a model and never routes a request. Your assistant's own model calls are made and billed by your assistant and its provider. MCP tool calls are not gateway requests and do not count against your plan's request allowance.
Sign in from your assistant
Add the server URL in your assistant; it opens INFRO in a new browser tab, as other services' connectors do. Sign in, choose one organization, choose what the assistant may do, and allow it. No token is copied anywhere. The assistant then acts as you, with your current role, in that organization only, from the Startup plan. Every member can connect an assistant this way, not only owners and admins; the console shows each assistant's steps under MCP & connectors → AI assistants, and says when it has connected. If you belong to one organization, it is chosen for you and shown before you allow.
claude mcp add --transport http infro https://mcp.infro.io/mcpcodex mcp add infro --url https://mcp.infro.io/mcp
codex mcp login infro{
"mcpServers": {
"infro": {
"url": "https://mcp.infro.io/mcp"
}
}
}{
"servers": {
"infro": {
"type": "http",
"url": "https://mcp.infro.io/mcp"
}
}
}- Claude (web, desktop and mobile): Customize → Connectors → Add custom connector, paste the URL, then sign in. On Claude Team and Enterprise an owner can add INFRO once under Organization settings → Connectors; each member then chooses Connect and signs in as themselves.
- ChatGPT: add a custom MCP server in developer mode, paste the URL and choose OAuth.
- Claude Code in a terminal: run the command, then type
/mcp, chooseinfroand Authenticate (or runclaude mcp login infro). In the VS Code extension, type/mcpin the chat panel, add the server there with this URL, then Authenticate. In the desktop app or on the web, add INFRO to your Claude account as a connector (as for Claude, below): Claude Code reaches the connectors of the Claude account it is signed in with. - Codex in a terminal: the second command opens the sign-in. In the Codex app or IDE extension, open the gear menu, MCP settings, Open config.toml, add
[mcp_servers.infro]withurl = "https://mcp.infro.io/mcp", then press Authenticate beside INFRO in MCP settings. The app, the extension and the CLI share that file. - Cursor:
~/.cursor/mcp.json(or Add to Cursor in the console). Under Cursor Settings → MCP, INFRO shows Needs login: press Connect, allow in the tab that opens, and the browser hands you back to Cursor. - VS Code:
.vscode/mcp.json(or Add to VS Code in the console); VS Code opens the sign-in the first time the server starts. - Any other client that supports MCP sign-in (OAuth 2.1): add the URL. INFRO reads a Client ID Metadata Document, or registers the client (RFC 7591) as a public client whose redirect URIs are https or on localhost.
- Windsurf cannot sign in to INFRO yet (its sign-in returns to an app link INFRO has not checked): use a management token, below.
What you allow
INFRO's permission page shows what the assistant may do as areas. Each area has a switch and, where an assistant can make that change, a box for Change beside View; a badge says whether it can view only, view and change, or part of it. Areas the assistant did not ask for are left out, and the page says so. Making changes stays off unless you tick it.
| Area | View | Change |
|---|---|---|
| Usage and requests: Usage, estimated provider cost, requests and traces. Never a prompt or a response. | View usage, estimated cost and request metadata | — |
| Budgets: Spend limits for the organization and its members, and how much of each is used. | View budgets and how much is used | Set and change budgets |
| Projects: Projects, their settings and their spend limits. | View projects and their settings | Create projects and change their settings and spend limits |
| Gateway keys: Your applications' INFRO keys and their limits. Never a key's secret. | View gateway keys and their limits | Turn gateway keys off and revoke them |
| Routes: Which provider and model serve each request, and the fallbacks. | View routes and their fallbacks | Change routes |
| Findings: Cost and reliability findings INFRO raised about your traffic. | View findings | Acknowledge findings |
| Providers and settings: Provider connections, guardrails, webhooks, prices and other settings. Never a credential. | View providers, guardrails, webhooks and other settings | — |
| Audit log: Who changed what in this organization, and when. | View the audit log | — |
Under the areas, the assistant asks for OAuth scopes; the areas you choose narrow inside them and never go past them:
| Permission | Scope | What the assistant can do |
|---|---|---|
| Read configuration (always) | infro:read | See projects, provider connections, routes, gateway keys (never their secrets), budgets and settings. |
| Read usage and activity | infro:analytics | See usage, requests and traces (metadata, never prompts or responses), findings, budget status and the audit log. |
| Change projects, keys, routes and budgets (off unless you choose it) | infro:manage | Create projects, set spend limits, change routes, acknowledge findings, and turn off or revoke gateway keys. |
Each permission only narrows what your role already allows: the assistant sees only the tools your role can use, and the change permission is not offered to a role that can make none of those changes. Changes also need the plan (projects and keys from Startup, the rest from Team). If the assistant later calls a tool it was not allowed, the server answers 403 with WWW-Authenticate: Bearer error="insufficient_scope" naming the scopes the call needs, and the assistant asks you to sign in again for them. If your organization requires two-factor authentication, you need it on before you can allow an assistant.
Connected assistants
MCP & connectors → AI assistants lists the assistants connected to the organization you are in, with what each may do, its state and when it was last used: owners and admins see every member's, signed in or with a token; everyone else sees their own. Settings → Account → Connected assistants lists yours in every organization. Disconnect takes effect on the assistant's next request; it can be connected again by signing in. Removing a member, an account hold, or turning AI assistant access off stops their assistants too.
Manage changes what one assistant may do, area by area, without signing in again: the change holds from its next request. You can give your own assistant anything your plan and role allow; owners and admins can narrow any member's assistant, and only its person can give it more. A token's areas change the same way, and its secret stays.
Signing in again
Access lasts an hour and renews on its own while the assistant is used; after 30 days without use it lapses, and the assistant reads Needs re-auth. Re-authorize shows the one step in that assistant that signs it in again (for example claude mcp login infro, codex mcp login infro, or Connect in Claude's or Cursor's settings); you confirm the organization in the tab, and what it may do stays as you left it. A renewal reused after it was replaced disconnects that assistant.
Connect with a management token
For Windsurf, CI and scripts, or any assistant you would rather give a token. In the console, open MCP & connectors → AI assistants, choose your assistant (for one that can also sign in, choose use a token instead), and create its token in step one. Pick Read (every setting, usage and estimated provider cost, request metadata, findings and the audit log), Read and change (from the Team plan) or Custom (the areas above, one by one), optionally one project, and an expiry of up to a year. The steps below then show that assistant's setup with the token in it, once; each assistant gets its own token. An expired token reads Renew, which makes its successor with the same access. Owners and admins can create these tokens, from the Startup plan.
claude mcp add --transport http infro https://mcp.infro.io/mcp --header "Authorization: Bearer $INFRO_MCP_TOKEN"{
"mcpServers": {
"infro": {
"url": "https://mcp.infro.io/mcp",
"headers": {
"Authorization": "Bearer ${env:INFRO_MCP_TOKEN}"
}
}
}
}{
"inputs": [
{
"type": "promptString",
"id": "infro_token",
"description": "INFRO management token",
"password": true
}
],
"servers": {
"infro": {
"type": "http",
"url": "https://mcp.infro.io/mcp",
"headers": {
"Authorization": "Bearer ${input:infro_token}"
}
}
}
}{
"mcpServers": {
"infro": {
"serverUrl": "https://mcp.infro.io/mcp",
"headers": {
"Authorization": "Bearer ${env:INFRO_MCP_TOKEN}"
}
}
}
}[mcp_servers.infro]
url = "https://mcp.infro.io/mcp"
bearer_token_env_var = "INFRO_MCP_TOKEN"- Claude Code: run it in a terminal; add
--scope userto use INFRO in every project. In a shared.mcp.json, use"headers": {"Authorization": "Bearer ${INFRO_MCP_TOKEN}"}so the token stays out of the repository. - Cursor:
~/.cursor/mcp.json(every project) or.cursor/mcp.json. The console shows this file with your token written in, ready to paste; to keep the token out of the file, use the variable as here and setINFRO_MCP_TOKENin the environment Cursor starts from. - VS Code:
.vscode/mcp.json. VS Code asks for the token once and stores it securely. The Add to VS Code button does the same. - Windsurf: Cascade's MCP settings, raw config (
mcp_config.json). - Codex:
~/.codex/config.toml; setINFRO_MCP_TOKEN. The Codex app and IDE extension do not see a shell variable when opened from the Dock or Start menu: put the header in the file instead,http_headers = { "Authorization" = "Bearer <token>" }, and keep the file private. - Any other client that speaks MCP over Streamable HTTP: the URL above and the header
Authorization: Bearer <token>.
Then ask something like "What did we spend on each provider this month?" The server's instructions tell the assistant to start with get_overview. Claude.ai, Claude Desktop and ChatGPT do not take a pasted token: connect them by signing in, above.
Tools
18 tools in three toolsets. A token sees only the tools its scopes, plan and project restriction allow; the full reference is on MCP tools.
| Toolset | Tools | What it is for |
|---|---|---|
observe | get_overview, query_usage, search_requests, get_request, get_trace, list_findings, get_budget_status, search_audit_log | What happened: usage and estimated provider cost, requests, traces, findings, spend limits, the audit log. |
configure | list_models, list_configuration, get_configuration, prepare_gateway_key | What is configured: models, every configuration resource, and a console link to create a gateway key. |
manage | create_project, set_spend_limit, update_route, acknowledge_finding, revoke_gateway_key, set_gateway_key_enabled | Changes, listed only when the token holds a write scope its plan allows (projects and keys from Startup, the rest from Team). |
Example prompts
| Ask | What the assistant does |
|---|---|
| How is our INFRO organization doing this month? | get_overview: plan, period, estimated provider cost so far, requests against the allowance, open findings, spend limits near their limit, failing connections. |
| Which model cost us the most in the last 7 days? | query_usage grouped by model, ranked by estimated provider cost. |
| Why did our most recent failed request fail? | search_requests for the newest failure, then get_request for its error and each provider attempt. |
| Show me the run checkout-123 step by step. | get_trace: each step's model, status, latency and estimated cost, and the run's total. |
| Set a $20 monthly spend limit on the Search project that blocks when reached. | get_configuration for the project's version, then set_spend_limit after you confirm. Needs the change permission. |
Toolsets and read-only mode
Narrow what an assistant sees with the URL or headers: https://mcp.infro.io/mcp?toolsets=observe,configure or X-INFRO-MCP-Toolsets: observe,configure, and ?read_only=1 or X-INFRO-MCP-Read-Only: true. These only narrow: they never add a tool the token cannot use. The same URL and token always list the same tools in the same order.
Security model
- Your sign-in or your token, your role. A signed-in assistant acts as you, with your current role, in the one organization you chose, narrowed by what you allowed. A management token acts as the person who created it, with their current role, narrowed by its scopes.
*:readdoes not include request data, findings or the audit log; those scopes are granted by name. - Issued for this server only. A sign-in token is accepted only by the MCP server it was issued for (RFC 8707), never by the management API or the gateway. INFRO accepts public clients with PKCE only: it fetches an assistant's client metadata document over https from a public host, or registers the client with redirect URIs that are https or on localhost, whatever authentication it asked for.
- No secrets pass through. No tool takes or returns a provider credential, a gateway key secret, a webhook secret or a Slack URL. An argument shaped like a credential is refused; an output shaped like one is withheld and reported to INFRO.
- No content. Prompts and completions are never returned, whatever your capture setting.
- Changes are confirmed. Write tools need the
versionyou last read (a stale one is refused, never retried), carry accurate annotations so your assistant asks you first, and revoking a key needs its exact label. A change made through MCP never takes ownership from Terraform or the CLI; the result warns you when the next apply would revert it. - Audited. Every change writes an audit row naming the client "AI assistant (MCP)". Each tool call is logged with its tool, outcome and duration, never its arguments or result, for 90 days.
- Admins stay in control. Owners and admins can turn AI assistant access off for the organization under Settings → Gateway → AI assistants; every MCP request, signed in or with a token, is then refused with
403 mcp_disabled, and the management API is unaffected. MCP & connectors → AI assistants lists every connected assistant, and the API tokens list shows which assistant last used each token and its calls in seven days. You get an email each time you connect an assistant, and the owners are emailed when a member allows one to make changes.
Untrusted content is marked, not neutralized. Tag values, step names, end-user ids and provider error messages come from your applications and providers. Results that carry them start with a line telling the assistant to treat them as data, not instructions, and each value is cut to 300 characters. That is a signal to the model, not a security boundary: review what your assistant proposes before you approve a change.
What leaves INFRO
A tool's result goes to your assistant, and from there to the model provider your assistant uses. That is your assistant and your contract, reached with your own credential; INFRO adds no subprocessor and sends nothing on its own. Results contain configuration, metadata and estimated costs, never request content.
Limits
| Limit | Value |
|---|---|
| Tool calls per token or signed-in assistant | 120 a minute (429 too_many_attempts, with Retry-After), counted apart from the management API's own limit; a signed-in assistant counts per person and organization |
| Failed authentications | 30 a minute per address, shared with the management API |
| Result size | About 20,000 characters; longer lists are cut with truncated: true and a next_cursor |
| History | Your plan's history window, as in the console |
| Request allowance | MCP calls do not count against it |
Errors
A tool that cannot do what was asked returns a result with isError: true, a structuredContent.error object (type, code, message, next_step, and where they apply required_scope, required_plan, current_version or retry_after_s), and one line of text: code: message — next step. The connection itself is refused before any tool runs in these cases:
| Status | When |
|---|---|
| 401 | No credential, an unknown, expired or revoked one, or a gateway key (sk_infro_…). The response carries WWW-Authenticate: Bearer realm="infro-mcp", resource_metadata="…", scope="infro:read infro:analytics", which is how an assistant finds the sign-in; a rejected sign-in token adds error="invalid_token" (sign in again from the assistant). |
403 insufficient_scope | A signed-in assistant called a tool it was not allowed. WWW-Authenticate: Bearer error="insufficient_scope", scope="…" lists every scope the call needs; the assistant can ask you to sign in again for them. |
403 token_creator_not_admin | The token's creator is no longer an owner or admin. |
403 account_locked | The token's creator is on an account hold. A signed-in assistant whose person is on a hold gets 401 invalid_token. |
403 plan_feature | The organization's plan does not include the management API (from Startup). |
403 mcp_disabled | An owner or admin turned off AI assistant access for the organization. |
| 403 | A browser Origin the server does not accept. |
| 405 | Anything but POST to the endpoint. |
Codes a tool can return include insufficient_scope, plan_feature, project_restricted, resource_not_found, version_conflict, confirmation_mismatch, credential_in_arguments, tool_not_enabled, organization_suspended and too_many_attempts. See Errors.
Protocol
Streamable HTTP, stateless, one JSON response per request. The server speaks MCP revision 2026-07-28 (server/discover, per-request _meta) and the earlier initialize revisions (2025-03-26 to 2025-11-25), so current clients work without a session. GET and DELETE answer 405.
Changelog
| Version | Changes |
|---|---|
| 1.1.0 | Sign in from your assistant (OAuth 2.1 with PKCE and client metadata documents): Claude, ChatGPT, Claude Code, Codex and VS Code connect without a token, act with the person's role in one organization, and appear under Connected assistants. Tools now follow the person's role as well as the scopes. |
| 1.0.0 | First release: 18 tools in the observe, configure and manage toolsets; management-token authentication. |