Logo di Bruno

Bruno

Community
jcr82

A Model Context Protocol (MCP) server that integrates Bruno CLI for API testing and collection management. Execute API tests, validate collections, and generate reports through the Model Context…

Autorejcr82
Repositorybruno-mcp-server
LinguaTypeScript
Fork
1
Stelle
5
Strumenti disponibili
9
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Bruno mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 9 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    5 stelle e 1 fork nel repository collegato.

Bruno MCP Server

Tests Coverage TypeScript License

A Model Context Protocol (MCP) server that integrates Bruno CLI for API testing and collection management. Execute API tests, validate collections, and generate reports through the Model Context Protocol.

Features

  • 🚀 Run API Tests - Execute individual requests or entire collections
  • 🔍 Request Introspection - Inspect request details without execution
  • ✅ Validation - Validate collections and environments
  • 📊 Report Generation - JSON, JUnit XML, and HTML reports
  • 🌍 Environment Management - List, validate, and switch environments
  • 🔎 Collection Discovery - Recursive search for Bruno collections
  • 🧪 Dry Run Mode - Validate without making HTTP calls
  • 🔒 Security - Path validation, input sanitization, secret masking
  • ⚡ Performance - Request caching and execution metrics
  • 🏥 Health Monitoring - Server health checks with detailed diagnostics

Quick Start

Prerequisites

  • Node.js 20 or higher
  • Bruno collections (.bru files)

📝 What is Bruno MCP Server?

The Bruno MCP Server integrates the Bruno CLI (an open-source API client) with the Model Context Protocol (MCP) to enable direct API testing, collection management, and reporting via Claude.

Bruno stores its collections as human-readable .bru files in your filesystem, allowing for seamless integration with version control (Git).

🚀 Key Capabilities

  • API Execution - Run individual requests or full test collections
  • Validation - Perform schema and environment validation (including a dry run mode without making HTTP calls)
  • Discovery - Recursively locate Bruno collections across specified directories
  • Environment Management - List and validate specific environments within a collection (e.g., dev, staging, production)
  • Reporting - Generate comprehensive reports in JSON, JUnit XML, or HTML formats

💡 Sample Prompts

GoalSample Prompt
Discovery"Find all Bruno collections in my projects directory at /Users/user-name/projects"
Request Execution"Run the 'Get User' request from /path/to/collection using the 'dev' environment"
Validation (Dry Run)"Validate the 'Create User' request from /path/to/collection without making the HTTP call"
Full Run & Reporting"Run all tests in my API collection at /path/to/collection and generate HTML and JSON reports in ./reports"
Environment Check"List all environments in /path/to/collection and validate the 'production' environment"

📥 Installation (Claude CLI)

Option 1: Using Claude MCP Add (Recommended)

The simplest method is using the claude mcp add command, which automatically installs the server and configures the MCP transport.

ScopeCommand
Global (personal use)claude mcp add --transport stdio bruno -- npx -y bruno-mcp-server
Project-Scoped (team projects)claude mcp add --transport stdio bruno --scope project -- npx -y bruno-mcp-server

Note: The --transport stdio flag and the -- separator are required. The -y flag automatically accepts npx prompts.

Option 2: Manual Installation

  1. Install the package globally:
bash
npm install -g bruno-mcp-server
  1. Add to your Claude CLI configuration file:
    • Global config: ~/.claude.json
    • Project config: .claude.json (in your project root)
json
{
  "mcpServers": {
    "bruno": {
      "command": "npx",
      "args": ["bruno-mcp-server"]
    }
  }
}
  1. Restart your Claude CLI session

✅ Verification

To confirm the server is installed correctly, check the appropriate configuration file:

bash
# For global installation
cat ~/.claude.json

# For project-scoped installation
cat .claude.json

You should see the "bruno" server listed under mcpServers.

Test the installation by starting a new Claude CLI session and trying:

"Check if the bruno MCP server is available and list its tools"

Available Tools

1. bruno_run_request - Execute a Single Request

typescript
bruno_run_request({
  collectionPath: "/path/to/collection",
  requestName: "Get User",
  environment: "dev",           // optional
  envVariables: {               // optional
    "API_KEY": "your-key"
  },
  reporterJson: "./report.json",   // optional
  reporterJunit: "./report.xml",   // optional
  reporterHtml: "./report.html",   // optional
  dryRun: false                    // optional - validate only
})

2. bruno_run_collection - Execute a Collection

typescript
bruno_run_collection({
  collectionPath: "/path/to/collection",
  environment: "dev",          // optional
  folderPath: "auth",          // optional - run specific folder
  envVariables: { },           // optional
  reporterJson: "./report.json",  // optional
  dryRun: false                   // optional
})

3. bruno_list_requests - List All Requests

typescript
bruno_list_requests({
  collectionPath: "/path/to/collection"
})

4. bruno_discover_collections - Find Collections

typescript
bruno_discover_collections({
  searchPath: "/path/to/workspace",
  maxDepth: 5  // optional (default: 5, max: 10)
})

5. bruno_list_environments - List Environments

typescript
bruno_list_environments({
  collectionPath: "/path/to/collection"
})

6. bruno_validate_environment - Validate Environment

typescript
bruno_validate_environment({
  collectionPath: "/path/to/collection",
  environmentName: "dev"
})

7. bruno_get_request_details - Inspect Request

typescript
bruno_get_request_details({
  collectionPath: "/path/to/collection",
  requestName: "Create User"
})

8. bruno_validate_collection - Validate Collection

typescript
bruno_validate_collection({
  collectionPath: "/path/to/collection"
})

9. bruno_health_check - Health Diagnostics

typescript
bruno_health_check({
  includeMetrics: true,      // optional
  includeCacheStats: true    // optional
})

