by Kong
Enables AI assistants to query and analyze Kong Konnect API Gateway configurations, traffic, and analytics through a Model Context Protocol server.
Kong Konnect MCP Server provides a set of tools that let AI assistants interact with Kong Konnect’s API Gateway. It exposes operations for querying request analytics, inspecting services, routes, consumers, plugins, and managing control planes, all via natural‑language calls.
export KONNECT_ACCESS_TOKEN=kpat_api_key_here
export KONNECT_REGION=us # optional, defaults to US
node build/index.js
).claude_desktop_config.json
.Q: Which Node.js version is required? A: Node.js 20 or higher.
Q: How do I obtain the KONNECT_ACCESS_TOKEN
?
A: Generate a personal access token (PAT) in the Kong Konnect portal under API Access.
Q: What regions are supported?
A: US, EU, AU, ME, IN. The default region is US if KONNECT_REGION
is not set.
Q: How are pagination parameters used?
A: Tools that return large lists accept size
/pageSize
and offset
/pageAfter
(cursor) parameters to page through results.
Q: Can I add custom tools?
A: Yes. Define new Zod schemas in parameters.ts
, add documentation in prompts.ts
, implement the logic under operations/
, register the tool in tools.ts
, and expose it via index.ts
.
Q: What should I do if I get connection or authentication errors? A: Verify that the access token is valid and has the required scopes, ensure the correct region is set, and confirm network connectivity to the Konnect API endpoints.
Q: Is there a pre‑built npm package to run the server?
A: The project is intended to be built from source. If a published package becomes available, you could invoke it with npx
.
A Model Context Protocol (MCP) server for interacting with Kong Konnect APIs, allowing AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.
https://github.com/user-attachments/assets/19c2f716-49b5-46c3-9457-65b3784e2111
This project provides a Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Kong Konnect's API Gateway. It offers a set of tools to query analytics data, inspect configuration details, and manage control planes through natural language conversation.
Key features:
Konnect MCP is a work in progress and we will be adding additional functionality and improvements with each release.
src/
├── index.ts # Main entry point
├── api.ts # Kong API client
├── tools.ts # Tool definitions
├── parameters.ts # Zod schemas for tool parameters
├── prompts.ts # Detailed tool documentation
├── operations/
│ ├── analytics.ts # API request analytics operations
│ ├── configuration.ts # Services, routes, consumers, plugins
│ └── controlPlanes.ts # Control plane management
└── types.ts # Common type definitions
# Clone the repository
git clone https://github.com/Kong/mcp-konnect.git
cd mcp-konnect
# Install dependencies
npm install
# Build the project
npm run build
Set the following environment variables to configure the MCP server:
# Required: Your Kong Konnect API key
export KONNECT_ACCESS_TOKEN=kpat_api_key_here
# Optional: The API region to use (defaults to US)
# Possible values: US, EU, AU, ME, IN
export KONNECT_REGION=us
The server provides tools organized in three categories:
Query and analyze Kong API Gateway requests with customizable filters.
Inputs:
- timeRange: Time range for data retrieval (15M, 1H, 6H, 12H, 24H, 7D)
- statusCodes: Filter by specific HTTP status codes
- excludeStatusCodes: Exclude specific HTTP status codes
- httpMethods: Filter by HTTP methods
- consumerIds: Filter by consumer IDs
- serviceIds: Filter by service IDs
- routeIds: Filter by route IDs
- maxResults: Maximum number of results to return
Analyze API requests made by a specific consumer.
Inputs:
- consumerId: ID of the consumer to analyze
- timeRange: Time range for data retrieval
- successOnly: Show only successful (2xx) requests
- failureOnly: Show only failed (non-2xx) requests
- maxResults: Maximum number of results to return
List all services associated with a control plane.
Inputs:
- controlPlaneId: ID of the control plane
- size: Number of services to return
- offset: Pagination offset token
List all routes associated with a control plane.
Inputs:
- controlPlaneId: ID of the control plane
- size: Number of routes to return
- offset: Pagination offset token
List all consumers associated with a control plane.
Inputs:
- controlPlaneId: ID of the control plane
- size: Number of consumers to return
- offset: Pagination offset token
List all plugins associated with a control plane.
Inputs:
- controlPlaneId: ID of the control plane
- size: Number of plugins to return
- offset: Pagination offset token
List all control planes in your organization.
Inputs:
- pageSize: Number of control planes per page
- pageNumber: Page number to retrieve
- filterName: Filter control planes by name
- filterClusterType: Filter by cluster type
- filterCloudGateway: Filter by cloud gateway capability
- labels: Filter by labels
- sort: Sort field and direction
Get detailed information about a specific control plane.
Inputs:
- controlPlaneId: ID of the control plane to retrieve
List all control planes that are members of a specific group.
Inputs:
- groupId: Control plane group ID
- pageSize: Number of members to return per page
- pageAfter: Cursor for pagination
Check if a control plane is a member of any group.
Inputs:
- controlPlaneId: Control plane ID to check
To use this MCP server with Claude for Desktop:
Install Claude for Desktop
Create or edit the Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"kong-konnect": {
"command": "node",
"args": [
"/absolute/path/to/mcp-konnect/build/index.js"
],
"env": {
"KONNECT_ACCESS_TOKEN": "kpat_api_key_here",
"KONNECT_REGION": "us"
}
}
}
}
First, list all control planes:
Please list all control planes in my Kong Konnect organization.
Then, list services for a specific control plane:
List all services for control plane [CONTROL_PLANE_NAME/ID].
Query API requests for a specific service:
Show me all API requests for service [SERVICE_NAME/ID] in the last hour that had 5xx status codes.
List consumers for a control plane:
List all consumers for control plane [CONTROL_PLANE_NAME/ID].
Analyze requests for a specific consumer:
Show me all requests made by consumer [CONSUMER_NAME/ID] in the last 24 hours.
Check for common errors or patterns:
What are the most common errors experienced by this consumer?
parameters.ts
prompts.ts
operations/
tools.ts
index.ts
Connection Errors
Authentication Errors
Data Not Found
Built by Kong. Inspired by Stripe's Agent Toolkit.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "kong-konnect": { "command": "node", "args": [ "/absolute/path/to/mcp-konnect/build/index.js" ], "env": { "KONNECT_ACCESS_TOKEN": "kpat_api_key_here", "KONNECT_REGION": "us" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by danny-avila
Provides a self‑hosted ChatGPT‑style interface supporting numerous AI models, agents, code interpreter, image generation, multimodal interactions, and secure multi‑user authentication.
by block
Automates engineering tasks on local machines, executing code, building projects, debugging, orchestrating workflows, and interacting with external APIs using any LLM.
by RooCodeInc
Provides an autonomous AI coding partner inside the editor that can understand natural language, manipulate files, run commands, browse the web, and be customized via modes and instructions.
by pydantic
A Python framework that enables seamless integration of Pydantic validation with large language models, providing type‑safe agent construction, dependency injection, and structured output handling.
by lastmile-ai
Build effective agents using Model Context Protocol and simple, composable workflow patterns.
by mcp-use
A Python SDK that simplifies interaction with MCP servers and enables developers to create custom agents with tool‑calling capabilities.
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via MCP servers.
by gptme
Provides a personal AI assistant that runs directly in the terminal, capable of executing code, manipulating files, browsing the web, using vision, and interfacing with various LLM providers.