The Bruno MCP Server integrates Bruno CLI with the Model Context Protocol to provide API testing, collection management, and reporting capabilities through Claude.
API Testing & Execution: Run individual requests or entire collections with optional environment variables, dry-run validation without HTTP calls, and runtime configuration overrides.
Collection Management: List and inspect requests, recursively discover collections via bruno.json files, validate collection structure and syntax, and view detailed request information (method, URL, headers, body, tests) without execution.
Environment Management: List, validate, and switch between environments (dev, staging, production) with proper structure and variable definitions.
Reporting & CI/CD Integration: Generate test reports in JSON, JUnit XML, and HTML formats with interactive Vue.js interface for integration with Jenkins, GitHub Actions, and GitLab CI.
Monitoring & Diagnostics: Health checks with server status verification, Bruno CLI availability, performance metrics tracking, and cache statistics.
Security: Path validation against directory traversal, input sanitization for command injection protection, secret masking in logs/outputs, and environment validation for safe variable characters.
Provides integration with Bruno CLI for API testing and collection management, including running individual requests or entire collections, managing environments, generating test reports in multiple formats (JSON, JUnit, HTML), validating collections, and introspecting request configurations.
Bruno MCP Server
A Model Context Protocol (MCP) server that integrates Bruno CLI for API testing and collection management. Execute API tests, validate collections, and generate reports through the Model Context Protocol.
Features
π Run API Tests - Execute individual requests or entire collections
π Request Introspection - Inspect request details without execution
β Validation - Validate collections and environments
π Report Generation - JSON, JUnit XML, and HTML reports
π Environment Management - List, validate, and switch environments
π Collection Discovery - Recursive search for Bruno collections
π§ͺ Dry Run Mode - Validate without making HTTP calls
π Security - Path validation, input sanitization, secret masking
β‘ Performance - Request caching and execution metrics
π₯ Health Monitoring - Server health checks with detailed diagnostics
Quick Start
Prerequisites
Node.js 20 or higher
Bruno collections (
.brufiles)
π What is Bruno MCP Server?
The Bruno MCP Server integrates the Bruno CLI (an open-source API client) with the Model Context Protocol (MCP) to enable direct API testing, collection management, and reporting via Claude.
Bruno stores its collections as human-readable .bru files in your filesystem, allowing for seamless integration with version control (Git).
π Key Capabilities
API Execution - Run individual requests or full test collections
Validation - Perform schema and environment validation (including a dry run mode without making HTTP calls)
Discovery - Recursively locate Bruno collections across specified directories
Environment Management - List and validate specific environments within a collection (e.g.,
dev,staging,production)Reporting - Generate comprehensive reports in JSON, JUnit XML, or HTML formats
π‘ Sample Prompts
Goal | Sample Prompt |
Discovery | "Find all Bruno collections in my projects directory at
" |
Request Execution | "Run the 'Get User' request from
using the 'dev' environment" |
Validation (Dry Run) | "Validate the 'Create User' request from
without making the HTTP call" |
Full Run & Reporting | "Run all tests in my API collection at
and generate HTML and JSON reports in
" |
Environment Check | "List all environments in
and validate the 'production' environment" |
π₯ Installation (Claude CLI)
Option 1: Using Claude MCP Add (Recommended)
The simplest method is using the claude mcp add command, which automatically installs the server and configures the MCP transport.
Scope | Command |
Global (personal use) |
|
Project-Scoped (team projects) |
|
Note: The
--transport stdioflag and the--separator are required. The-yflag automatically accepts npx prompts.
Option 2: Manual Installation
Install the package globally:
Add to your Claude CLI configuration file:
Global config:
~/.claude.jsonProject config:
.claude.json(in your project root)
Restart your Claude CLI session
β Verification
To confirm the server is installed correctly, check the appropriate configuration file:
You should see the "bruno" server listed under mcpServers.
Test the installation by starting a new Claude CLI session and trying:
Available Tools
1. bruno_run_request - Execute a Single Request
2. bruno_run_collection - Execute a Collection
3. bruno_list_requests - List All Requests
4. bruno_discover_collections - Find Collections
5. bruno_list_environments - List Environments
6. bruno_validate_environment - Validate Environment
7. bruno_get_request_details - Inspect Request
8. bruno_validate_collection - Validate Collection
9. bruno_health_check - Health Diagnostics
Dry Run Mode
Validate request configuration without executing HTTP calls:
Output:
Report Generation
Generate test reports in multiple formats:
JSON: Detailed results for programmatic processing
JUnit XML: CI/CD integration (Jenkins, GitHub Actions, GitLab CI)
HTML: Interactive report with Vue.js interface
Configuration
Create bruno-mcp.config.json in your project root or home directory:
See bruno-mcp.config.example.json for all options.
Development
Project Structure
Test Coverage
Overall Coverage: 91.04%
Handler Coverage: 99.72% (9/9 handlers)
Formatter Coverage: 98.74%
Total Tests: 362 passing
Test Types: Unit, Integration, E2E
Security Features
Path Validation: Prevents directory traversal attacks
Input Sanitization: Protects against command injection
Secret Masking: Automatically masks sensitive data in logs
Environment Validation: Validates variables for safe characters
Troubleshooting
Installation Issues
Error: "missing required argument 'commandOrUrl'"
Make sure you include
--transport stdioand--separatorCorrect:
claude mcp add --transport stdio bruno -- npx -y bruno-mcp-serverWrong:
claude mcp add bruno-mcp-server
MCP Server Not Showing Up in Claude
Verify installation:
cat ~/.claude.json(or project's.claude.jsonif using--scope project)Restart Claude Desktop/CLI after installation
Check the server is configured correctly in the JSON file
npx Prompts During Installation
Always use the
-yflag:npx -y bruno-mcp-serverThis auto-accepts installation prompts
Bruno CLI Not Found
Collection Not Found
Use absolute paths
Verify
bruno.jsonexists in collection directoryCheck file permissions
Permission Issues
Ensure read access to Bruno collections
Verify server can execute Bruno CLI
Documentation
Contributing
Contributions welcome! Please submit issues or pull requests.
License
MIT Β© Juan Ruiz