Kong

v1.0.0β€’APIsβ€’stable

🦍 The API and AI Gateway

aiai-gatewayapi-gatewayapi-managementapis
Share:
43,425
Stars
0
Downloads
0
Weekly
0/5

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

API and AI gateway
LLM routing
Cloud-native management
Kong

Maintainer

LicenseApache-2.0
Languagelua
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx kong

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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 up
2

Verify 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)
3

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'
4

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-4o
5

Access 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.

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.

Quick Config Preview

{ "mcpServers": { "kong": { "command": "npx", "args": ["-y", "kong"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide β†’

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides