A modular AI agent platform connecting LangChain & FastAPI with Model Context Protocol (MCP) servers.
Agent Bridge is officially added to the Awesome MCP Clients repository!
Model Context Protocol (MCP) enables seamless interoperability between AI models and external tools & data sources. Agent Bridge provides an end-to-end, production-ready platform to manage, authenticate, and execute tools across multiple MCP servers.
tutorial.mp4
- π€ AI Agent Orchestration: LangChain & LangGraph state machine integration on top of a robust FastAPI backend.
- π Multi-Server MCP Support: Seamlessly register, manage, and execute tools across various Model Context Protocol servers.
- π Authentication & Security: Secure JWT user management, bcrypt password hashing, and OAuth 2.0 with PKCE (Figma, Notion, GitHub).
- π‘οΈ Human-in-the-Loop Permissions: Fine-grained tool execution controls and permission requests.
- π¨ Modern Web Interface: Responsive Vue 3 frontend using Vite, Tailwind CSS, and Element Plus components.
- β‘ Live Real-time Streaming: SSE (Server-Sent Events) and WebSocket pipelines for agent interaction streaming.
- ποΈ Flexible Database Layer: PostgreSQL database powered by SQLAlchemy ORM with SQLite local dev support.
π Official Documentation: https://ramblinghermit0403.github.io/agent_bridge/
| Resource | Description |
|---|---|
| π Supported MCP Servers | Setup guide for Figma, GitHub, Notion, and custom servers |
| π€ LLM Providers | Configuration for Gemini, OpenAI, Pinecone, and AWS Bedrock |
| ποΈ Architecture Guide | In-depth breakdown of system design and agent flows |
| π§© Platform Expansion | Step-by-step guide to adding new servers and providers |
| π§ Prompts & Agent Core | Customizing agent behavior, persona, and memory system |
agent_bridge/
βββ backend/ # FastAPI backend server
β βββ app/
β β βββ routes/ # API routes & endpoints
β β βββ services/ # Core business logic & agent services
β β βββ models/ # Database models (SQLAlchemy)
β β βββ schemas/ # Data schemas (Pydantic)
β β βββ auth/ # Authentication & JWT services
β β βββ database/ # DB configuration & connections
β β βββ core/ # Utility modules & helpers
β βββ pyproject.toml # UV dependency management
β βββ requirements.txt # Standard pip requirements
β
βββ client/ # Vue.js 3 frontend application
β βββ src/
β β βββ view/ # Vue page views
β β βββ components/ # Reusable UI components
β β βββ router.js # Vue Router configuration
β β βββ main.js # Frontend entry point
β βββ package.json # Node.js dependencies
β
βββ docs/ # VitePress documentation site
βββ docker-compose.yml # Multi-container deployment config
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution guidelines
Ensure you have the following installed prior to setup:
- π Python 3.12+
- π¦ Node.js 20+
- π³ Docker & Docker Compose (Optional, recommended for quick deployment)
Launch the entire stack with a single command using Docker Compose:
-
Clone the repository:
git clone https://github.com/ramblinghermit0403/agent_bridge.git cd agent_bridge -
Configure Environment Variables: Create a
.envfile insidebackend/(orserver/depending on setup):cp backend/.env.example backend/.env
Add your API credentials (e.g.,
GOOGLE_API_KEY,OPENAI_API_KEY). -
Spin up services:
docker-compose up --build
- Frontend UI:
http://localhost:80 - Backend API:
http://localhost:8001 - PostgreSQL:
localhost:5432
- Frontend UI:
cd backend
python -m venv .venv
.venv\Scripts\activate.ps1
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload --port 8001The backend API will be available at
http://localhost:8001.
cd client
npm install
npm run devThe web interface will be accessible at
http://localhost:5173.
cd docs
npm install
npm run docs:devThe local docs server will run at
http://localhost:5173(or next available port).
To connect your custom MCP servers, update backend/servers.json and run the bootstrap script:
python bootstrap_servers.py your-email@example.comDatabase tables auto-generate upon backend startup. Use SQLAlchemy migrations for custom schema alterations.
Agent Bridge is built as a flexible, modular platform suitable for multiple usage patterns:
Target: Engineering Teams, Startups, Enterprises
| Scenario | Value Proposition |
|---|---|
| Internal DevOps Assistant | Autonomous agent that interacts with GitHub issues, CI pipelines, and log tools |
| Customer Support Copilot | Connected to CRM, ticketing systems, and knowledge base MCP servers |
| Self-Hosted Workflows | Complete data privacy with zero SaaS vendor lock-in |
Target: Developers learning Agentic AI & MCP
| Concept | Location in Codebase |
|---|---|
| LangGraph State Machines | agent_orchestrator.py β StateGraph edge routing |
| Human-in-the-Loop | human_review_node β Approval interrupt logic |
| Dynamic Tooling | tools.py β Dynamic MCP tool factory |
| SSE Response Streaming | streaming.py β FastAPI EventSourceResponse pipelines |
Target: Product Developers
| Module | Purpose |
|---|---|
llm_factory.py |
Universal multi-provider LLM client wrapper |
MCPConnector |
Standalone MCP client integration for any Python framework |
Tool Permission System |
Portable approval flow logic |
Target: Tool Developers & Authors
| Task | Workflow |
|---|---|
| Tool Discovery | Validate schema parsing and UI rendering |
| OAuth Debugging | Test authentication callbacks and token refresh handling |
| Benchmark Tooling | Measure real agent invocation latency under load |
| Layer | Technologies |
|---|---|
| Backend Framework | FastAPI, Python 3.12+, Pydantic |
| Agent Core | LangChain, LangGraph, Model Context Protocol (MCP) SDK |
| Database & Cache | PostgreSQL, SQLAlchemy ORM, Redis |
| Frontend Framework | Vue.js 3, Vite, Tailwind CSS, Element Plus |
| Auth & Security | JWT, bcrypt, OAuth 2.0 + PKCE |
- Encrypted JWT session tokens and secure password hashing.
- CORS isolation and environment configuration controls.
- Role-based tool authorization and real-time execution approval requests.
Contributions are welcomed! Check out CONTRIBUTING.md to learn how to get started with bug fixes, feature requests, or documentation improvements.
This project is open-source software licensed under the MIT License.
- Built with FastAPI & LangChain
- Model Context Protocol standard by Anthropic MCP
- Listed in Awesome MCP Clients
Built with β€οΈ for the AI & Open Source Community.