MCP Bridge API

by inquirelab

67 stars
299 downloads
Not rated
GitHub

About

A lightweight, LLM-agnostic RESTful proxy that unifies multiple MCP servers under a single API.

Details

Author
inquirelab
GitHub stars
67
Downloads
299
Categories
Developer Tools, API, AI, Other

- LLM-agnostic RESTful proxy for MCP servers
- Supports multiple MCP servers simultaneously
- Optional risk-based security levels (standard, confirmation, Docker isolation)
- Compatible with any client on any platform
- Automatically exposes all MCP tools via REST API

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Bridge API
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Getting Started with the React Native app

- Configure MCP Bridge: Set up your MCP Bridge server URL in the Settings tab - Add Gemini API Key: Enter your Google Gemini API key for AI functionality - Select Model: Choose from available Gemini models including the latest releases - Start Chatting: Begin natural language conversations with your MCP tools

The app automatically discovers available MCP tools and provides contextual assistance for complex multi-step operations.

MCP Bridge is configured through a JSON file namedmcp_config.jsonin the project root. This is an example of a basic MCP config:

{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"], "riskLevel": 2 }, "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "your-slack-token", "SLACK_TEAM_ID": "your-team-id" }, "riskLevel": 1 } } }

MCP Bridge exposes a clean and intuitive REST API for interacting with connected servers. Here's a breakdown of available endpoints:

POST /servers/filesystem/tools/list_directory Content-Type: application/json { "path": "." }

- Multi-step reasoning- Supports sequenced tool calls for complex operations
- Security confirmation flow- Integrated handling for medium and high risk operations
- Flexible JSON display- Control the verbosity of JSON outputs for better readability
- Configurable connection- Connect to any MCP Bridge instance with custom URL and port
- Discovery of available tools- Automatically detects and uses all tools from connected servers
- Conversation Management- Persistent chat history with AI-generated titles
- Segmented Message Display- Clean separation of text responses and tool operations
- Real-time Tool Execution- Visual feedback with collapsible result sections
- Security Confirmation UI- Native confirmation dialogs for medium/high risk operations
- Multi-Model Support- Support for various Gemini models with easy switching
- Cross-Platform- Works on iOS, Android, and web platforms
- Modern Material Design- Dark theme with smooth animations and haptic feedback

MCP Bridge implements an optional risk level system that provides control over server execution behaviors. Risk levels help manage security and resource concerns when executing potentially sensitive MCP server operations.

Risk levels are optional for backward compatibility. You can configure risk levels in yourmcp_config.json:

{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"], "riskLevel": 2 }, "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "your-slack-token", "SLACK_TEAM_ID": "your-team-id" }, "riskLevel": 1 }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "your-github-token" }, "riskLevel": 3, "docker": { "image": "node:18", "volumes": ["/tmp:/tmp"], "network": "host" } } } }

- Standard execution without additional steps
- Suitable for operations with minimal security concerns
- This is the default behavior when no risk level is specified
- Client makes a tool execution request
- Server responds with a confirmation request containing a confirmation ID
- Client must make a separate confirmation request to proceed
- Only after confirmation does the server execute the operation

Both the Python MCP-Gemini Agent and React Native Agent handle this confirmation flow automatically, prompting the user for approval when needed.

- Server automatically runs in an isolated Docker container
- Provides environmental isolation for the MCP server process
- Requires Docker to be installed and properly configured

-

✅ UV Package Manager Support: Fixed the issue with loading UV-based (Python) MCP servers. MCP Bridge now properly initializes and communicates with Python MCP servers that use the UV package manager, resolving previous compatibility issues with UV-based toolchains.

📱 React Native MCP Agent: Added a comprehensive mobile application with:

- Cross-platform support for iOS, Android, and web
- Modern Material Design 3 interface with dark theming
- Intelligent conversation management with AI-generated titles
- Real-time tool execution with visual feedback
- Built-in security confirmation workflows
- Support for multiple Gemini models including latest releases

🔧 Enhanced Tool Execution: Improved multi-step reasoning capabilities across all clients

🛡️ Security Improvements: Enhanced risk-level confirmation flows with better user experience

📊 Better Error Handling: More robust error handling and recovery mechanisms

MCP Bridge has gained recognition within the AI and development communities, being featured in academic research, industry security analyses, professional discourse, and technical publications. These acknowledgments highlight the practical value and real-world impact of our lightweight, LLM-agnostic proxy solution.

