kong-ai-gateway-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_FILE | No | additional JSON log destination; stderr always | |
| LOG_LEVEL | No | pino level; audit events always emit | info |
| GEMINI_MODEL | No | any model the key can access; pricing must be declared in src/telemetry/cost.ts for cost to be reported | gemini-3.5-flash-lite |
| LLM_PROVIDER | No | provider for the agent and evaluation | gemini |
| GEMINI_API_KEY | No | required for agent and eval only | |
| KONG_ADMIN_URL | No | Admin API base URL | http://localhost:8001 |
| KONG_PROXY_URL | No | used only by npm run health | http://localhost:8000 |
| KONG_TIMEOUT_MS | No | per-request timeout to Kong | 5000 |
| MAX_AGENT_STEPS | No | LLM calls per run | 10 |
| MAX_CONTEXT_CHARS | No | cap on a single serialized tool result | 12000 |
| ENABLE_WRITE_TOOLS | No | must stay false: no write tool is implemented and the server refuses to start otherwise | false |
| MAX_TOOL_RESULT_ITEMS | No | cap on any list in a tool result | 50 |
| MAX_REPEATED_TOOL_CALLS | No | identical (tool, arguments) calls per run | 2 |
| MAX_TOTAL_TOOL_RESULT_SIZE | No | cumulative tool-result characters per run | 50000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| find_route_by_pathA | Resolves a URL path to the Kong route (or routes) that serve it. USE WHEN: the user describes a problem in terms of a path -- "auth is failing on /payments", "/orders returns 429". This is almost always the correct FIRST tool for such a question, because everything else needs a route identifier. RETURNS: LIMITATIONS: matches whole path values only, not Kong prefix-matching semantics, so a request to /payments/v2 handled by a /payments route will not match here. More than one match means the path is genuinely ambiguous in Kong and is worth investigating in itself. |
| list_servicesA | Lists the services configured in Kong, one compact summary each. USE WHEN: you need to discover what exists in the gateway, or map a vague name a user gave ("the payments API") onto a real service. Also useful to confirm a service exists before investigating further. DO NOT USE to investigate a specific route or path. If the user named a path such as /payments, call find_route_by_path instead -- it goes straight to the relevant entity rather than making you scan a list. RETURNS: LIMITATIONS: summaries only -- no plugins, no routes, no timeouts. Use get_service for the full record of one service. A page that reports hasMore=true is NOT the complete set. |
| list_consumersA | Lists the consumers (API clients) registered in Kong. USE WHEN: you need to find the right consumer name before calling get_consumer, or to confirm whether a client the user named exists at all. A client that is not registered as a consumer cannot authenticate, which is a different problem from a missing credential. RETURNS: LIMITATIONS: no credentials and no group membership -- call get_consumer for one consumer. |
| list_upstreamsA | Lists the upstreams (load-balanced backend pools) configured in Kong. USE WHEN: you need to know which upstream a service name refers to, or which upstreams have health checking configured at all. RETURNS: LIMITATIONS: no targets and no health. Use check_upstream_health for one upstream. |
| get_routeA | Retrieves a single Kong route and the service it is attached to. USE WHEN: you already know the route name or have a DO NOT USE with a URL path such as "/payments" -- route names and route paths are different things, and this tool takes the name. Use find_route_by_path to go from a path to a route. RETURNS: LIMITATIONS: does not return plugins. A route can look entirely correct here while being unauthenticated -- call list_plugins_for_route to see what actually applies to it. |
| get_serviceA | Retrieves the full configuration of a single Kong service. USE WHEN: you have identified a service and need its backend address, protocol, path prefix, retry policy or timeouts. Typically the step after get_route tells you which service a route belongs to. DO NOT USE to find out which plugins apply -- plugins live on a separate endpoint; use list_plugins_for_route, which already accounts for service-level inheritance. RETURNS: one service with LIMITATIONS: does not list the routes attached to the service, and does not tell you whether
|
| get_consumerA | Retrieves one Kong consumer together with what it can actually authenticate and authorize with: how many credentials of each type it holds, and which ACL groups it belongs to. USE WHEN: a specific client is failing while others succeed, or you need to distinguish a 401 from a 403. The two have different causes and this tool separates them:
RETURNS: SECURITY: credential COUNTS only. Key values, passwords and secrets are never returned by this tool and are not available through any tool in this server. LIMITATIONS: does not say which routes the consumer may reach -- that depends on the plugins on each route. Pair with list_plugins_for_route, or use diagnose_route with a consumer name to have both sides checked together. |
| list_routes_for_serviceA | Lists every route attached to one Kong service. USE WHEN: you need to know how traffic reaches a service, or to check whether a service has any route at all. A service with zero routes is unreachable through the gateway, which is a real and easily missed misconfiguration. RETURNS: LIMITATIONS: does not return plugins for those routes. |
| list_plugins_for_routeA | Lists every plugin that affects a route, resolved across all three Kong scopes. USE WHEN: investigating authentication, rate limiting, CORS, ACL or any other plugin-driven behaviour. This is the tool that answers "is this route protected, and by what". IMPORTANT -- three things this resolves that a raw plugin list does not:
RETURNS: LIMITATIONS: plugin |
| list_global_pluginsA | Lists plugins applied to every request, i.e. those with no service, route or consumer scope. USE WHEN: you need to rule out a gateway-wide plugin before concluding that a route lacks something. A global key-auth would protect every route without appearing on any of them. RETURNS: LIMITATIONS: global scope only. To see everything affecting one route including inheritance, use list_plugins_for_route, which covers this case already. |
| check_upstream_healthA | Reports Kong's own health verdict for each target of an upstream. USE WHEN: a route returns 503, or you have ruled out authentication and routing and need to
know whether the backend pool is actually serving. Reach this tool from a service whose
CRITICAL DISTINCTION between the verdicts this returns: HEALTHY probed and responding UNHEALTHY address is correct, backend is failing -> availability problem DNS_ERROR address cannot be resolved -> configuration problem HEALTHCHECKS_OFF Kong is not probing at all -> health is UNKNOWN, not healthy Do not read HEALTHCHECKS_OFF as "fine". It means no information. RETURNS: LIMITATIONS: reports the gateway's view only, and that view is only as fresh as Kong's last probe or proxied request for this upstream. A freshly created or rebuilt target is reported HEALTHY before the first probe runs, and an idle upstream can show a stale HEALTHY for a target that is actually down. If a HEALTHY verdict contradicts other evidence (e.g. 503s), say so rather than treating it as proof the backend is up. |
| diff_configA | Compares what Kong is actually running against the declared configuration baseline in kong/seed/baseline.json, and reports every difference. USE WHEN: something is configured but behaving unexpectedly, and you need to know whether the live configuration matches what was intended. Especially effective for problems with no local symptom -- a route attached to the wrong service, a dropped HTTP method, a changed upstream address -- where the entity looks perfectly valid in isolation. Pass RETURNS: IMPORTANT: a difference does NOT establish which side is wrong. The baseline may be out of date just as easily as the gateway may have drifted. Report the difference and what it causes; do not assert that Kong is misconfigured on the strength of this tool alone. LIMITATIONS: the baseline covers services (host/port/protocol), routes (service, paths, methods, required plugins) and upstreams (targets). Plugin configuration VALUES are not compared -- only whether a required plugin is present and enabled. |
| diagnose_routeA | Runs a complete, rule-based diagnostic on one route and returns structured findings. This is the highest-value tool in this server and usually the right SECOND call, after find_route_by_path. It performs the whole investigation a careful engineer would -- resolve the route, resolve its service, collect plugins at all three scopes, check upstream target health, check the named consumer's credentials and ACL groups, compare against the declared configuration baseline -- and applies the diagnostic rules to the result. USE WHEN: the user reports a problem with a route or path. Prefer it over assembling the same picture yourself from get_route + list_plugins_for_route + check_upstream_health: it is one call instead of four, and it will not mistake "not collected" for "not present". Pass RETURNS: confidence CONFIRMED | PARTIAL | INSUFFICIENT_EVIDENCE summary one-sentence verdict findings[] each with code, severity, observedState, expectedState, evidence[], recommendedNextStep observed what Kong actually reports (route, service, effective plugins, consumer, upstream) gaps[] evidence that could not be collected, and what that prevents concluding suggestedNextSteps[] HOW TO READ IT: every finding is derived from Kong by deterministic rules -- these are facts,
not guesses. Report them as such, and cite the LIMITATIONS: inspects gateway configuration and Kong's own health verdicts only. It does not send traffic, read gateway logs, or observe live request behaviour. A backend that returns HTTP 500 on every request looks perfectly healthy here. |
| explain_auth_failureA | Focused analysis of why requests to a route are being rejected, narrowed to the authentication and authorization chain. USE WHEN: the reported symptom is specifically a 401 or 403, or the user says credentials are being rejected. For a broader or vaguer problem, use diagnose_route. Walks the chain in the order Kong evaluates it and reports where it breaks:
RETURNS: LIMITATIONS: reasons from configuration, not from observed traffic. It cannot tell you whether a client is sending a malformed header or an expired token -- only what the gateway is configured to require. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Tools target distinct Kong entities and actions, and descriptions explicitly steer between similar options such as find_route_by_path vs get_route and diagnose_route vs explain_auth_failure. However, the composite diagnostic tools overlap with the lower-level get/list tools, so an agent could still be unsure whether to assemble evidence manually or use the high-level diagnostic.
All 14 tools use consistent snake_case and a verb-first pattern (find_, list_, get_, check_, diff_, diagnose_, explain_). There are no mixed conventions or ambiguous suffixes.
14 tools is well within the expected 3–15 range for a Kong diagnostic surface. Each tool maps to a meaningful entity or check, with no obvious bloat or thin coverage.
The set covers core diagnostic paths: route resolution, service/consumer/upstream lookup, plugin scoping, health checks, config diff, and high-level diagnosis. Minor gaps remain, such as no general list_routes or get_upstream, but core route/auth troubleshooting workflows are largely complete.