DevHub CMS 模型上下文协议集成

DevHub CMS 模型上下文协议集成

通过模型上下文协议 (MCP) 实现 DevHub CMS 的 LLM 集成,用于内容管理。

快速入门

安装

确保安装了 uv 包管理器。

配置 Claude Desktop

claude_desktop_config.json 中添加以下配置:

{
    "mcpServers": {
        "devhub_cms_mcp": {
            "command": "uvx",
            "args": ["devhub-cms-mcp"],
            "env": {
                "DEVHUB_API_KEY": "YOUR_KEY_HERE",
                "DEVHUB_API_SECRET": "YOUR_SECRET_HERE",
                "DEVHUB_BASE_URL": "https://yourbrand.cloudfrontend.net"
            }
        }
    }
}

本地开发

  1. 克隆仓库:git clone git@github.com:devhub/devhub-cms-mcp.git
  2. 设置环境变量:
    export DEVHUB_API_KEY="your_api_key"
    export DEVHUB_API_SECRET="your_api_secret"
    export DEVHUB_BASE_URL="https://yourbrand.cloudfrontend.net"
    
  3. 运行:uv run main.py

测试

运行测试:

uv pip install -e ".[test]"
uv run pytest