MCP clients
Connect AI coding assistants to MCP servers exposed through your agentgateway proxy running in Kubernetes.
Before you begin
- Set up an agentgateway proxy.
- 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.
/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.
| IDE | Config File | Transport | Auth Headers |
|---|---|---|---|
| Cursor | ~/.cursor/mcp.json | streamable-http | ✅ supported |
| VS Code | settings.json | streamable-http | ✅ supported |
| Windsurf | ~/.windsurf/mcp.json | streamable-http | ✅ supported |
| Claude Code | .mcp.json or CLI | streamble-http | ✅ supported |
| OpenCode | opencode.json | streamble-http | ✅ supported |
Claude Code
Add the MCP server to your Claude configuration.
claude mcp add agentgateway --transport http <MCP_URL>{ "mcpServers": { "agentgateway": { "url": "<MCP_URL>" } } }Verify the connection.
claude mcp list
The agentgateway server shows up as Connected.
Cursor
Create or edit
.cursor/mcp.jsonin your project root.{ "mcpServers": { "agentgateway": { "url": "<MCP_URL>" } } }Restart Cursor and verify that agentgateway tools appear in the MCP tools list.
VS Code (GitHub Copilot)
Add to your VS Code
settings.json.{ "mcp": { "servers": { "agentgateway": { "url": "<MCP_URL>" } } } }Restart VS Code and verify that agentgateway tools appear in the MCP tools list.
Windsurf
Create or edit
~/.windsurf/mcp.json.{ "mcpServers": { "agentgateway": { "url": "<MCP_URL>" } } }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>"
}
}
}
}