
hungthai1401/bruno-mcp 是从 https://github.com/hungthai1401/bruno-mcp. 导入的 MCP 服务器候选。
概览
hungthai1401/bruno-mcp 是从 https://github.com/hungthai1401/bruno-mcp. 导入的 MCP 服务器候选。
概述(AI 翻译)
一个MCP(模型上下文协议)服务器,支持运行Bruno集合。该服务器允许LLM使用Bruno执行API测试,并通过标准化接口获得详细结果。
特色
- 使用 Bruno CLI 运行 Bruno 集合
- 环境文件支持
- 支持环境变量
- 详细测试结果包括:
- 整体成功/失败状态
- 考试摘要(总成绩、通过、未通过)
- 详细故障信息
- 执行时间
安装
通过Smithery安装
通过 Smithery 自动安装 Bruno MCP Server for Claude Desktop:
手动安装
配置
将服务器添加到您的 Claude 桌面配置文件中,地址为 ~/Library/Application Support/Claude/claude_desktop_config.json:
可用工具
跑-收集
运行Bruno采集并返回检测结果。
参数:
collection(需要):通往布鲁诺收藏的路径environment(可选):环境文件的路径variables(可选):环境变量作为键值对
示例回应:
Claude 中的示例用法
你可以在 Claude 里让服务器运行 Bruno 集合:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Bruno MCP Server
An MCP (Model Context Protocol) server that enables running Bruno collections. This server allows LLMs to execute API tests using Bruno and get detailed results through a standardized interface.
Features
- Run Bruno collections using the Bruno CLI
- Support for environment files
- Support for environment variables
- Detailed test results including:
- Overall success/failure status
- Test summary (total, passed, failed)
- Detailed failure information
- Execution timings
Installation
Installing via Smithery
To install Bruno MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hungthai1401/bruno-mcp --client claude
Manual Installation
# Install dependencies
npm install
# Build the project
npm run build
Configuration
Add the server to your Claude desktop configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"bruno-runner": {
"command": "npx",
"args": ["-y", "bruno-mcp"],
}
}
}
Available Tools
run-collection
Runs a Bruno collection and returns the test results.
Parameters:
collection(required): Path to the Bruno collectionenvironment(optional): Path to environment filevariables(optional): Environment variables as key-value pairs
Example Response:
{
"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
}
}
Example Usage in Claude
You can use the server in Claude by asking it to run a Bruno collection:
“Run the Bruno collection at /path/to/collection.bru and tell me if all tests passed”
Claude will:
- Use the run-collection tool
- Analyze the test results
- Provide a human-friendly summary of the execution
Development
Project Structure
src/
├── index.ts # Entry point
├── server.ts # MCP Server implementation
├── runner.ts # Bruno runner implementation
└── types.ts # Type definitions
Running Tests
# Run tests
npm test
# Run tests with coverage
npm test:coverage
安装
npx -y bruno-mcp配置
{
"mcpServers": {
"bruno-runner": {
"command": "npx",
"args": ["-y", "bruno-mcp"],
}
}
}