Skip to main content
Glama
macarthy

Bruno MCP Server

by macarthy

Bruno MCP Server

A Model Context Protocol (MCP) server for generating Bruno API testing files programmatically.

Overview

Bruno MCP Server enables you to create, manage, and generate Bruno API testing collections, environments, and requests through standardized MCP tools. This allows for automated setup of API testing workflows and integration with Claude and other MCP-compatible clients.

Related MCP server: Bruno MCP

Features

  • 📁 Collection Management: Create and organize Bruno collections

  • 🌍 Environment Configuration: Manage multiple environments (dev, staging, prod)

  • 🔧 Request Generation: Generate .bru files for all HTTP methods

  • 🔐 Authentication Support: Bearer tokens, Basic auth, OAuth 2.0, API keys

  • 📝 Test Scripts: Add pre/post request scripts and assertions

  • 🔄 CRUD Operations: Generate complete CRUD request sets

  • 📊 Collection Statistics: Analyze existing collections

Installation

# Clone the repository
git clone https://github.com/macarthy/bruno-mcp.git
cd bruno-mcp

# Install dependencies
npm install

# Build the project
npm run build

Client Integration

The Bruno MCP Server can be integrated with various AI clients that support the Model Context Protocol:

Quick Setup for Claude Desktop

  1. Edit Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add Bruno MCP Server:

    {
      "mcpServers": {
        "bruno-mcp": {
          "command": "node",
          "args": ["/absolute/path/to/bruno-mcp/dist/index.js"],
          "env": {}
        }
      }
    }
  3. Restart Claude Desktop

Supported Clients

  • Claude Desktop App - Full support

  • Claude Code (VS Code) - Full support

  • Continue - Tools and resources

  • Cline - Tools and resources

  • LM Studio - Tools support

  • MCP Inspector - Development/testing

  • Custom MCP Clients - via SDK

📖 For detailed integration instructions with all clients, see INTEGRATION.md

Usage

With Claude Code or MCP Inspector

  1. Start the MCP server:

npm start
  1. Use the MCP Inspector to test tools:

npx @modelcontextprotocol/inspector

Available MCP Tools

create_collection

Create a new Bruno collection with configuration.

Parameters:

  • name (string): Collection name

  • description (string, optional): Collection description

  • baseUrl (string, optional): Default base URL

  • outputPath (string): Directory to create collection

  • ignore (array, optional): Files to ignore

Example:

{
  "name": "my-api-tests",
  "description": "API tests for my application", 
  "baseUrl": "https://api.example.com",
  "outputPath": "./collections"
}

create_environment

Create environment configuration files.

Parameters:

  • collectionPath (string): Path to Bruno collection

  • name (string): Environment name

  • variables (object): Environment variables

Example:

{
  "collectionPath": "./collections/my-api-tests",
  "name": "production",
  "variables": {
    "baseUrl": "https://api.example.com",
    "apiKey": "prod-key-123",
    "timeout": 30000
  }
}

create_request

Generate .bru request files.

Parameters:

  • collectionPath (string): Path to collection

  • name (string): Request name

  • method (string): HTTP method

  • url (string): Request URL

  • headers (object, optional): HTTP headers

  • body (object, optional): Request body

  • auth (object, optional): Authentication config

  • folder (string, optional): Folder organization

Example:

{
  "collectionPath": "./collections/my-api-tests",
  "name": "Get User Profile",
  "method": "GET",
  "url": "{{baseUrl}}/users/{{userId}}",
  "headers": {
    "Authorization": "Bearer {{token}}"
  },
  "folder": "users"
}

create_crud_requests

Generate complete CRUD operation sets.

Parameters:

  • collectionPath (string): Path to collection

  • entityName (string): Entity name (e.g., "Users")

  • baseUrl (string): API base URL

  • folder (string, optional): Folder name

Example:

{
  "collectionPath": "./collections/my-api-tests",
  "entityName": "Products",
  "baseUrl": "{{baseUrl}}/api/v1",
  "folder": "products"
}

add_test_script

Add test scripts to existing requests.

Parameters:

  • bruFilePath (string): Path to .bru file

  • scriptType (string): Script type (pre-request, post-response, tests)

  • script (string): JavaScript code

