Get the FREE Ultimate OpenClaw Setup Guide →

apisix

APISIX Model Context Protocol (MCP) server is used to bridge large language models (LLMs) with the APISIX Admin API.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio api7-apisix-mcp npx -y apisix-mcp \
  --env APISIX_ADMIN_KEY="your-apisix-api-key" \
  --env APISIX_SERVER_HOST="your-apisix-server-host" \
  --env APISIX_SERVER_PORT="your-apisix-server-port" \
  --env APISIX_ADMIN_API_PORT="your-apisix-admin-api-port" \
  --env APISIX_ADMIN_API_PREFIX="your-apisix-admin-api-prefix"

How to use

This MCP server provides a bridge between large language models (LLMs) and the APISIX Admin API, enabling natural language queries and commands to view and manage APISIX resources such as routes, services, upstreams, SSL certificates, and more. It exposes a suite of MCP-compatible actions (e.g., get_resource, create_route, update_service, delete_ssl, get_plugin_info, etc.) that your AI client can invoke to perform administrative tasks without directly speaking the Admin API. To use it, configure your MCP client (Cursor, Claude, Copilot, etc.) with the provided mcpServers settings and point it at the apisix-mcp entry, either by running via npx or by running the built Node.js bundle. Once running, you can issue natural-language prompts like “show me all routes,” “create a route for /status that returns 200,” or “update the timeout of service X,” and the MCP server will translate these requests into the corresponding APISIX Admin API calls.

You have two deployment paths: (1) Install via Smithery to run the MCP server in client environments (Claude Desktop, etc.), which uses the npx command to install and run the server; (2) Run directly from source using Node.js after building, which requires the server to be invoked with node and the built dist/index.js entry. The server also supports configuring environment variables to securely connect to your APISIX instance.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm or pnpm installed on your machine
  • Access to an APISIX instance with Admin API enabled

Option A: Install via Smithery (Claude Desktop integration)

  1. Ensure Smithery is installed and accessible
  2. Install the MCP server for Claude using Smithery:
npx -y @smithery/cli install @api7/apisix-mcp --client claude

Option B: Run using npm/npx (recommended for general usage)

  1. Ensure Node.js and npm are installed
  2. Install and run the MCP server via npx (no local install required):
npx -y apisix-mcp
  1. If you prefer to run from source, clone the repository, install dependencies, and build:
git clone https://github.com/api7/apisix-mcp.git
cd apisix-mcp
pnpm install
pnpm build
  1. Run the built server with Node.js (after build):
node dist/index.js

Configure your MCP client to point at the server using the provided mcpServers settings (see the npm usage example in the README).

Additional notes

Environment variables:

  • APISIX_SERVER_HOST: host of your APISIX instance (default http://127.0.0.1)
  • APISIX_SERVER_PORT: APISIX server port (default 9080)
  • APISIX_ADMIN_API_PORT: Admin API port (default 9180)
  • APISIX_ADMIN_API_PREFIX: Admin API prefix (default /apisix/admin)
  • APISIX_ADMIN_KEY: Admin API key for authentication

Tips:

  • Ensure your APISIX Admin API is reachable from the MCP server host, and that firewalls allow the APISIX Admin port.
  • When using npm approach, the package name to install is apisix-mcp; the command is typically npx -y apisix-mcp.
  • If you modify environment variables, restart the MCP server to apply changes.
  • The MCP server supports a broad set of operations (get_resource, create_route, update_route, delete_route, etc.) to manage resources and plugins in APISIX.
  • For large deployments, consider running the MCP server behind a reverse proxy and enabling authentication at the client side to protect Admin API access.

Related MCP Servers

Sponsor this space

Reach thousands of developers