# The MCP server Ask Claude, ChatGPT, Cursor or VS Code about your infrastructure — "which monitors were down last night?", "where does `mail.example.com` point?", "which domains expire this quarter?" — and let it look the answer up in InfraNest. The assistant connects to the InfraNest **MCP server**, which reads through the same API as your scripts. **It only reads.** Nothing an assistant does through it changes anything. The server's address is: ``` https://api.infranest.io/mcp ``` There are two ways to connect: - **In claude.ai and ChatGPT**, [Connect with InfraNest](ai/claude-and-chatgpt.md): add the address, sign in to InfraNest and approve. No token, every plan. - **In Claude Code, Cursor, VS Code and Claude Desktop**, [use an API token](#connect-with-a-token). The rest of this section: - [Connect Claude and ChatGPT](ai/claude-and-chatgpt.md) — with OAuth, step by step. - [Coding agents](ai/coding-agents.md) — an `AGENTS.md` snippet, prompts that work and safe defaults. - [Give an assistant the docs](ai/docs-for-assistants.md) — `llms.txt` and the Markdown twins. - [What an assistant can and cannot do](ai/safety.md) — and how to remove one. ## Connect with a token Claude Code, Cursor, VS Code and Claude Desktop take an API token. Create one under **My account → Developer**. Give it **read** scopes only for the areas you want the assistant to see — it cannot see more than the token can. In your [sandbox](sandbox.md), a test token works the same way, with sample data. The token goes in the header `Authorization: Bearer `. The links below add the server to your editor and read the token from the environment variable `INFRANEST_TOKEN`; neither link carries a token. ### Claude Code ```sh claude mcp add --transport http infranest https://api.infranest.io/mcp \ --header "Authorization: Bearer $INFRANEST_TOKEN" ``` ### Cursor **Add to Cursor** above, or in `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project): ```json { "mcpServers": { "infranest": { "url": "https://api.infranest.io/mcp", "headers": { "Authorization": "Bearer ${env:INFRANEST_TOKEN}" } } } } ``` ### VS Code **Add to VS Code** above reads `INFRANEST_TOKEN` from the environment VS Code was started from. To have VS Code ask for the token once and keep it in its secret storage instead, put this in `.vscode/mcp.json`: ```json { "inputs": [ { "type": "promptString", "id": "infranest-token", "description": "InfraNest API token", "password": true } ], "servers": { "infranest": { "type": "http", "url": "https://api.infranest.io/mcp", "headers": { "Authorization": "Bearer ${input:infranest-token}" } } } } ``` ### Claude Desktop The connector you add on claude.ai ([Connect Claude and ChatGPT](ai/claude-and-chatgpt.md)) is the simplest way. To use a token instead, use the `mcp-remote` bridge (it needs Node.js) in `claude_desktop_config.json`: ```json { "mcpServers": { "infranest": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.infranest.io/mcp", "--header", "Authorization: Bearer ${INFRANEST_TOKEN}"], "env": { "INFRANEST_TOKEN": "your token" } } } } ``` ## The tools Each tool is one read in the [API reference](reference.md), and needs that read's scope. This list is generated from the server itself. | Tool | What it answers | What it reads | Scope | |---|---|---|---| | `list_organizations` | List organizations | `GET /organizations` | `members.read` | | `status_overview` | Is everything up right now | `GET /organizations/{organization}/status` | `monitoring.read` | | `list_servers` | List servers | `GET /organizations/{organization}/cloud-servers` | `cloud.read` | | `get_server` | Get a server | `GET /organizations/{organization}/cloud-servers/{cloudServer}` | `cloud.read` | | `server_attention` | What needs attention on a server | `GET /organizations/{organization}/cloud-servers/{cloudServer}/attention` | `cloud.read` | | `server_metrics` | Servers with their latest metrics | `GET /organizations/{organization}/cloud-servers/metrics-overview` | `cloud.read` | | `list_monitors` | List monitors | `GET /organizations/{organization}/monitoring-checks` | `monitoring.read` | | `get_monitor` | Get a monitor | `GET /organizations/{organization}/monitoring-checks/{monitoringCheck}` | `monitoring.read` | | `monitor_stats` | Uptime and response times of a monitor | `GET /organizations/{organization}/monitoring-checks/{monitoringCheck}/stats` | `monitoring.read` | | `monitor_results` | Recent check results of a monitor | `GET /organizations/{organization}/monitoring-checks/{monitoringCheck}/results` | `monitoring.read` | | `list_incidents` | List incidents | `GET /organizations/{organization}/incidents` | `monitoring.read` | | `incident_timeline` | Timeline of an incident | `GET /organizations/{organization}/incidents/{incident}/updates` | `monitoring.read` | | `list_dns_zones` | List DNS zones | `GET /organizations/{organization}/dns-zones` | `dns.read` | | `list_dns_records` | List the records in a DNS zone | `GET /organizations/{organization}/dns-zones/{dnsZone}/dns-records` | `dns.read` | | `search_dns` | Search DNS records across all zones | `GET /organizations/{organization}/dns/search` | `dns.read` | | `list_domains` | List domains | `GET /organizations/{organization}/domains` | `domains.read` | | `list_certificates` | List certificates | `GET /organizations/{organization}/certificates` | `monitoring.read` | | `list_maintenance_windows` | List maintenance windows | `GET /organizations/{organization}/maintenance-windows` | `monitoring.read` | | `search_audit_log` | Search the audit log | `GET /organizations/{organization}/audit-logs` | `audit-log.read` | | `uptime_report` | Monthly uptime report | `GET /organizations/{organization}/uptime-report` | `monitoring.read` | | `read_api` | Read any public API endpoint | any read in the [API reference](/reference) | the scope of what it reads | When a token reaches more than one organization, the assistant asks `list_organizations` first and names the one it means. Connected with InfraNest, it reaches the one organization you picked. A long answer is cut off at 80,000 characters, with a note telling the assistant how to narrow it. ## Things to ask - "Is anything down right now?" - "Which monitors were down last night, and for how long?" - "Where does `mail.example.com` point, and when was that record last changed?" - "Which domains and certificates expire in the next 60 days?" - "Which servers are running out of disk space?" - "Who changed the DNS for `shop.example.com` this week?" - "What was our uptime last month, per monitor?" ## What it costs Nothing extra, on every plan — Free included. Each tool call is an API read, and counts against the same [rate limit](limits.md#rate-limits) as any other request with that token. **Connect with InfraNest** works on every plan. **Connecting with a token** needs a plan that includes API tokens (Pro or higher), or a test token in your [sandbox](sandbox.md). See [Limits](limits.md#what-each-plan-includes). When something does not work, see [Troubleshooting](troubleshooting.md#assistant-and-mcp-connection-problems).