bru-mcp
Provides tools for discovering, inspecting, and executing Bruno API collections through the MCP protocol.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bru-mcplist all requests in the current Bruno collection"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bru-mcp
An MCP (Model Context Protocol) server that exposes the Bruno CLI (bru) as tools for AI agents. It allows agents like Claude, GitHub Copilot, and others to discover, inspect, and execute Bruno API collections directly through the MCP protocol.
Requirements
Install the Bruno CLI globally if you haven't already:
npm install -g @usebruno/cliRelated MCP server: Bruno MCP
Installation
Option A — Clone and build
git clone https://github.com/h-mergel/bru-mcp.git
cd bru-mcp
npm install
npm run buildOption B — Install globally from the cloned repo
After cloning and building, install the bru-mcp binary globally so it is available on your PATH:
npm install -g .This makes bru-mcp available as a standalone command, which simplifies the MCP configuration (see below).
MCP Configuration
Add bru-mcp as an MCP server in your client's configuration. The server communicates over stdio.
Via npx — no local clone needed (recommended)
Since the compiled output is included in the repository, you can run bru-mcp directly from GitHub without cloning or building manually:
{
"mcpServers": {
"bru-mcp": {
"command": "npx",
"args": ["github:h-mergel/bru-mcp"]
}
}
}Via global install
If you installed with npm install -g .:
{
"mcpServers": {
"bru-mcp": {
"command": "bru-mcp"
}
}
}Via local path
If you cloned the repository and prefer a direct path:
{
"mcpServers": {
"bru-mcp": {
"command": "node",
"args": ["/absolute/path/to/bru-mcp/dist/src/index.js"]
}
}
}Claude Desktop
The configuration file is located at:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
OpenCode
Add the server to your OpenCode MCP configuration (.opencode/config.json or the global config). Any of the three snippets above works.
Tools
The server exposes four tools. For single-collection setups, auto-detection runs automatically — just call bru_list_requests, bru_run, or bru_run_collection directly and the collection is resolved from the current working directory. Use bru_find_collections only when multiple collections are present or auto-detection fails.
bru_find_collections
Recursively scans a directory for Bruno collections (identified by bruno.json files). Use this only when working with multiple collections or when auto-detection fails.
Parameter | Type | Required | Description |
| string | No | Directory to search from. Defaults to the current working directory. |
Returns: A list of collection paths, their available environments, and the number of requests in each.
bru_list_requests
Lists all .bru request files in a collection, grouped by folder. Also shows available environments. The collection is auto-detected if collectionPath is omitted.
Parameter | Type | Required | Description |
| string | No | Path to the Bruno collection directory (the folder containing |
| string | No | Directory to search for a Bruno collection. Checks well-known subdirectories ( |
Returns: A grouped list of requests and available environments, plus a structured JSON representation.
bru_run
Runs a specific request file or folder within a collection using the bru CLI. The collection is auto-detected if collectionPath is omitted.
Parameter | Type | Required | Description |
| string | No | Path to the Bruno collection directory. Reuse from a previous response to skip auto-detection. Takes precedence over |
| string | No | Directory to search for a Bruno collection. Defaults to the current working directory. |
| string | Yes | Relative path to a |
| string | No | Environment name to use (e.g. |
| object | No | Key-value pairs to override environment variables (e.g. |
| boolean | No | Run requests in subfolders recursively. Default: |
| boolean | No | Allow insecure (self-signed) TLS connections. Default: |
| boolean | No | Only run requests that have tests or assertions. Default: |
| boolean | No | Stop after the first failing request. Default: |
| string[] | No | Only run requests with these tags. |
| string[] | No | Exclude requests with these tags. |
| boolean | No | Enable verbose output. Default: |
Returns: The full CLI output, the constructed command, and parsed JSON results if available.
bru_run_collection
Runs all requests in a collection recursively. Supports tag filtering and all the same options as bru_run (except target and recursive, which are implicit). The collection is auto-detected if collectionPath is omitted.
Parameter | Type | Required | Description |
| string | No | Path to the Bruno collection directory. Reuse from a previous response to skip auto-detection. Takes precedence over |
| string | No | Directory to search for a Bruno collection. Defaults to the current working directory. |
| string | No | Environment name to use. |
| object | No | Key-value pairs to override environment variables. |
| string[] | No | Only run requests with these tags. |
| string[] | No | Exclude requests with these tags. |
| boolean | No | Allow insecure TLS connections. Default: |
| boolean | No | Only run requests that have tests. Default: |
| boolean | No | Stop after first failure. Default: |
| boolean | No | Enable verbose output. Default: |
Returns: A summary with total/passed/failed/skipped counts, the full CLI output, and parsed JSON results.
Development
# Compile TypeScript to dist/
npm run build
# Watch mode (recompiles on changes)
npm run dev
# Run tests (builds first)
npm testProject structure
bru-mcp/
├── src/
│ ├── helpers.ts # Pure helper functions (collection discovery, arg building, JSON extraction)
│ └── index.ts # MCP server setup and tool definitions
├── test/
│ ├── helpers.test.ts # Unit tests for all helper functions
│ └── fixtures/ # Static Bruno collections used by tests
├── dist/src/ # Compiled output (committed to repo for npx usage)
├── package.json
├── tsconfig.json
├── AGENTS.md
├── LICENSE
└── README.mdRunning tests
Tests use the built-in node:test runner and run against the compiled output in dist/. No additional test framework is needed.
npm testContributing
After making changes to the source code:
# 1. Run tests — must all pass before committing
npm test
# 2. Stage the updated compiled output along with the source changes
git add src/ dist/src/
# 3. Commit and push
git commit -m "..."
git pushThe compiled dist/src/ is committed to the repository so that users can run the server via npx github:h-mergel/bru-mcp without a local build step.
Security notes
Path traversal: The
targetparameter inbru_runis validated to ensure it cannot escape the collection directory (e.g.../../etc/passwdis rejected).Shell injection: The
bruprocess is spawned without a shell on Linux/macOS (shell: trueis only enabled on Windows where.cmdwrappers require it), so shell metacharacters in arguments are not interpreted.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/h-mergel/bru-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server