返回市场
布鲁诺-mcp

布鲁诺-mcp

作者:hungthai140132 星标更新:2025-08-16

项目介绍

【技术文档摘要】: MseeP.ai 安全评估徽章

Bruno MCP 服务器

<a href="https://glama.ai/mcp/servers/@hungthai1401/bruno-mcp"> <img width="380" height="200" src="https://gips3.baidu.com/it/u=2295171772,3077526784&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Bruno MCP 服务器" /> </a>

信任评分 smithery 徽章

这是一个MCP(模型上下文协议)服务器,支持运行Bruno集合。该服务器允许LLMs通过Bruno执行API测试,并通过标准化接口获取详细的测试结果。

特性

  • 使用Bruno CLI运行Bruno集合
  • 支持环境文件
  • 支持环境变量
  • 详细的测试结果包括:
    • 总体成功/失败状态
    • 测试摘要(总数、通过数、失败数)
    • 详细的失败信息
    • 执行时间

安装

通过Smithery安装

要通过Smithery自动安装Bruno MCP服务器到Claude桌面:

npx -y @smithery/cli install @hungthai1401/bruno-mcp --client claude

手动安装

# 安装依赖
npm install

# 构建项目
npm run build

配置

在Claude桌面配置文件~/Library/Application Support/Claude/claude_desktop_config.json中添加服务器:

{
  "mcpServers": {
    "bruno-runner": {
      "command": "npx",
      "args": ["-y", "bruno-mcp"],
    }
  }
}

可用工具

run-collection

运行一个Bruno集合并返回测试结果。

参数:

  • collection(必需):Bruno集合的路径
  • environment(可选):环境文件的路径
  • variables(可选):键值对形式的环境变量

示例响应:

{
  "success": true,
  "summary": {
    "total": 5,
    "failed": 0,
    "passed": 5
  },
  "failures": [],
  "timings": {
    "started": "2024-03-14T10:00:00.000Z",
    "completed": "2024-03-14T10:00:01.000Z",
    "duration": 1000
  }
}

在Claude中的示例用法

您可以在Claude中使用此服务器来运行Bruno集合:

"运行位于/path/to/collection.bru的Bruno集合,并告诉我所有测试是否都通过了"

Claude将:

  1. 使用run-collection工具
  2. 分析测试结果
  3. 提供执行的人类友好的总结

开发

项目结构

src/
  ├── index.ts           # 入口点
  ├── server.ts          # MCP服务器实现
  ├── runner.ts          # Bruno运行器实现
  └── types.ts           # 类型定义

运行测试

# 运行测试
npm test

# 运行带有覆盖率的测试
npm test:coverage

构建

# 构建项目
npm run build

# 清理构建产物
npm run clean

许可证

MIT