Skip to main content

Apollo MCP Server

Apollo 配置中心的 MCP (Model Context Protocol) 服务,使大语言模型能够通过配置的 Apollo 地址和 Token 对 Apollo 进行查询和操作。

v1.0.0 说明:本期仅完成 Apollo 的读取能力,写入(新增/修改/删除配置、发布、回滚等)已实现接口但暂未测试,且需 Token 在 Portal 中具备相应赋权。

功能

基于 Apollo 开放平台接口文档 实现以下能力:

  • 应用与集群:list_apps、get_app_env_clusters、get_cluster、create_cluster
  • 命名空间:list_namespaces、get_namespace、create_namespace、get_namespace_lock
  • 配置项:list_items、get_item、create_item、update_item、delete_item
  • 发布与回滚:get_latest_release、publish_release、rollback_release
  • 应用创建:create_app

前提条件

  1. Apollo Portal 已部署并可访问
  2. 在 Portal 的 http://{portal_address}/open/add-consumer.html 创建第三方应用并获取 Token
  3. 在 http://{portal_address}/open/manage.html 为 Token 绑定可操作的 Namespace

安装

使用 uv(推荐)

uv pip install -e .

使用 pip

pip install -e .

配置

使用方式

apollo-mcp-server --url http://your-apollo-portal:8070 --token your_open_api_token

--url 为 Apollo Portal 根地址(不含 /openapi/v1/ 后缀),如 http://localhost:8070。

或

python -m mcp_server_apollo --url http://your-apollo-portal:8070 --token your_open_api_token

Claude Desktop 配置

在 claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "apollo": {
      "command": "uvx",
      "args": [
        "apollo-mcp-server",
        "--url",
        "http://your-apollo-portal:8070",
        "--token",
        "your_open_api_token"
      ]
    }
  }
}

若使用 pip 安装:

{
  "mcpServers": {
    "apollo": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server_apollo",
        "--url",
        "http://your-apollo-portal:8070",
        "--token",
        "your_open_api_token"
      ]
    }
  }
}

开发

# 安装依赖
pip install -e .

# 本地运行(无需安装,从项目目录)
PYTHONPATH=src python -m mcp_server_apollo --url http://localhost:8070 --token your_token

# 或安装后直接运行
apollo-mcp-server --url http://localhost:8070 --token your_token

许可证

Apache License 2.0

Release files for apollo-mcp-server 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apollo-mcp-server 1.0.0
File Size Uploaded
apollo_mcp_server-1.0.0.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apollo-mcp-server 1.0.0
File Interpreter ABI Platform
apollo_mcp_server-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / apollo_mcp_server-1.0.0.tar.gz

Download URL apollo_mcp_server-1.0.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a4b05bc9fb9a54ee7f55bcb8a00248f22a59d77ad267c85e30204e9fc1884cb4
BLAKE2b-256 checksum
How to use checksums
f217591e1b61b7bcb50d9e92aa7d8cc95bf1494cc9b014261a9a6d9d18797104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / apollo_mcp_server-1.0.0-py3-none-any.whl

Download URL apollo_mcp_server-1.0.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fead4f8b27ffc7b86796514ada8c26666ebb03ed821dd676c3c13fe555c9b8d
BLAKE2b-256 checksum
How to use checksums
89ae6dfd3afbef748b709172b5e07cf1daeef883cd4f59ece8cb2dd9105eec9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page