APISIX-MCP

Official
by api7

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Apache APISIX to enable natural language-based interaction for viewing and managing API gateway resources including routes, services, upstreams, SSL certificates, plugins, and security configurations through the APISIX Admin API.

  • Provides installation and deployment through npm, allowing users to easily set up the MCP server using 'npx -y apisix-mcp' with configurable environment variables.

  • Supports installation and build processes using pnpm package manager when deploying from source code, with commands for dependency installation and project building.

APISIX モデルコンテキストプロトコル (MCP) サーバー

APISIXモデルコンテキストプロトコル(MCP)サーバーは、大規模言語モデル(LLM)とAPISIX管理APIを連携させるために使用されます。MCP対応のAIクライアントを介して、APISIX内のリソースの表示と管理を自然言語ベースで実現することを目的としています。

https://github.com/user-attachments/assets/081e878c-225e-4ff8-a9c5-5813f4784cfe

サポート業務

一般的な操作

  • get_resource : タイプ(ルート、サービス、アップストリームなど)別にリソースを取得します。
  • delete_resource : IDでリソースを削除する
  • send_request_to_gateway : APISIXゲートウェイにリクエストまたは複数のリクエストを送信する

APIリソース操作

  • create_route / update_route / delete_route : ルートを管理する
  • create_service / update_service / delete_service : サービスの管理
  • create_upstream / update_upstream / delete_upstream : アップストリームの管理
  • create_ssl / update_ssl / delete_ssl : SSL証明書を管理する
  • create_or_update_proto : protobuf定義を管理する
  • create_or_update_stream_route : ストリームルートを管理する

プラグイン操作

  • get_all_plugin_names : 利用可能なすべてのプラグイン名を取得する
  • get_plugin_info / get_plugins_by_type / get_plugin_schema : プラグインの設定を取得する
  • create_plugin_config / update_plugin_config : プラグインの設定を管理する
  • create_global_rule / update_global_rule : プラグインのグローバルルールを管理する
  • get_plugin_metadata / create_or_update_plugin_metadata / delete_plugin_metadata : プラグインのメタデータを管理する

セキュリティ構成

  • get_secret_by_id / create_secret / update_secret : シークレットを管理する
  • create_or_update_consumer / delete_consumer : コンシューマーを管理する
  • get_credential / create_or_update_credential / delete_credential /: 消費者の資格情報を管理する
  • create_consumer_group / delete_consumer_group : コンシューマーグループを管理する

AIクライアントでの構成

前提条件

APISIX をセットアップして実行するには、APISIXスタートガイドに従ってください。

Smithery経由でインストール

Smithery経由で Claude Desktop 用の APISIX モデル コンテキスト プロトコル サーバーを自動的にインストールするには:

npx -y @smithery/cli install @api7/apisix-mcp --client claude

npmの使用

AI クライアント (Cursor、Claude、Copilot など) を次の設定で構成します。

{ "mcpServers": { "apisix-mcp": { "command": "npx", "args": [ "-y", "apisix-mcp" ], "env": { "APISIX_SERVER_HOST": "your-apisix-server-host", "APISIX_SERVER_PORT": "your-apisix-server-port", "APISIX_ADMIN_API_PORT": "your-apisix-admin-api-port", "APISIX_ADMIN_API_PREFIX": "your-apisix-admin-api-prefix", "APISIX_ADMIN_KEY": "your-apisix-api-key" } } } }

ソースコードの使用

まず、apisix-mcp リポジトリをクローンします。

git clone https://github.com/api7/apisix-mcp.git cd apisix-mcp

依存関係をインストールしてプロジェクトをビルドします。

pnpm install pnpm build

AI クライアント (Cursor、Claude、Copilot など) を次の設定で構成します。

{ "mcpServers": { "apisix-mcp": { "command": "node", "args": [ "your-apisix-mcp-path/dist/index.js" ], "env": { "APISIX_SERVER_HOST": "your-apisix-server-host", "APISIX_SERVER_PORT": "your-apisix-server-port", "APISIX_ADMIN_API_PORT": "your-apisix-admin-api-port", "APISIX_ADMIN_API_PREFIX": "your-apisix-admin-api-prefix", "APISIX_ADMIN_KEY": "your-apisix-api-key" } } } }

環境変数

変数説明デフォルト値
APISIX_SERVER_HOSTAPISIXサーバーにアクセスできるホストhttp://127.0.0.1
APISIX_SERVER_PORTAPISIX サーバーポート9080
APISIX_ADMIN_API_PORT管理APIポート9180
APISIX_ADMIN_API_PREFIX管理APIプレフィックス/apisix/admin
APISIX_ADMIN_KEY管理API認証キーedd1c9f034335f136f87ad84b625c8f1

APISIX で管理 API 構成を表示または変更するには、管理 APIドキュメントを参照してください。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

APISIX モデル コンテキスト プロトコル (MCP) サーバーは、大規模言語モデル (LLM) と APISIX 管理 API を橋渡しします。

  1. Support Operations
    1. Common Operations
    2. API Resources Operations
    3. Plugin Operations
    4. Security Configuration
  2. Configuration in AI client
    1. Prerequisite
    2. Installing via Smithery
    3. Using npm
    4. Using source code
  3. Environment Variables

    Appeared in Searches

    ID: s62o271u37