logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-gateway-for-bruno-apis

A Model Context Protocol (MCP) conduit that exposes capabilities defined within Bruno API specifications, facilitating agentic interaction via the standardized MCP framework. This architecture promotes tight coupling between source code definitions and operational data access, significantly simplifying API integration and troubleshooting workflows.

Author

mcp-gateway-for-bruno-apis logo

djkz

No License

Quick Info

GitHub GitHub Stars 1
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisapimcpapi mcpmcp toolsbruno api

Bruno API MCP Server: Bridging API Definitions to Agentic Protocols

This component functions as a dedicated Model Context Protocol (MCP) bridge, translating organized Bruno API collections into consumable MCP tools. By exposing these structured APIs through the MCP standard, we unlock direct, protocol-driven access for AI agents and other consuming clients.

The Value Proposition: Unifying Definition and Execution Context

Integrating external APIs often presents significant friction points for development teams. This server directly addresses three primary obstacles:

  1. Contextual Disparity in Diagnostics: Debugging routines that span separate code repositories and distinct data backends forces continuous context shifting, leading to protracted resolution times.

  2. Duplicative Tooling Investment: Every new third-party API integration mandates the creation and perpetual maintenance of bespoke interfacing mechanisms, accumulating technical burden.

  3. UI Proliferation: The necessity of crafting unique graphical interfaces for every exposed backend service inflates complexity and long-term upkeep expenses.

By consolidating your API definitions (Bruno collections) with the execution layer via MCP tooling, we resolve these issues. This collocation enables:

  • Comprehensive, seamless debugging across traditionally siloed execution domains.
  • Instant transformation of any HTTP endpoint into an agent-ready operational tool, bypassing custom wrapper development.
  • Facilitation of headless service operations governed entirely through AI-driven interfaces.

For engineering organizations prioritizing accelerated API adoption while aggressively managing technical overhead, this paradigm shift renders complex integrations routine and readily accessible.

Core Capabilities

  • Automated serialization of Bruno API structures into functional MCP artifacts.
  • Robust configuration handling for disparate API environment profiles.
  • Support for HTTP transport leveraging Server-Sent Events (SSE).
  • Native handling of Cross-Origin Resource Sharing (CORS).
  • Integrated utilities for inspecting and managing the exposed toolset.

Deployment and Initialization

  1. Prerequisite Installation:

bash npm install

  1. Server Startup Command:

Execute the primary script, pointing it to your Bruno collection directory, optionally specifying environment and tool inclusion/exclusion filters:

bash node --loader ts-node/esm src/index.ts --bruno-path /path/to/bruno/collection [--environment env_name] [--include-tools tool1,tool2,tool3] [--exclude-tools tool4,tool5]

Operational Flags:

  • --bruno-path / -b: Mandatory directory locating the root of the Bruno collection.
  • --environment / -e: Optional identifier for the configuration set to activate.
  • --include-tools: Comma-delimited list to restrict exposed tools to only those specified.
  • --exclude-tools: Comma-delimited list to explicitly omit certain tools from exposure.

Tool filtering accepts standard delimiters:

bash --include-tools toolA toolB toolC # Space-delimited --include-tools=toolA,toolB,toolC # Equals-sign format

  1. Client Connectivity Endpoints:
    • Local Host Access: http://localhost:8000/sse
    • Access from WSL Host: http://<WSL_IP_ADDRESS>:8000/sse
    • To retrieve the necessary WSL IP, execute: hostname -I | awk '{print $1}'

Pre-configured Execution Scripts

The npm manifest provides utility scripts for common launch scenarios:

bash

Standard initialization

npm start

Launch with a specific CFI configuration path

npm run start:cfi

Start using the 'local' environment definitions

npm run start:local

Initialize server including only a subset of defined tools

npm run start:include-tools

Initialize server excluding specific tools

npm run start:exclude-tools

Development & Diagnostics

Executing Unit and Integration Tests

Run the complete test suite:

bash npm test

Execute validation against a singular file:

bash npm test test/bruno-parser-auth.test.ts

Advanced Logging Control

Logging detail is managed via the standard DEBUG environment variable, targeting specific internal modules:

bash

Verbose logging across all internal server subsystems

DEBUG=* npm start

Isolate logs to the Bruno collection parser module

DEBUG=bruno-parser npm start

Monitor request dispatch and outcome

DEBUG=bruno-request npm start

