MCP 报告生成工具
一个生成 Model Context Protocol 服务器功能报告的实用工具,帮助开发者快速了解生态系统。
快速入门
安装
- 克隆仓库:
git clone https://github.com/cyanheads/mcp-reporter.git
- 进入目录:
cd mcp-reporter
- 安装依赖:
npm install
- 构建项目:
npm run build
配置
复制示例配置文件:cp mcp-servers.json.example mcp-servers.json
,然后编辑以定义目标服务器。
使用
运行以下命令生成报告:
- 默认设置:
npm run start
- 或通过软链:
mcp-reporter
示例代码
可编程使用:
import { McpReporter } from "mcp-reporter";
async function generateReport() {
const reporter = new McpReporter("./my-config.json", {
outputPath: "./reports/mcp-report.md",
includeInputSchemas: true,
includeServerMetadata: true,
});
await reporter.run();
}
generateReport().catch(console.error);
输出
报告将保存在 output/mcp_server_report.md
中,默认包含服务器元数据、工具和资源列表。