Connect External AI Tools with MCP (Cursor, VS Code, Claude Desktop)

Who this is for

Anyone who wants their own AI assistant — Cursor, VS Code Copilot, or Claude Desktop — to manage their CloudAIPilot cloud infrastructure directly from their editor, instead of (or as well as) using AI Pilot inside the dashboard.

What you will complete

Generate an MCP key, connect your AI tool to CloudAIPilot, and run your first safe cloud action from your editor.

Before you begin

  • You need the Owner or Admin role in your organization.
  • AI Pilot must be enabled under Settings → AI Pilot.
  • Have your AI client installed (Cursor, VS Code with Copilot/MCP, or Claude Desktop).

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants use external tools. CloudAIPilot runs an MCP server, so your AI can call the same infrastructure tools that AI Pilot uses inside the dashboard — list servers, read logs, check spend, provision a database, deploy an app, take a backup — with the exact same safety rules. A key you create can never do more than you can do yourself, and every change still asks for your confirmation.

You do not download anything. You paste a URL and a key into your editor. That's it.


Step 1 — Generate your MCP key

  1. Open Dashboard → Settings → MCP Integration.
  2. Click Generate key and give it a name (for example, "Work laptop — Cursor").
  3. Copy the key immediately. It is shown only once and cannot be displayed again. If you lose it, revoke it and generate a new one.

Your MCP endpoint is shown on the same page:

https://app.cloudaipilot.com/mcp

Step 2 — Connect your AI tool

Cursor and VS Code have a one-click install button on the Settings → MCP Integration page — click it right after generating your key and your editor opens pre-filled. Prefer to do it by hand? Use the config below (replace cap_mcp_YOUR_KEY with your key).

Cursor~/.cursor/mcp.json:

{
  "mcpServers": {
    "cloudaipilot": {
      "url": "https://app.cloudaipilot.com/mcp",
      "headers": { "Authorization": "Bearer cap_mcp_YOUR_KEY" }
    }
  }
}

VS Code (Copilot / MCP).vscode/mcp.json:

{
  "servers": {
    "cloudaipilot": {
      "type": "http",
      "url": "https://app.cloudaipilot.com/mcp",
      "headers": { "Authorization": "Bearer cap_mcp_YOUR_KEY" }
    }
  }
}

Claude Desktopclaude_desktop_config.json:

{
  "mcpServers": {
    "cloudaipilot": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.cloudaipilot.com/mcp",
               "--header", "Authorization: Bearer cap_mcp_YOUR_KEY"]
    }
  }
}

After saving, restart or reload your AI client so it picks up the new server. In VS Code you can use Developer: Reload Window.

Step 3 — Try it

In your editor's AI chat, ask something simple first:

  • "List my servers."
  • "What's my month-to-date cloud spend?"
  • "Show my managed databases."

Then try an action:

  • "Provision the cheapest managed PostgreSQL database."

The AI will prepare the action and ask you to confirm. For anything destructive (deleting a server, dropping a database), you will be asked to type the exact resource name — this is the same safety gate as the dashboard. Once you confirm, the AI completes the action.


Good to know

  • Same safety, everywhere. Your role, per-server and per-database access, and every approval work identically to the dashboard. An MCP key cannot exceed your own permissions.
  • Everything is logged. See every AI action from your editor under Activity Center → MCP Activity.
  • Deletes are reversible for a while. Removing a managed database archives it with a 72-hour grace period — it stays restorable until then. The AI will tell you this; it will never claim data is permanently gone before the grace period ends.
  • Revoke anytime. Delete a key on the Settings → MCP Integration page and it stops working instantly.
  • Keep your key secret. It is like a password. Never paste it into a shared repo or a public place. If it leaks, revoke it.

Troubleshooting

  • The AI says a tool is "disabled" or can't find it. Reload your editor window so it re-reads the tool list. If it persists, remove and re-add the CloudAIPilot MCP server.
  • 401 / unauthorized. Your key is wrong, revoked, or missing the Bearer prefix. Generate a fresh key and re-paste the config.
  • Nothing happens on a change. Remember that changes require your confirmation — for destructive actions, type the exact resource name when asked, then let the AI finish.

Related Articles