Dry Run Mode

Validate request configuration without executing HTTP calls:

typescript
bruno_run_request({
  collectionPath: "/path/to/collection",
  requestName: "Create User",
  dryRun: true
})

Output:

=== DRY RUN: Request Validation ===

✅ Request validated successfully (HTTP call not executed)

Request: Create User
Method: POST
URL: {{baseUrl}}/api/users

Configuration Summary:
  Headers: 2
  Body: json
  Auth: bearer
  Tests: 3

ℹ️  This was a dry run - no HTTP request was sent.

Report Generation

Generate test reports in multiple formats:

typescript
bruno_run_collection({
  collectionPath: "./my-api-tests",
  environment: "production",
  reporterJson: "./reports/results.json",
  reporterJunit: "./reports/results.xml",
  reporterHtml: "./reports/results.html"
})
  • JSON: Detailed results for programmatic processing
  • JUnit XML: CI/CD integration (Jenkins, GitHub Actions, GitLab CI)
  • HTML: Interactive report with Vue.js interface

Configuration

Create bruno-mcp.config.json in your project root or home directory:

json
{
  "timeout": {
    "request": 30000,
    "collection": 120000
  },
  "retry": {
    "enabled": true,
    "maxAttempts": 3,
    "backoff": "exponential"
  },
  "security": {
    "allowedPaths": ["/path/to/collections"],
    "maskSecrets": true,
    "secretPatterns": ["password", "api[_-]?key", "token"]
  },
  "logging": {
    "level": "info",
    "format": "json"
  },
  "performance": {
    "cacheEnabled": true,
    "cacheTTL": 300000
  }
}

See bruno-mcp.config.example.json for all options.

Development

bash
# Clone repository
git clone https://github.com/jcr82/bruno-mcp-server.git
cd bruno-mcp-server

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build

# Run in development
npm run dev

Project Structure

bruno-mcp-server/
├── src/
│   ├── index.ts              # Main MCP server
│   ├── bruno-cli.ts          # Bruno CLI wrapper
│   ├── config.ts             # Configuration management
│   ├── security.ts           # Security utilities
│   ├── performance.ts        # Caching and metrics
│   ├── logger.ts             # Logging system
│   ├── di/                   # Dependency injection
│   ├── services/             # Business logic services
│   ├── tools/
│   │   ├── handlers/         # MCP tool handlers (9 tools)
│   │   └── formatters/       # Output formatters
│   └── __tests__/            # Test suites
│       ├── unit/             # Unit tests (100% handler coverage)
│       ├── integration/      # Integration tests
│       └── e2e/              # End-to-end workflow tests
├── dist/                     # Compiled output
└── bruno-mcp.config.json     # Configuration file

Test Coverage

  • Overall Coverage: 91.04%
  • Handler Coverage: 99.72% (9/9 handlers)
  • Formatter Coverage: 98.74%
  • Total Tests: 362 passing
  • Test Types: Unit, Integration, E2E

Security Features

  • Path Validation: Prevents directory traversal attacks
  • Input Sanitization: Protects against command injection
  • Secret Masking: Automatically masks sensitive data in logs
  • Environment Validation: Validates variables for safe characters

Troubleshooting

Installation Issues

Error: "missing required argument 'commandOrUrl'"

  • Make sure you include --transport stdio and -- separator
  • Correct: claude mcp add --transport stdio bruno -- npx -y bruno-mcp-server
  • Wrong: claude mcp add bruno-mcp-server

MCP Server Not Showing Up in Claude

  1. Verify installation: cat ~/.claude.json (or project's .claude.json if using --scope project)
  2. Restart Claude Desktop/CLI after installation
  3. Check the server is configured correctly in the JSON file

npx Prompts During Installation

  • Always use the -y flag: npx -y bruno-mcp-server
  • This auto-accepts installation prompts

Bruno CLI Not Found

bash
# Verify Bruno CLI installation
npx bru --version

# Server uses local installation in node_modules/.bin/bru

Collection Not Found

  • Use absolute paths
  • Verify bruno.json exists in collection directory
  • Check file permissions

Permission Issues

  • Ensure read access to Bruno collections
  • Verify server can execute Bruno CLI

Documentation

Contributing

Contributions welcome! Please submit issues or pull requests.

License

MIT © Juan Ruiz

Links

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "bruno": {
      "command": "npx",
      "args": [
        "bruno-mcp-server"
      ]
    }
  }
}

Strumenti disponibili

  • bruno_run_request

    Run a specific request from a Bruno collection

  • bruno_run_collection

    Run all requests in a Bruno collection or specific folder

  • bruno_list_requests

    List all requests in a Bruno collection

  • bruno_health_check

    Check the health status of the Bruno MCP server and Bruno CLI

  • bruno_discover_collections

    Discover Bruno collections in a directory tree

  • bruno_list_environments

    List all environments in a Bruno collection

  • bruno_validate_environment

    Validate an environment file in a Bruno collection

  • bruno_get_request_details

    Get detailed information about a specific request without executing it

  • bruno_validate_collection

    Validate a Bruno collection's structure and configuration

Usa MCP Bruno con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Bruno, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Bruno come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Bruno.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "bruno": {
      "command": "npx",
      "args": [
        "-y",
        "bruno-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Bruno, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Bruno.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Bruno per aiutarmi con questa attività?
Bruno
Certo. Ho letto.
Ecco cosa ho trovato con Bruno.

Domande frequenti

A cosa serve il server MCP Bruno?

Bruno è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Bruno MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Bruno con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Bruno con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Bruno, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Bruno MCP a TypingMind?

Bruno funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Bruno MCP in TypingMind?

Bruno mette a disposizione 9 strumenti MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Bruno MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Bruno richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