get_collection_stats

Get statistics about a collection.

Parameters:

  • collectionPath (string): Path to collection

Generated File Structure

my-collection/
├── bruno.json              # Collection configuration
├── environments/           # Environment files
│   ├── development.bru
│   ├── staging.bru
│   └── production.bru
├── auth/                   # Authentication requests
│   ├── login.bru
│   └── get-profile.bru
└── users/                  # User management
    ├── get-all-users.bru
    ├── get-user-by-id.bru
    ├── create-user.bru
    ├── update-user.bru
    └── delete-user.bru

Bruno BRU File Format

Generated .bru files follow the Bruno markup language specification:

meta {
  name: Get Users
  type: http
  seq: 1
}

get {
  url: {{baseUrl}}/users
  body: none
  auth: none
}

headers {
  Content-Type: application/json
  Authorization: Bearer {{token}}
}

script:pre-request {
  bru.setVar("timestamp", Date.now());
}

script:post-response {
  if (res.status === 200) {
    bru.setVar("userId", res.body[0].id);
  }
}

tests {
  test("Status should be 200", function() {
    expect(res.status).to.equal(200);
  });
}

Testing

Run Unit Tests

npm test

Run Integration Tests

npm run test:integration

Test with Bruno CLI

# Generate a collection first
# Then run tests with Bruno CLI
bruno-cli run ./collections/my-api-tests/

Examples

See the examples/ directory for complete usage examples:

  • examples/jsonplaceholder/ - JSONPlaceholder API testing

  • examples/authentication/ - Authentication workflows

  • examples/complex-workflows/ - Multi-step API scenarios

Development

Project Structure

src/
├── index.ts              # Main entry point
├── server.ts             # MCP server implementation
├── bruno/
│   ├── types.ts          # TypeScript interfaces
│   ├── generator.ts      # BRU file generator
│   ├── collection.ts     # Collection management
│   ├── environment.ts    # Environment management
│   └── request.ts        # Request builder
└── tools/                # Individual MCP tools

Building

npm run build      # Build TypeScript
npm run dev        # Development mode
npm run clean      # Clean build artifacts

Code Quality

npm run lint       # ESLint
npm run format     # Prettier

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests

  5. Submit a pull request

License

MIT License - see LICENSE file for details.


Generated with Bruno MCP Server 🚀

Available Tools

1 tool
run-collectionC

Run a Bruno Collection using Bruno CLI

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionYesPath to the Bruno collection
environmentNoOptional path to environment file
variablesNoOptional environment variables

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Run' which implies execution, but fails to describe critical behaviors such as what 'Run' entails (e.g., CLI execution, output handling, error conditions, or side effects). This leaves significant gaps in understanding the tool's operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that efficiently conveys the core function without any extraneous information. It is front-loaded and appropriately sized for the tool's complexity, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not address behavioral aspects like execution details, error handling, or output format, which are crucial for a tool that runs collections. The description alone is insufficient for full contextual understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional meaning or context about the parameters beyond what the schema provides, such as usage examples or constraints. Thus, it meets the baseline for adequate but unenhanced parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run') and the resource ('a Bruno Collection using Bruno CLI'), making the purpose understandable. It specifies the tool as an execution mechanism for Bruno collections, which is specific. However, without sibling tools for comparison, it cannot demonstrate differentiation, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It merely states what the tool does without indicating appropriate scenarios or limitations, leaving usage entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clearly defined and distinct purpose.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions.

Tool Count2/5

One tool is too few for a server's purpose, as it severely limits functionality and scope. This feels thin and incomplete for any meaningful domain coverage.

Completeness2/5

The server's purpose appears to be running Bruno Collections, but with only a 'run' operation, there are significant gaps. Missing operations like listing collections, creating collections, or managing them make the surface severely incomplete.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that provides seamless integration with the Postman API, enabling AI assistants and applications to interact with Postman workspaces, collections, requests, environments, and folders programmatically.
    19
    25
    31
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that executes requests from Bruno API collections via the Bruno CLI tool, enabling API request execution and collection management.
    4
    MIT

Latest Blog Posts

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/macarthy/bruno-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server