MCP Router
A centralized gateway platform for aggregating and managing multiple Model Context Protocol (MCP) servers through a single Electron-based interface. It provides enterprise-grade security features including policy-based access control, human-in-the-loop approval workflows, and comprehensive audit logging.
README
MCP Router
A secure, enterprise-grade Model Context Protocol (MCP) server aggregation platform built with Electron.
Overview
MCP Router acts as a centralized gateway for managing multiple MCP servers, providing:
- Server Aggregation: Connect and manage multiple MCP servers from a single interface
- Policy-Based Access Control: Fine-grained control over tool and resource access
- Token Authentication: Secure API token management with scoping and expiration
- Approval Workflows: Human-in-the-loop approval for sensitive operations
- Rate Limiting: Protect against abuse with configurable rate limits
- Audit Logging: Complete audit trail of all operations
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ MCP Router │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Clients │ │ Policy │ │ Approval │ │
│ │ (Claude, │──│ Engine │──│ Queue │ │
│ │ etc.) │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ MCP Aggregator │ │
│ │ - Tool routing - Resource proxying - Audit log │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ MCP Server│ │ MCP Server│ │ MCP Server│ │
│ │ A │ │ B │ │ C │ │
│ └───────────┘ └───────────┘ └───────────┘ │
└─────────────────────────────────────────────────────────────────┘
Features
Server Management
- Support for stdio and HTTP transport protocols
- Automatic server health monitoring
- Tool and resource discovery
- Per-server configuration
Security
- Token-based authentication with scopes
- Policy rules with glob pattern matching
- Rate limiting per client/token
- Secure credential storage via system keychain
Policy Engine
- Global, client-specific, and server-specific policies
- Allow, deny, and require_approval actions
- Priority-based rule evaluation
- Wildcard pattern matching
Approval System
- Real-time approval notifications
- Configurable timeout and expiration
- Audit trail for all decisions
Quick Start
Prerequisites
- Node.js 20+
- pnpm 9+
Installation
# Clone the repository
git clone https://github.com/your-org/mcp-router.git
cd mcp-router
# Install dependencies
pnpm install
# Start development server
pnpm dev
Building
# Build for production
pnpm build
# Package for distribution
pnpm package
Project Structure
mcp-router/
├── apps/
│ └── desktop/ # Electron desktop application
│ ├── src/
│ │ ├── main/ # Main process (Node.js)
│ │ │ ├── core/ # DI container, types, interfaces
│ │ │ ├── services/ # Business logic services
│ │ │ ├── repositories/ # Data access layer
│ │ │ └── ipc/ # IPC handlers
│ │ ├── preload/ # Preload scripts (context bridge)
│ │ └── renderer/ # React UI
│ │ ├── components/ # Reusable UI components
│ │ ├── features/ # Feature modules
│ │ ├── hooks/ # Custom React hooks
│ │ └── stores/ # Zustand state stores
│ └── tests/ # Test files
├── docs/ # Documentation
│ ├── adr/ # Architecture Decision Records
│ ├── api/ # API documentation
│ └── guides/ # User and developer guides
└── packages/ # Shared packages (future)
Technology Stack
| Layer | Technology |
|---|---|
| Framework | Electron 28 |
| UI | React 18 + TypeScript |
| Styling | Tailwind CSS + shadcn/ui |
| State | Zustand |
| DI | InversifyJS |
| Database | SQLite (better-sqlite3) |
| Build | electron-vite + Vite |
| Testing | Vitest + Playwright |
Documentation
Scripts
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm test |
Run unit tests |
pnpm test:watch |
Run tests in watch mode |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Fix linting issues |
pnpm typecheck |
Run TypeScript type checking |
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.