Trace tool construction and registration lifecycle

DEBUG=bruno-tools npm start

Combine logging streams

DEBUG=bruno-parser,bruno-request npm start

Windows CMD syntax for enabling debug streams

set DEBUG=bruno-parser,bruno-request && npm start

Windows PowerShell syntax

$env:DEBUG='bruno-parser,bruno-request'; npm start

Available Debug Streams:

  • bruno-parser: Input processing, structure validation, and environment configuration loading.
  • bruno-request: Tracking the invocation, parameter substitution, and final execution of API calls.
  • bruno-tools: Lifecycle events related to creating, mapping, and registering API definitions as MCP callable functions.

Exposed Tool Capabilities

Environment Inventory Query

This utility reports on the currently active runtime context:

  • Inputs: None needed.
  • Output: A report detailing all discoverable environments and highlighting the one currently in use.

Message Reflection Utility (Echo)

A straightforward utility for validating connectivity:

  • Input Parameter: message (Type: string) - The payload to be returned.

Underlying Bruno API Structure

The prerequisite directory layout must conform to standard Bruno collection organization:

collection/ ├── collection.bru # Top-level collection metadata ├── environments/ # Configuration files for variable scoping │ ├── local.bru │ └── remote.bru └── requests/ # Individual HTTP operation definitions ├── request1.bru └── request2.bru

Every distinct request definition within the requests/ folder is automatically instantiated as an independent, callable tool within the MCP framework.

Dynamic Tool Parameterization

When invoking a tool generated from a Bruno request, runtime modifications can be injected via the command payload. These mechanisms allow for fine-grained control over the underlying HTTP interaction:

Environment Context Overriding

Specify an alternate named environment for a single execution:

{ "environment": "us-qa-test" }

This supersedes the default active environment setting.

Variable Substitution Overrides

Inject or replace specific named variables used throughout the request definition (URL, headers, body):

{ "variables": { "transactionRef": "TXN-99302A", "authHeaderValue": "Bearer new_token_here" } }

If the original request template utilizes {{transactionRef}}, this payload ensures the resolved URL or payload segment incorporates TXN-99302A.

Query String Augmentation

Parameters intended for the URL query string can be explicitly supplied or modified:

{ "query": { "pageSize": "50", "sortField": "timestamp", "filterActive": "true" } }

These map directly to ?pageSize=50&sortField=timestamp..., offering a cleaner method than utilizing general variables for URI parameters.

Request Body Payload Modification

Directly substitute or append data intended for the request body (JSON/form data):

{ "body": { "actionType": "UPDATE_STATUS", "payloadVersion": 2.1 } }

Composite Invocation Example

A demonstration combining all customization vectors in one tool call:

{ "environment": "production-canary", "variables": { "userId": "agent_001_override", "timeoutMs": "5000" }, "query": { "version": "v2", "format": "json" }, "body": { "confirmationCode": "PROCESSED_BY_AI" } }

This software is distributed under the terms of the MIT License.

Business Tool Context

Business management solutions encompass the entire spectrum of applications, methodologies, and control frameworks organizations employ to maintain market relevance, adapt to dynamic environments, and drive superior operational outcomes. These tools span every organizational function—from strategic foresight and process optimization to transactional data management and workforce engagement.

The modern landscape of business tooling is defined by rapid technological advancement, which necessitates a critical, strategic selection process rather than reactive adoption. Effective value realization hinges on meticulous alignment between the chosen technology and the specific requirements of the organization, demanding adaptation of the tool to the process, not vice-versa.

Key Functional Classifications of Business Tools:

  • Data Ingestion, Validation, and Integrity Checks.
  • Process Governance, Monitoring, and Continuous Improvement Systems.
  • Consolidated Data Warehousing and Advanced Analytics for Executive Decision Support.

Historically Significant Categories (Per 2013 Industry Survey):

  • Strategic Roadmapping and Alignment (e.g., Balanced Scorecard).
  • Client Relationship Lifecycle Management (CRM).
  • Workforce Optimization and Surveying.
  • Operational Efficiency Benchmarking and Supply Chain Optimization.

The evolution from foundational Management Information Systems (MIS) through Enterprise Resource Planning (ERP) to current Cloud-Based Business Management Suites underscores the continuous integration of technology for performance enhancement. Crucially, the performance uplift derived from IT investment is maximized when implementation quality and the initial selection/customization process are rigorously managed.

See Also

`