MCP clients

Connect AI coding assistants to MCP servers exposed through your agentgateway proxy running in Kubernetes.

Before you begin

  1. Set up an agentgateway proxy.
  2. Deploy an MCP server and expose it through agentgateway with an HTTPRoute.

Get the MCP endpoint URL

The MCP endpoint URL depends on how you exposed the MCP server through agentgateway.

export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
  -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

echo "MCP URL: http://$INGRESS_GW_ADDRESS/mcp/mcp"
kubectl port-forward -n agentgateway-system svc/agentgateway-proxy 8080:80 &

The MCP endpoint is available at http://localhost:8080/mcp/mcp.

ℹ️
The path /mcp/mcp assumes the default HTTPRoute path prefix of /mcp from the Static MCP guide. If you configured a different path in your HTTPRoute, adjust accordingly.

Connect your IDE

Use the MCP endpoint URL from the previous step to configure your IDE. Replace <MCP_URL> with your endpoint, such as http://localhost:8080/mcp/mcp for port-forward setups.

Review the following table of configuration details by IDE environment.

IDEConfig FileTransportAuth Headers
Cursor~/.cursor/mcp.jsonstreamable-http✅ supported
VS Codesettings.jsonstreamable-http✅ supported
Windsurf~/.windsurf/mcp.jsonstreamable-http✅ supported
Claude Code.mcp.json or CLIstreamble-http✅ supported
OpenCodeopencode.jsonstreamble-http✅ supported

Claude Code

  1. Add the MCP server to your Claude configuration.

    claude mcp add agentgateway --transport http <MCP_URL>
    {
      "mcpServers": {
        "agentgateway": {
          "url": "<MCP_URL>"
        }
      }
    }
  2. Verify the connection.

    claude mcp list

The agentgateway server shows up as Connected.

Cursor

  1. Create or edit .cursor/mcp.json in your project root.

    {
      "mcpServers": {
        "agentgateway": {
          "url": "<MCP_URL>"
        }
      }
    }
  2. Restart Cursor and verify that the agentgateway tool appears in the MCP tools list.

VS Code (GitHub Copilot)

  1. Add to your VS Code settings.json.

    {
      "mcp": {
        "servers": {
          "agentgateway": {
            "url": "<MCP_URL>"
          }
        }
      }
    }
  2. Restart VS Code and verify that agentgateway tools appear in the MCP tools list.

Windsurf

  1. Create or edit ~/.windsurf/mcp.json.

    {
      "mcpServers": {
        "agentgateway": {
          "url": "<MCP_URL>"
        }
      }
    }
  2. Restart Windsurf and verify that agentgateway tools appear in the MCP tools list.

Authentication

If you configured MCP auth on your agentgateway proxy, include the required headers in your client configuration. The following example shows a Bearer token.

claude mcp add agentgateway --transport http <MCP_URL> \
  --header "Authorization: Bearer <your-token>"
{
  "mcpServers": {
    "agentgateway": {
      "url": "<MCP_URL>",
      "headers": {
        "Authorization": "Bearer <your-token>"
      }
    }
  }
}

Next steps

Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.