Cited by this paper: From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows- A research paper discussing security implications in LLM-powered AI agent workflows

Research Briefing: MCP Security- Wiz security research highlighting MCP Bridge as an example of academic work in the MCP ecosystem

LinkedIn Post by Vaibhava Lakshmi Ravideshik- A LinkedIn Learning Instructor discussion about MCP Bridge's practical applications

[Unlocking Agentic Apps with the Model Context Protocol (MCP) For Financial Services- Medium article featuring MCP Bridge's design pattern for financial applications

- Use HTTPS in production
- Add auth for sensitive operations
- Network-isolate critical services

- Use load balancers
- Pool high-demand servers
- Track metrics and resource pressure

- Build for production usingnpx expo build
- Configure app store deployment with EAS Build
- Set up over-the-air updates with EAS Update

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp bridge api": {
            "mcp-bridge-api": {
                "command": "node",
                "args": [
                    "mcp-bridge.js"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-bridge-api": {
        "command": "node",
        "args": [
            "mcp-bridge.js"
        ]
    }
}

A Lightweight, LLM-Agnostic RESTful Proxy for Model Context Protocol Servers

Figure: The React Native MCP Agent interface showing the chat screen with tool execution results (left) and the settings screen with MCP Bridge connection status and Gemini API configuration (right)

Authors:
Arash Ahmadi, Sarah S. Sharif, and Yaser M. Banad
School of Electrical, and Computer Engineering, University of Oklahoma, Oklahoma, United States
Corresponding author:bana@ou.edu

If you want to reference this research project in your work, please cite our paper:

@article{ahmadi2025mcp, title={MCP Bridge: A Lightweight, LLM-Agnostic RESTful Proxy for Model Context Protocol Servers}, author={Ahmadi, Arash and Sharif, Sarah and Banad, Yaser M}, journal={arXiv preprint arXiv:2504.08999}, year={2025} }

- 📚 Introduction
-
🏗️ Architecture
-
💾 Installation
-
🐍 Python MCP-Gemini Agent
-
📱 React Native MCP Agent
-
⚙️ Configuration
-
🧪 API Usage
-
🔐 Risk Levels
-
🌟 Community Impact and Recognition
-
📋 Changelog
-
🚧 Deployment Considerations
-
📊 Comparison with Other MCP Bridge/Proxy Repositories
-
📝 License

MCP Bridge is a lightweight, fast, and LLM-agnostic proxy that connects to multiple Model Context Protocol (MCP) servers and exposes their capabilities through a unified REST API. It enables any client on any platform to leverage MCP functionality without process execution constraints. Unlike Anthropic's official MCP SDK, MCP Bridge is fully independent and designed to work with any LLM backend which makes it adaptable, modular, and future-proof for diverse deployments. With optional risk-based execution levels, it provides granular security controls—from standard execution to confirmation workflows and Docker isolation—while maintaining backward compatibility with standard MCP clients.

Complementing this server-side infrastructure are two distinct intelligent client implementations:
- Python MCP-Gemini Agent- A command-line Python client for desktop environments
- React Native MCP Agent- A modern cross-platform mobile application

Both clients enable natural language interaction with MCP tools through intelligent LLM-powered interfaces that feature multi-step reasoning for complex operations, security confirmation workflow handling, and configurable display options for enhanced usability. Together, MCP Bridge's versatile server-side capabilities and these intelligent client interfaces create a powerful ecosystem for developing sophisticated LLM-powered applications.

- Many MCP servers use STDIO transports requiring local process execution
- Edge devices, mobile devices, web browsers, and other platforms cannot efficiently run npm or Python MCP servers
- Direct MCP server connections are impractical in resource-constrained environments
- Multiple isolated clients connecting to the same servers causes redundancy and increases resource usage
- Interacting directly with MCP tools requires technical knowledge of specific tool formats and requirements

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ React Native │ │ Python │ │ Other Clients │ │ MCP Agent │ │ Gemini Agent │ │ │ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ │ │ │ │ │ │ │ ▼ │ │ ┌───────────────────────┐ │ └──────────►│ │◄─────────┘ │ REST API │ │ │ └───────────┬───────────┘ │ ▼ ┌───────────────────────┐ │ │ │ MCP Bridge │ │ │ └───────────┬───────────┘ │ ┌───────────────┼───────────────┐ │ │ │ ▼ ▼ ▼ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ MCP Server │ │ MCP Server │ │ MCP Server │ │ (STDIO) │ │ (STDIO) │ │ (SSE) │ └─────────────┘ └─────────────┘ └─────────────┘

- Node.js 18+ for MCP Bridge
- Python 3.8+ for the Python MCP-Gemini Agent
- React Native development environment for the mobile app

# Install dependencies npm install express cors morgan uuid # Start the server node mcp-bridge.js
# Install dependencies pip install google-generativeai requests rich # Start the agent python llm_test.py
# Navigate to the React Native app directory cd reactnative-gamini-mcp-agent # Install dependencies npm install # Start the development server npx expo start

The Python MCP-Gemini Agent is a command-line client that connects to MCP Bridge and uses Google's Gemini LLM to process user requests and execute MCP tools commands. It's designed for desktop environments and developer workflows.
- Multi-step reasoning- Supports sequenced tool calls for complex operations
- Security confirmation flow- Integrated handling for medium and high risk operations
- Flexible JSON display- Control the verbosity of JSON outputs for better readability
- Configurable connection- Connect to any MCP Bridge instance with custom URL and port
- Discovery of available tools- Automatically detects and uses all tools from connected servers

The Python MCP-Gemini Agent supports several command-line options:

usage: llm_test.py [-h] [--hide-json] [--json-width JSON_WIDTH] [--mcp-url MCP_URL] [--mcp-port MCP_PORT] MCP-Gemini Agent with configurable settings options: -h, --help show this help message and exit --hide-json Hide JSON results from tool executions --json-width JSON_WIDTH Maximum width for JSON output (default: 100) --mcp-url MCP_URL MCP Bridge URL including protocol and port (default: http://localhost:3000) --mcp-port MCP_PORT Override port in MCP Bridge URL (default: use port from --mcp-url)
# Basic usage with default settings python llm_test.py # Hide JSON results for cleaner output python llm_test.py --hide-json # Connect to a custom MCP Bridge server python llm_test.py --mcp-url http://192.168.1.100:3000 # Connect to a different port python llm_test.py --mcp-port 4000 # Adjust JSON width display for better formatting python llm_test.py --json-width 120

The React Native MCP Agent is a modern, cross-platform mobile application that provides intuitive access to MCP tools through a clean, user-friendly interface. Built with Expo and React Native Paper, it offers a dark-themed, Material Design 3 interface optimized for both iOS and Android platforms.

- Cross-Platform Compatibility: Runs on iOS, Android, and web platforms
- Intuitive Chat Interface: Natural language interaction with segmented message display
- Real-Time Tool Execution: Visual feedback for MCP tool calls with collapsible result sections
- Conversation Management: Persistent conversation history with AI-generated titles
- Modern UI/UX: Dark theme with glassmorphism effects and smooth animations
- Comprehensive Settings: Easy configuration of MCP Bridge connections and Gemini API settings
- Security Integration: Built-in support for MCP Bridge's risk-level confirmation workflows
- Multi-Model Support: Compatible with various Gemini models including the latest 2.5 Flash Preview

Getting Started with the React Native app

- Configure MCP Bridge: Set up your MCP Bridge server URL in the Settings tab - Add Gemini API Key: Enter your Google Gemini API key for AI functionality - Select Model: Choose from available Gemini models including the latest releases - Start Chatting: Begin natural language conversations with your MCP tools

The app automatically discovers available MCP tools and provides contextual assistance for complex multi-step operations.

MCP Bridge is configured through a JSON file namedmcp_config.jsonin the project root. This is an example of a basic MCP config:

{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"], "riskLevel": 2 }, "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "your-slack-token", "SLACK_TEAM_ID": "your-team-id" }, "riskLevel": 1 } } }

