User Guide
MCP Integration

MCP Integration

Objective

Connect your AI tools to CloudAgent using the Model Context Protocol (MCP) to build and deploy cloud infrastructure with built-in guardrails.

What is MCP? The Model Context Protocol is an open standard that allows AI-powered tools to connect to external services. CloudAgent's MCP server lets your AI assistant deploy infrastructure on your behalf, with security and governance controls applied automatically.

Prerequisites

Before setting up MCP, ensure you have:

  • A CloudAgent account with at least one connected AWS environment
  • A workload configured with your team's security baselines and governance rules
  • One of the supported AI tools: Cursor, Claude Desktop, or ChatGPT Desktop

Step 1: Get Your MCP Configuration

  1. Log in to CloudAgent (opens in a new tab).
  2. Navigate to SetupMCP Extension in the sidebar.
  3. Copy the configuration using Copy Configuration or download it with Download Config.

The configuration file looks like this:

{
  "mcpServers": {
    "cloudagent": {
      "url": "https://api.cloudagent.io/mcp",
      "enabled": true
    }
  }
}

Step 2: Configure Your AI Tool

Select your tool and follow the setup instructions:

Cursor
  1. Open Cursor Settings: Go to Cursor → Settings → Cursor Settings.
  2. Navigate to Tools & MCP: In the settings sidebar, click on "Tools & MCP".
  3. Add MCP Configuration: Click "Add MCP Server" and paste the configuration from CloudAgent.
  4. Restart Cursor: Restart Cursor to load the new MCP configuration.
  5. Authenticate with OAuth: When you first use the MCP server, Cursor will prompt you to authenticate using OAuth. Follow the authentication flow to complete setup.
  6. Test Integration: Ask Cursor to access your CloudAgent resources or list your cloud environments.
Claude Desktop
  1. Open Claude Desktop: Launch the Claude Desktop application.
  2. Access Settings: Go to Claude → Settings (or press Cmd/Ctrl + ,).
  3. Navigate to Connectors: In the settings sidebar, click on "Connectors".
  4. Add Custom Connector: Click "Add Custom Connector" and enter the following:
    • Name: CloudAgent (or any name you prefer)
    • URL: https://api.cloudagent.io/mcp
  5. Follow Authentication Instructions: Follow the OAuth authentication instructions that appear to complete the setup.
  6. Test Integration: Ask Claude to access your CloudAgent resources or list your cloud environments.
ChatGPT Desktop
  1. Install ChatGPT Desktop: Download and install ChatGPT Desktop from the official website.
  2. Open Settings: In ChatGPT Desktop, go to Settings → Plugins.
  3. Configure MCP: Add the MCP configuration to your ChatGPT Desktop settings file:
~/.config/chatgpt-desktop/mcp-servers.json
  1. Restart ChatGPT: Restart ChatGPT Desktop to load the new configuration.
  2. Verify Connection: Ask ChatGPT to access your CloudAgent resources or list your cloud environments.

Step 3: Authenticate with OAuth

When you first connect to the CloudAgent MCP server, you'll be prompted to authenticate:

  1. Start a conversation with your AI tool.
  2. Type any CloudAgent command, such as: "List my CloudAgent workloads"
  3. You'll be prompted to authenticate with CloudAgent via OAuth.
  4. Complete the OAuth flow in your browser.
  5. Once authenticated, the AI will respond with your available workloads.

You should see output similar to:

Connected to CloudAgent. Available workloads:
- payments-api (prod)
- user-portal (staging)
- data-pipeline (dev)

Authentication: MCP authentication uses OAuth. You'll be prompted to authenticate when connecting to the MCP server.

Available MCP Capabilities

Once connected, your AI tool can perform the following operations through CloudAgent:

Read Operations (No Approval Required)

  • List workloads and their configurations
  • View security baselines and governance rules
  • Check deployment status and history
  • Query AWS resources within workload scope

Write Operations (Requires Approval)

  • Deploy infrastructure blueprints
  • Update workload configurations
  • Create or modify AWS resources

Guardrails Active: All deployments are validated against your workload's security baselines before execution. If a request violates a security rule, it will be blocked with an explanation.

Troubleshooting

"Connection refused" or "Server not found"

  • Verify the MCP server URL is https://api.cloudagent.io/mcp
  • Verify your network allows outbound HTTPS connections

OAuth authentication not working

  • Ensure pop-ups are allowed for the OAuth flow
  • Try signing out and re-authenticating
  • Clear your browser cookies for cloudagent.io and try again

"Permission denied" on deployment

  • Your workload may have restrictive security baselines
  • Contact your security team to review the blocked rule
  • Check the CloudAgent dashboard for detailed error logs

MCP server not appearing

  • Restart your AI tool after saving the configuration
  • Ensure the JSON syntax is valid (no trailing commas)
  • Check for error messages in your tool's console or logs

Next Steps