MCP server for Bruno API collections
Project description
Bruno MCP
MCP server for Bruno API collections that executes requests via the Bruno CLI tool.
Prerequisites
1. Install Bruno CLI
The Bruno CLI tool (bru) must be installed and available in your PATH.
- Install Bruno CLI using npm
npm install -g @usebruno/cli
- Verify installation:
bru --version
2. Install uv (recommended)
uv is the recommended way to install and run bruno-mcp. It includes uvx, which handles package installation and execution automatically.
curl -LsSf https://astral.sh/uv/install.sh | sh
Setup
MCP Configuration (uvx)
Configure the MCP server by adding an entry to your IDE. For Cursor, create or edit the configuration file at ~/.cursor/mcp.json:
{
"mcpServers": {
"bruno-mcp": {
"command": "uvx",
"args": ["bruno-mcp"],
"env": {
"BRUNO_COLLECTION_PATH": "/path/to/your/bruno/collection"
}
}
}
}
The only configuration required is BRUNO_COLLECTION_PATH, which should point to your Bruno collection directory. To load multiple collections, separate paths with : (Unix/Mac) or ; (Windows), e.g. BRUNO_COLLECTION_PATH="/path/to/collection1:/path/to/collection2".
Alternative: Run Server Manually
If you prefer not to use uvx, you can clone the repository and run the server directly:
git clone https://github.com/jackmulligan-ire/bruno-mcp.git
cd bruno-mcp
uv sync
Then configure your MCP client with the full paths:
{
"mcpServers": {
"bruno-mcp": {
"command": "/path/to/bruno-mcp/.venv/bin/python",
"args": ["-m", "bruno_mcp"],
"cwd": "/path/to/bruno-mcp",
"env": {
"BRUNO_COLLECTION_PATH": "/path/to/your/bruno/collection",
"PYTHONPATH": "/path/to/bruno-mcp/src"
}
}
}
}
After updating the configuration file, enable the server in your IDE's MCP settings.
Usage Notes
Multiple Collections
When BRUNO_COLLECTION_PATH contains multiple paths (separated by : on Unix/Mac or ; on Windows), the server loads all collections at startup. The first path is the initial active collection. Use the list_collections tool or bruno://collections resource to see available collections, and set_active_collection to switch which collection tools operate on.
Variable Overrides
The run_request_by_id tool accepts a variable_overrides parameter that maps to the Bruno CLI's --env-var flag. This allows you to substitute {{variable}} placeholders in your .bru files at runtime.
Important limitation: --env-var can only override variables that are already defined in a Bruno environment. It cannot introduce new variables, or replace the values of pre-request and post-request variables. If a variable is not defined in any environment, the override will be silently ignored and the placeholder will resolve to an empty string.
To use variable overrides:
- Define the variable in a Bruno environment file (even as an empty string):
vars { postId: } - Pass
variable_overrideswhen calling the tool. For example, if you have a.brufile with the URLhttps://api.example.com/posts/{{postId}}and an environment calleddevthat definespostId, you would call:variable_overrides:{"postId": "42"}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bruno_mcp-0.2.0.tar.gz.
File metadata
- Download URL: bruno_mcp-0.2.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c1375d0062c649b807ab5ba67408efa8ee87d31e72697b6b094091696253b05
|
|
| MD5 |
a4633ba153b2a309c9b493717a581298
|
|
| BLAKE2b-256 |
2cc1eb8ffe971be62c85609fd711ae732b2c4b358165281f41d364d822bb33f5
|
File details
Details for the file bruno_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: bruno_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a8f33abe4ce1fef3b5cb1df5801d6f5be9675075926bbea2615c3f70cb13bda
|
|
| MD5 |
fcf52d92ac036ae0f94f4939a6f19be7
|
|
| BLAKE2b-256 |
697d4a9ab033423930034482b55f6d69f2cb36d62eb51cf4858c0ee22fde5279
|