Apache APISIX is a high-performance, cloud-native API gateway built on NGINX and etcd. It handles routing through a declarative configuration model: routes define how traffic flows, upstreams define where it flows to, and consumers define who can access it. The Naftiko capability for Apache APISIX exposes this configuration model as MCP tools, giving AI agents direct access to the gateway control plane.
What the Capability Covers
The apisix-gateway-config capability wraps the APISIX Admin API and covers the three core configuration objects — routes, upstreams, and consumers — with full CRUD operations.
MCP Tools Available
list-routes, create-route, update-route, delete-route, list-upstreams, create-upstream, list-consumers, create-consumer
Capability Specification
naftiko: 1.0.0-alpha1
info:
label: Apache APISIX Gateway Configuration
description: Unified capability for configuring and managing Apache APISIX API gateway resources including routes, upstreams, services, consumers, and SSL certificates.
tags:
- Apache APISIX
- API Gateway
- Configuration
- Cloud Native
- Traffic Management
binds:
- namespace: env
keys:
APISIX_ADMIN_KEY: APISIX_ADMIN_KEY
capability:
consumes:
- namespace: apisix-admin
type: http
baseUri: http://localhost:9180
authentication:
type: api-key
in: header
name: X-API-KEY
value: ""
resources:
- name: routes
path: "/apisix/admin/routes/{id}"
operations:
- name: list-routes
method: GET
- name: create-route
method: POST
- name: upstreams
path: "/apisix/admin/upstreams/{id}"
operations:
- name: list-upstreams
method: GET
- name: create-upstream
method: POST
- name: consumers
path: "/apisix/admin/consumers/{username}"
operations:
- name: list-consumers
method: GET
exposes:
- type: mcp
port: 9090
namespace: apisix-gateway-mcp
transport: http
description: MCP server for AI-assisted APISIX gateway configuration.
tools:
- name: list-routes
description: List all configured routes in the APISIX gateway.
hints:
readOnly: true
call: apisix-admin.list-routes
outputParameters:
- type: object
mapping: $.
- name: create-route
description: Create a new traffic routing rule in APISIX.
hints:
readOnly: false
destructive: false
idempotent: false
call: apisix-admin.create-route
outputParameters:
- type: object
mapping: $.
- name: list-upstreams
description: List all backend upstream service definitions.
hints:
readOnly: true
call: apisix-admin.list-upstreams
outputParameters:
- type: object
mapping: $.
- name: create-upstream
description: Create a new backend upstream for load balancing.
hints:
readOnly: false
destructive: false
idempotent: false
call: apisix-admin.create-upstream
outputParameters:
- type: object
mapping: $.
- name: list-consumers
description: List all API consumer identities registered in APISIX.
hints:
readOnly: true
call: apisix-admin.list-consumers
outputParameters:
- type: object
mapping: $.
Running It
docker pull ghcr.io/naftiko/framework:latest
# Set APISIX_ADMIN_KEY in your .env file
docker run -p 9090:9090 \
-v ./capabilities/apisix-gateway-config.yaml:/app/capability.yaml \
--env-file .env \
ghcr.io/naftiko/framework:latest /app/capability.yaml
An AI agent can list all routes to understand current traffic patterns, identify upstreams that need reconfiguring, or create new consumers as part of an access provisioning workflow. The Apache APISIX capability is part of the Naftiko Fleet.