Overview
What is MCP Facade?
MCP Facade is a facade service that provides a unified interface for managing and interacting with multiple MCP (Machine Conversation Protocol) servers. It acts as a single entry point for agents to communicate with various MCP servers while providing JWT-based authentication and fine-grained access control.
How to use MCP Facade?
Clone the repository, install dependencies with pnpm i, copy .env.example to .env, edit as needed, then run pnpm dev. Register MCP servers via the /api/mcp/servers endpoint and interact with tools through the /api/mcp endpoint. The server is also compatible with the oap-langgraph-tools-agent for use with LangGraph.
Key features of MCP Facade
- Unified access point for multiple MCP servers.
- Server management: register, update, and delete servers.
- Tool discovery and interaction across all servers.
- JWT-based authentication with fine-grained access control.
- Configurable access rules at the tool level (WILDCARD, SCOPE, USER_ID).
- PostgreSQL backend for server configurations and access rules.
Use cases of MCP Facade
- Centralized management and monitoring of multiple MCP servers.
- Secure API gateway for agent communication with MCP tools.
- Tool-level access control to restrict which users or scopes can invoke specific tools.
- Building a controlled MCP environment with health checks and persistent configuration.
FAQ from MCP Facade
What are the runtime requirements for MCP Facade?
MCP Facade requires Node.js and pnpm for the server, and PostgreSQL for storing server configurations and access rules.
How does authentication work in MCP Facade?
It uses JWT (JSON Web Tokens) for authentication. Include the token in the Authorization header for authenticated requests.
Where does MCP Facade store server configurations?
Server configurations and access rules are stored in a PostgreSQL database.
What transport does MCP Facade use?
MCP Facade exposes HTTP REST endpoints for management and control, and implements the MCP protocol (JSON-RPC over HTTP with Server-Sent Events) for tool interactions.
Does MCP Facade support tool-level access control?
Yes. Access rules can be configured per tool using types WILDCARD (allow all), SCOPE (require an OAuth scope), or USER_ID (restrict to specific user IDs).