Skip to main content

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.

  1. Install Bruno CLI using npm
npm install -g @usebruno/cli
  1. 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.

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

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:

  1. Define the variable in a Bruno environment file (even as an empty string):
    vars {
      postId:
    }
    
  2. Pass variable_overrides when calling the tool. For example, if you have a .bru file with the URL https://api.example.com/posts/{{postId}} and an environment called dev that defines postId, 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

bruno_mcp-0.1.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bruno_mcp-0.1.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file bruno_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: bruno_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for bruno_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2526eea53eeb4e1ac18acf8c4d69c7f0fd1d432d67a9c2831dce2311db32c419
MD5 f1d2e0d142e5ebd503fc0af706a1d613
BLAKE2b-256 fad272542f67d8aa6c31d0ba90675f946de07bce5468eea286d20238e1c60391

See more details on using hashes here.

File details

Details for the file bruno_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: bruno_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for bruno_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0435f926f1e79d2644fa9a9d498705c9a7da286041dc03c76b15b5450d1233
MD5 daed99d656c76d1abd15f4ea329aec6b
BLAKE2b-256 29a307cb6758558750e08c79aaf211574de31ddec722faa3b64534df7c7d81e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page