Kong
π¦ The API and AI Gateway
What is Kong?
Kong is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to π¦ the api and ai gateway
π¦ The API and AI Gateway
This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- π¦ The API and AI Gateway
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx kongConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Kong
Kong Gateway is a cloud-native, high-performance API and AI Gateway built on NGINX that serves as the central traffic management layer for microservices, REST APIs, LLM providers, and MCP servers. It provides authentication, rate limiting, load balancing, observability, and LLM-specific features including multi-provider AI routing (OpenAI, Anthropic, Bedrock, Azure AI, Mistral), semantic caching, and MCP traffic governance with auto-generated MCP endpoints from any RESTful API. Platform engineers and DevOps teams use Kong to secure, monitor, and scale both traditional API traffic and emerging agentic AI workloads from a single control plane.
Prerequisites
- Docker and Docker Compose installed (for the quickest local setup)
- PostgreSQL (for DB-backed mode) or no database needed for DB-less declarative mode
- An AI provider API key (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY) if using the AI Gateway features
- An MCP client such as Claude Desktop or Cursor for MCP-specific functionality
- curl or HTTPie for testing the Admin API (port 8001)
Clone the Kong Docker repository and start with Docker Compose
The fastest way to run Kong locally is via the official Docker Compose setup with PostgreSQL as the database backend.
git clone https://github.com/Kong/docker-kong
cd docker-kong/compose/
KONG_DATABASE=postgres docker-compose --profile database upVerify Kong is running
Check that Kong's Admin API is responding on port 8001 and the proxy is listening on port 8000.
curl http://localhost:8001/
# Should return Kong version info and configuration
curl http://localhost:8000/
# Returns 404 (no routes configured yet β expected)Configure an API service and route
Create a Kong service pointing to your upstream API, then add a route so Kong will proxy matching requests to it.
# Create a service:
curl -X POST http://localhost:8001/services \
-d name=my-api \
-d url=https://httpbin.org
# Add a route:
curl -X POST http://localhost:8001/services/my-api/routes \
-d 'paths[]=/api'Enable the AI Proxy plugin for LLM routing
Add Kong's AI Proxy plugin to route requests to an LLM provider. This enables semantic caching, rate limiting, and multi-provider failover for AI traffic.
curl -X POST http://localhost:8001/plugins \
-d name=ai-proxy \
-d config.route_type=llm/v1/chat \
-d config.auth.header_name=Authorization \
-d config.auth.header_value="Bearer $OPENAI_API_KEY" \
-d config.model.provider=openai \
-d config.model.name=gpt-4oAccess Kong Manager and configure MCP endpoints
Open Kong Manager at http://localhost:8002 for a visual UI to manage services, plugins, and MCP auto-generation from your existing REST APIs. The MCP governance plugin adds security and observability to MCP traffic.
Kong Examples
Client configuration
Add the Kong MCP server to claude_desktop_config.json to allow your AI client to manage Kong configuration and proxy AI requests through the gateway.
{
"mcpServers": {
"kong": {
"command": "npx",
"args": ["kong"],
"env": {
"KONG_ADMIN_URL": "http://localhost:8001",
"KONG_ADMIN_TOKEN": "your-admin-token"
}
}
}
}Prompts to try
Use these prompts when Kong is connected as an MCP server to manage your API gateway configuration through natural language.
- "List all services and routes currently configured in Kong"
- "Add rate limiting of 100 requests per minute to the my-api service"
- "Enable key authentication on the billing-api route"
- "Show me the traffic statistics and latency metrics for the past hour"
- "Create a new AI proxy route that load balances between OpenAI and Anthropic with automatic failover"Troubleshooting Kong
Docker Compose fails with database connection errors on startup
Kong requires the PostgreSQL container to be healthy before starting. The compose file should handle this with depends_on health checks, but if it fails, run 'docker-compose --profile database up -d postgres' first, wait 10 seconds, then run the full compose command.
Admin API returns 403 or authentication errors
If Kong is configured with RBAC or an admin token, set the Kong-Admin-Token header in all Admin API requests: 'curl -H "Kong-Admin-Token: your-token" http://localhost:8001/services'. For local development without RBAC, this header is not needed.
AI Proxy plugin returns upstream errors for LLM requests
Verify the API key in the plugin config is valid and the model name matches what the provider supports (e.g. 'gpt-4o' not 'gpt-4-omni'). Check Kong error logs with 'docker logs kong' for detailed error messages from the upstream LLM provider.
Frequently Asked Questions about Kong
What is Kong?
Kong is a Model Context Protocol (MCP) server that π¦ the api and ai gateway It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Kong?
Follow the installation instructions on the Kong GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Kong?
Kong works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Kong free to use?
Yes, Kong is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Kong Alternatives β Similar APIs Servers
Looking for alternatives to Kong? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
API Mega List
β 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHubβperiod. πͺ
Fetch
β 5.4kFetch web content and convert to markdown for AI consumption
Fusio
β 2.1kSelf-Hosted API Management for Builders
Korean Law
β 1.8kκ΅κ°λ²λ Ήμ 보MCP v4.0 | λ²μ μ² 41κ° API β 17κ° MCP λꡬ. λ²λ ΉΒ·νλ‘Β·μ‘°λ‘ κ²μ + LLM νκ° λ°©μ§ μΈμ©κ²μ¦ + μ‘°λ¬Έ μν₯ κ·Έλν(impact_map) + μμ λΉκ΅ μλ diff(time_travel) + μλ―Ό 5λ¨κ³ μ€ν κ°μ΄λ(action_plan) | 41 Korean legal APIs β 17 MCP tools
RuleGo
β 1.5kβοΈRuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Grafbase
β 1.2k[Acquired by The Guild] The Grafbase GraphQL Federation Gateway
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Kong in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Kong?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.