MCP Bridge exposes a clean and intuitive REST API for interacting with connected servers. Here's a breakdown of available endpoints:

POST /servers/filesystem/tools/list_directory Content-Type: application/json { "path": "." }

- Multi-step reasoning- Supports sequenced tool calls for complex operations
- Security confirmation flow- Integrated handling for medium and high risk operations
- Flexible JSON display- Control the verbosity of JSON outputs for better readability
- Configurable connection- Connect to any MCP Bridge instance with custom URL and port
- Discovery of available tools- Automatically detects and uses all tools from connected servers
- Conversation Management- Persistent chat history with AI-generated titles
- Segmented Message Display- Clean separation of text responses and tool operations
- Real-time Tool Execution- Visual feedback with collapsible result sections
- Security Confirmation UI- Native confirmation dialogs for medium/high risk operations
- Multi-Model Support- Support for various Gemini models with easy switching
- Cross-Platform- Works on iOS, Android, and web platforms
- Modern Material Design- Dark theme with smooth animations and haptic feedback

MCP Bridge implements an optional risk level system that provides control over server execution behaviors. Risk levels help manage security and resource concerns when executing potentially sensitive MCP server operations.

Risk levels are optional for backward compatibility. You can configure risk levels in yourmcp_config.json:

{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"], "riskLevel": 2 }, "slack": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"], "env": { "SLACK_BOT_TOKEN": "your-slack-token", "SLACK_TEAM_ID": "your-team-id" }, "riskLevel": 1 }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "your-github-token" }, "riskLevel": 3, "docker": { "image": "node:18", "volumes": ["/tmp:/tmp"], "network": "host" } } } }

