
Bruno MCP is an MCP server that lets AI assistants (Claude, Cursor, and any other MCP-compatible client) work with your Bruno API collections.
概览
Bruno MCP is an MCP server that lets AI assistants (Claude, Cursor, and any other MCP-compatible client) work with your Bruno API collections. It exposes your requests, folders, and environments as MCP tools so an agent can discover, inspect, and run them, while your collections stay on your filesystem, right where Bruno keeps them. Bruno is an open source, offline-first API client. Collections live as plain text files in a folder, versioned with Git. Bruno MCP brings that same philosophy to AI workflows, your data never leaves your machine. A collection is addressed by its , not by an id: pass the path from list_collections as collectionPath to the other tools. If you already know where a collection lives, you can pass it directly without listing first. A request is addressed by its relativePath within the collection (e.g. users/get-user.bru).
README
以下为原文 README 节选,完整内容请查看原文。
Bruno MCP - Model Context Protocol server for Bruno
Bruno MCP is an MCP server that lets AI assistants (Claude, Cursor, and any other MCP-compatible client) work with your Bruno API collections.
It exposes your requests, folders, and environments as MCP tools so an agent can discover, inspect, and run them, while your collections stay on your filesystem, right where Bruno keeps them.
Bruno is an open source, offline-first API client. Collections live as plain text files in a folder, versioned with Git. Bruno MCP brings that same philosophy to AI workflows, your data never leaves your machine.
Tools
| Tool | Purpose |
|---|---|
list_collections |
List registered collections with their name, path, and environments. Read-only. |
list_requests |
List the requests in a collection, flattened across folders (relative path + type + method + URL); optional search and method filters. Deliberately shallow, so it stays fast on large collections. Read-only. |
get_request |
Read one request’s full definition from disk: headers, params, body, auth, scripts, tests, assertions, variables, docs, settings. Reads only, sends nothing. Read-only. |
execute_request |
Execute one request via bru run; returns status, request and response headers, the response body in full, assertions, and test results. Takes collectionPath, requestPath, optional environment and variables overrides. |
run_collection |
Run a whole collection, or a subset of requests/folders (requests), via bru run; supports iterations, a CSV/JSON dataFile, parallel, bail, and timeoutSeconds (default 600). Returns a pass/fail summary and a per-request roll-up (outcome, status, response time, failed assertions/tests); headers and bodies are left out. |
list_environments |
List a collection’s environments with their variable count and whether they contain secrets. Read-only. |
get_environment |
Read one environment’s variables (name, value, enabled, secret). Secret values come back as ``. Read-only. |
A collection is addressed by its path, not by an id: pass the path from list_collections as collectionPath to the other tools. If you already know where a collection lives, you can pass it directly without listing first. A request is addressed by its relativePath within the collection (e.g. users/get-user.bru).
What ends up in tool output
execute_request returns what the Bruno CLI reports, carrying only the CLI’s own masking:
- Request headers whose name is known to carry credentials (
Authorization,Cookie,X-Api-Key,X-Auth-Token, …) are masked; aBearer/Basicscheme is kept, the value is not. - Values the run knows to be secrets (
vars:secretin the selected environment, values from.env) are scrubbed everywhere they appear, including URLs and bodies.
安装
npx @modelcontextprotocol/inspector node /abs/path/to/dist/index.js配置
{
"mcpServers": {
"bruno": {
"command": "node",
"args": ["/abs/path/to/dist/index.js", "--collection", "/path/to/collection"]
}
}
}