antgroup / antgroup/YASA-Engine
[OSS26] MCP 服务框架脚手架 bootstrap_mcp_framework
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
接口介绍
为 YASA 对外开放的所有 MCP 工具搭建一个统一的 Server 框架,提供 tool 注册机制、传输模式(stdio / streamable-http)、入参校验、错误处理、日志与健康检查,作为后续所有 MCP 工具的运行底座。
工具名
bootstrap_mcp_framework
注:这是一个项目骨架任务,不是 MCP tool 本身,而是为后续 14 个 tool 提供运行底座。
背景与目标
YASA 计划对外开放一组程序分析能力作为 MCP(Model Context Protocol)服务,需要先有一个统一的 MCP Server 框架。这个任务的目标是:
- 选定 MCP SDK(推荐 Python
fastmcp或官方mcp包),搭建可启动的 MCP Server 进程 - 完成
stdio和streamable-http两种传输模式的入口 - 提供 tool 注册机制(装饰器或注册表),后续 tool 开发者只需写 tool 函数本身
- 提供统一的入参校验、错误处理、日志、健康检查
- 完成 README,讲清如何本地启动、如何在 Claude Desktop / Cline 等 client 里配置使用
输入参数
启动参数(命令行 / 环境变量),非 MCP tool 入参:
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
--transport |
enum(stdio, http) | 否 | stdio | 传输模式 |
--port |
int | 否 | 8765 | http 模式监听端口 |
--log-level |
enum(debug, info, warn, error) | 否 | info | 日志级别 |
YASA_MCP_REPO_ROOT |
env | 是 | — | 被分析的代码仓库根目录 |
输出结构
不直接产生 tool 输出,而是为后续 tool 提供运行时。一个最小可用 demo tool ping 应返回:
{
"status": "ok",
"server_name": "yasa-mcp",
"version": "0.1.0",
"transports_supported": ["stdio", "streamable-http"]
}
验收标准
-
python -m yasa_mcp --transport stdio能启动并通过 MCP inspector 通信 -
python -m yasa_mcp --transport http --port 8765能启动 HTTP 服务,GET /healthz返回 200 - 注册一个 demo tool
ping,在 Claude Desktop / Cline 客户端中可被发现并调用 - README 包含至少一个 Claude Desktop 配置示例(
claude_desktop_config.json片段) - 单元测试覆盖:tool 注册、参数校验失败、日志输出格式
预估工作量
2-3 人日(熟悉 MCP 协议的同学 1 人日即可)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository layout and the proposed Python MCP SDK options, then trace the python -m yasa_mcp entry point requirements for stdio and HTTP modes. Done means the startup commands work, /healthz responds, ping is discoverable, README client configuration exists, and tests cover registration, validation failures, and log formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100