The Kong Konnect MCP Server enables AI assistants to interact with Kong Konnect's API Gateway for analytics, configuration management, and control plane operations.
Capabilities include:
Query and analyze API requests with filters for time range, status codes, HTTP methods, and consumer/service/route IDs
Analyze specific consumer requests with success/failure filters and detailed statistics
Inspect and manage gateway components including services, routes, consumers, and plugins
Control plane management:
List and filter control planes
Retrieve detailed control plane information
Manage control plane group memberships
Check membership status
Integration with AI assistants for natural language interaction
Extensible architecture for adding new tools and operations
Enables interaction with Kong Konnect APIs, allowing users to query API Gateway analytics, inspect configuration details (services, routes, consumers, plugins), and manage control planes through a structured interface.
Kong Konnect MCP Server
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
Table of Contents
Overview
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:
Query API request analytics with customizable filters
List and inspect gateway services, routes, consumers, and plugins
Manage control planes and control plane groups
Integration with Claude and other MCP-compatible AI assistants
Konnect MCP is a work in progress and we will be adding additional functionality and improvements with each release.
Project Structure
Installation
Prerequisites
Node.js 20 or higher
A Kong Konnect account with API access
A client with MCP capabilities (e.g. Claude Desktop, Cursor, etc...)
Setup
Configuration
Set the following environment variables to configure the MCP server:
Available Tools
The server provides tools organized in three categories:
Analytics Tools
Query API Requests
Query and analyze Kong API Gateway requests with customizable filters.
Get Consumer Requests
Analyze API requests made by a specific consumer.
Configuration Tools
List Services
List all services associated with a control plane.
List Routes
List all routes associated with a control plane.
List Consumers
List all consumers associated with a control plane.
List Plugins
List all plugins associated with a control plane.
Control Planes Tools
List Control Planes
List all control planes in your organization.
Get Control Plane
Get detailed information about a specific control plane.
List Control Plane Group Memberships
List all control planes that are members of a specific group.
Check Control Plane Group Membership
Check if a control plane is a member of any group.
Usage with Claude
To use this MCP server with Claude for Desktop:
Install Claude for Desktop
Create or edit the Claude Desktop configuration file:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
Restart Claude for Desktop
The Kong Konnect tools will now be available for Claude to use
Example Workflows
Analyzing API Traffic
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.
Troubleshooting Consumer Issues
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?
Development
Adding New Tools
Define the parameters in
parameters.ts
Add documentation in
prompts.ts
Create the operation logic in the appropriate file in
operations/
Register the tool in
tools.ts
Handle the tool execution in
index.ts
Troubleshooting
Common Issues
Connection Errors
Verify your API key is valid and has the necessary permissions
Check that the API region is correctly specified
Ensure your network can connect to the Kong Konnect API
Authentication Errors
Regenerate your API key in the Kong Konnect portal
Check that environment variables are correctly set
Data Not Found
Verify the IDs used in requests are correct
Check that the resources exist in the specified control plane
Ensure time ranges are valid for analytics queries
Credits
Built by Kong. Inspired by Stripe's Agent Toolkit.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A Model Context Protocol server enabling AI assistants to interact with Kong Konnect's API Gateway, providing tools to query analytics data, inspect configurations, and manage control planes through natural language.
- Table of Contents
- Overview
- Project Structure
- Installation
- Configuration
- Available Tools
- Usage with Claude
- Example Workflows
- Development
- Troubleshooting
- Credits
Related Resources
Related MCP Servers
- -securityFlicense-qualityA versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.Last updated -18
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to interact with Kubernetes clusters through natural language, supporting core Kubernetes operations, monitoring, security, and diagnostics.Last updated -721MIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -331