Skip to main content

Connect Claude Code to CDB MCP Server

Claude Code is the recommended client for CDB MCP Server due to its deferred schema loading. It fetches tool schemas on demand when they match a query, allowing it to work with all CDB tools without context window limits.

Prerequisites

Step 1. Install Claude Code

irm https://claude.ai/install.ps1 | iex

After installation, restart PowerShell to update the PATH.

curl -fsSL https://claude.ai/install.sh | bash

Verify the installation:

claude --version

Step 2. Authenticate Claude Code

  1. Start Claude Code in any directory:
claude
  1. On first launch, select a color theme and press Enter.

  2. Enter the login command:

/login
  1. A browser window opens for authentication. Sign in with a Claude Pro, Max, Team, or Enterprise account.

  2. If the browser displays an authentication code instead of redirecting automatically, copy the code and paste it into the terminal prompt.

Step 3. Configure CDB MCP Server

The configuration file defines MCP server connections. Add CDB MCP Server to enable CDB API access.

Open the configuration file:

notepad $env:USERPROFILE\.claude.json

Open the configuration file:

nano ~/.claude.json

Add the CDB MCP Server entry to the mcpServers section:

{
  "mcpServers": {
    "gcore-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "gcore-mcp-server@git+https://github.com/G-Core/gcore-mcp-server.git",
        "gcore-mcp-server"
      ],
      "env": {
        "GCORE_API_KEY": "your-api-key",
        "GCORE_TOOLS": "*"
      }
    }
  }
}

Replace your-api-key with the CDB API token. Save the file.

If the configuration file already contains other settings, merge the mcpServers section without overwriting existing content. JSON syntax errors cause Claude Code to fail silently.

Step 4. Verify the connection

Restart Claude Code to load the new configuration:

claude

Check that CDB MCP Server is connected:

claude mcp list

The output shows gcore-mcp-server with status Connected:

gcore-mcp-server: uvx --from gcore-mcp-server@... - ✓ Connected

Test with a resource query:

List my CDN resources

A successful response displays CDN resource details, including resource ID, CNAME, status, and configuration.

Claude Code displaying CDN resource details returned by CDB MCP Server

If the server shows Failed to connect, verify that uv is installed and the API key is valid. Test the API key independently:

curl -H "Authorization: APIKey your-api-key" https://api.cdb-staging.cdn.orange.com/cdn/resources

A 200 response confirms valid credentials. A 401 response indicates an invalid or expired key.

Tool search behavior

When a query mentions a product or operation, Claude Code searches tool names and descriptions for matches, loads schemas for matched tools, and executes the appropriate tool. The query "create a CDN resource" triggers a search for cdn and create patterns, returning only the relevant tool schema rather than loading all tools.

Setting GCORE_TOOLS=* enables all available tools. This configuration is appropriate for Claude Code because schemas load only when needed. Other clients require tool filtering to avoid context window limits.