- Standard execution without additional steps
- Suitable for operations with minimal security concerns
- This is the default behavior when no risk level is specified
- Client makes a tool execution request
- Server responds with a confirmation request containing a confirmation ID
- Client must make a separate confirmation request to proceed
- Only after confirmation does the server execute the operation

Both the Python MCP-Gemini Agent and React Native Agent handle this confirmation flow automatically, prompting the user for approval when needed.

- Server automatically runs in an isolated Docker container
- Provides environmental isolation for the MCP server process
- Requires Docker to be installed and properly configured

-

✅ UV Package Manager Support: Fixed the issue with loading UV-based (Python) MCP servers. MCP Bridge now properly initializes and communicates with Python MCP servers that use the UV package manager, resolving previous compatibility issues with UV-based toolchains.

📱 React Native MCP Agent: Added a comprehensive mobile application with:

- Cross-platform support for iOS, Android, and web
- Modern Material Design 3 interface with dark theming
- Intelligent conversation management with AI-generated titles
- Real-time tool execution with visual feedback
- Built-in security confirmation workflows
- Support for multiple Gemini models including latest releases

🔧 Enhanced Tool Execution: Improved multi-step reasoning capabilities across all clients

🛡️ Security Improvements: Enhanced risk-level confirmation flows with better user experience

📊 Better Error Handling: More robust error handling and recovery mechanisms

MCP Bridge has gained recognition within the AI and development communities, being featured in academic research, industry security analyses, professional discourse, and technical publications. These acknowledgments highlight the practical value and real-world impact of our lightweight, LLM-agnostic proxy solution.

Cited by this paper: From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows- A research paper discussing security implications in LLM-powered AI agent workflows

Research Briefing: MCP Security- Wiz security research highlighting MCP Bridge as an example of academic work in the MCP ecosystem

LinkedIn Post by Vaibhava Lakshmi Ravideshik- A LinkedIn Learning Instructor discussion about MCP Bridge's practical applications

Unlocking Agentic Apps with the Model Context Protocol (MCP) For Financial Services- Medium article featuring MCP Bridge's design pattern for financial applications

- Use HTTPS in production
- Add auth for sensitive operations
- Network-isolate critical services

- Use load balancers
- Pool high-demand servers
- Track metrics and resource pressure

- Build for production usingnpx expo build
- Configure app store deployment with EAS Build
- Set up over-the-air updates with EAS Update

📊 Comparison with Other MCP Bridge/Proxy Repositories

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Drop-in MCP proxy that losslessly re-encodes JSON tool responses as GCF. 71% fewer tokens, 100% comprehension across 1,700+ LLM evaluations. Zero code changes.

a complete and intuitive SDK for building MCP Servers, MCP Agents, and LLM integrations (OpenAI, Claude, Gemini) with minimal effort. It abstracts all the complexity of the MCP protocol, provides an intelligent agent with automatic model routing, and includes a universal client for external APIs all through a single, simple, and powerful interface. Perfect for chatbots, enterprise automation, internal system integrations, and rapid development of MCP-based ecosystems.

A lightweight, LLM-agnostic RESTful proxy that unifies multiple MCP servers under a single API.

Scan codebases for LLM API calls and estimate monthly costs. Compare costs between git refs to catch cost regressions during code review.

An open-source library to connect any LLM to any MCP server, enabling the creation of custom agents with tool access.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

Local-first knowledge graph for developers. Watches project files, extracts entities and relationships via LLMs, and lets you query across projects with natural language and source citations.

Tool platform by IBM to build, test and deploy tools for any data source

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.