ESA MCP Server

ESA MCP Server

用于Claude Desktop的ESA.io模型上下文协议服务器。

概述

ESA MCP Server 是一个将 esa.io 数据以 Model Context Protocol (MCP) 格式提供的服务器,专为 Cloud Desktop 环境设计。

安装

# 克隆仓库
git clone https://github.com/sou-lab/esa-mcp-server.git
cd esa-mcp-server

# 安装依赖
npm install

# 添加执行权限
chmod +x bin/cli.js

# 可选:全局安装
npm install -g .

配置

首次启动时,系统会要求输入:

  • esa.io API 密钥
  • esa.io 团队名
  • 服务器端口号(默认: 3000)

配置会保存在 ~/.esa-mcp-server/config.json

使用方法

# 全局安装后
esa-mcp-server

# 或直接运行
node bin/cli.js

API 端点

  • GET / - 欢迎页面
  • GET /mcp-data - 获取 MCP 格式的 ESA 数据
  • POST /search - 搜索 ESA 数据

示例查询:

curl -X POST http://localhost:3000/search \
  -H "Content-Type: application/json" \
  -d '{"query":"项目A"}'

Claude Desktop 集成

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "esa": {
      "command": "/path/to/node",
      "args": [
        "/path/to/esa-mcp-server/bin/cli.js"
      ],
      "env": {
        "ESA_API_KEY": "您的ESA API密钥",
        "ESA_TEAM_NAME": "您的团队名称",
        "PORT": "3000"
      }
    }
  }
}

command 路径可通过 which node 命令查找

许可证

ISC