/ MCP Server
// client_setup

Connect your MCP client

Pick your client below. Each section covers both auth methods: OAuth (browser login, recommended for humans) and API Key (headless, for CI/CD and automation).

Claude Code is Anthropic's CLI. It supports the MCP http transport natively since v1.x — no mcp-remote proxy needed. Config lives in .mcp.json at project root or ~/.claude/ for global use.

OAuth

OAuth (browser login)

Recommended for interactive use. Claude Code opens a browser window on first connect; you authenticate with your Aviatrix CoPilot credentials. The token is cached and refreshed automatically.

  • 01Add the server entry to .mcp.json (project) or ~/.claude/mcp.json (global):
.mcp.json
{
  "mcpServers": {
    "aviatrix": {
      "type": "http",
      "url": "https://platform.mcp.aviatrix.com/mcp"
    }
  }
}
  • 02Run any Aviatrix tool (e.g. aviatrix_list_gateways). Claude Code will open a browser tab to complete OAuth. Approve the request.
  • 03Done. Tokens are cached in ~/.claude/ and refreshed silently.
API Key

API Key (headless)

For CI/CD pipelines, automation scripts, or any context where a browser is unavailable. Generate a key from the login portal, then add it to the config.

.mcp.json
{
  "mcpServers": {
    "aviatrix": {
      "type": "http",
      "url": "https://platform.mcp.aviatrix.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Never commit API keys to source control. Use an environment variable and reference it via $AVX_MCP_KEY in shell profiles, or store in your secrets manager.

Claude Desktop uses a JSON config file to register MCP servers. It does not support the native http transport yet — use mcp-remote as a local proxy. Config path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Restart Claude Desktop after editing.

OAuth

OAuth (browser login)

On first use, mcp-remote opens a browser tab for OAuth. After approval the token is cached locally and refreshed automatically.

  • 01Edit claude_desktop_config.json and add:
claude_desktop_config.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp"
      ]
    }
  }
}
  • 02Restart Claude Desktop. On next tool use a browser tab opens for login.
Requires Node.js. Install from nodejs.org if npx is not available.
API Key

API Key (headless)

Passes the key as a bearer token via mcp-remote's --header flag. No browser required.

claude_desktop_config.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}
  • 03Restart Claude Desktop.

Cursor supports MCP servers via Settings → MCP (GUI) or by editing ~/.cursor/mcp.json directly. Both methods produce the same config. Cursor uses mcp-remote for SSE/HTTP transports.

OAuth

OAuth (browser login)

On first connect Cursor (via mcp-remote) opens a browser tab for OAuth. Tokens are cached per-project.

  • 01Open Cursor Settings → MCP → Add Server, or edit ~/.cursor/mcp.json:
~/.cursor/mcp.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp"
      ]
    }
  }
}
  • 02Reload Cursor. A browser tab will open on first tool invocation.
API Key

API Key (headless)

~/.cursor/mcp.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}
  • 03Reload Cursor. The server connects immediately without a browser prompt.

Windsurf (Codeium) supports MCP via Settings → MCP Servers or by editing ~/.codeium/windsurf/mcp_config.json. The config format mirrors Claude Desktop.

OAuth

OAuth (browser login)

  • 01Edit ~/.codeium/windsurf/mcp_config.json:
mcp_config.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp"
      ]
    }
  }
}
  • 02Reload Windsurf. A browser tab opens for OAuth on first use.
Alternative: Use the GUI at Settings → MCP Servers → Add and enter the npx command and args directly.
API Key

API Key (headless)

mcp_config.json
{
  "mcpServers": {
    "aviatrix": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://platform.mcp.aviatrix.com/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}
  • 03Reload Windsurf.

Cline is a VS Code extension with deep MCP support. Config lives at VS Code Settings → Cline → MCP Servers (GUI) or in the Cline MCP settings JSON. Cline supports both stdio (via mcp-remote) and native http transports depending on version.

OAuth

OAuth (browser login)

  • 01Open the Cline panel in VS Code, click the MCP Servers icon, then Add Server.
  • 02Choose Remote Server (SSE/HTTP) and enter the URL directly — Cline handles mcp-remote internally:
Cline MCP config (JSON view)
{
  "aviatrix": {
    "url": "https://platform.mcp.aviatrix.com/mcp",
    "disabled": false
  }
}
  • 03Save. Cline opens a browser tab for OAuth on first tool call.
Cline's GUI wraps mcp-remote automatically for HTTP servers. If your version requires manual config, use the mcp-remote stdio pattern from the Claude Desktop tab above.
API Key

API Key (headless)

Cline MCP config (JSON view)
{
  "aviatrix": {
    "url": "https://platform.mcp.aviatrix.com/mcp",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    },
    "disabled": false
  }
}
  • 03Save. No browser prompt — the key is sent with every request.