Skip to content

MCP and API

Everything the UI does is available through the API. API and MCP issues tokens and sets up the MCP server for AI agents; API reference describes every operation (OpenAPI).

  • Create token: the token starts with igt_ and is shown once.
  • Scopes by area: read or write, * for everything. The sudo and mcp:destructive scopes are granted only explicitly; * does not include them.
  • An expiry and allowed IPs can be set.
  • Write access to the firewall, SSH, the system, panel settings or runtime security equals root on the server.

Requests: Authorization: Bearer igt_…. Each operation in the reference names the scope it needs. If the public address is on, tokens work on it, see Panel access.

The MCP server is on by default.

  • Tools: Compact (the default) has 4 tools that find and call any operation; Full has a tool per operation. A connection can pick the other set with the profile parameter or ingrest mcp --profile.
  • Read-only hides everything that changes the server.
  • Dangerous actions run in two steps: the first call returns a plan, the second with the same plan_id runs it. A plan lives 5 minutes.
  • Confirm destructive actions: the plan waits until a person approves it in the panel.
  • OAuth clients connect on their own; a person approves the sign-in in the panel and picks the access level.

On the server itself, sudo ingrest mcp serves MCP over stdio through the local socket, with no token, with the * and sudo scopes; with --destructive, dangerous tools are available too, still in two steps. The panel’s MCP settings (off, Read-only) apply here as well.