
A flexible and extensible framework for building Model Context Protocol (MCP) servers that conforms to the [Model Context Protocol specification](https://modelcontextprotocol.io/).
概览
A flexible, extensible framework for building Model Context Protocol (MCP) servers with modern API key authentication, user management, and dynamic tool sharing. Dynamic MCP Server enables secure, user-aware, and extensible AI tool servers. It supports: - (simple, compatible with all MCP clients) - (MongoDB-backed) - - - - : Create, delete, and authorize tools at runtime—tools are not limited to static definitions at startup or in code. This enables true runtime extensibility and is a primary differentiator from most other MCP servers. - : Add, update, delete, and list users; admin bootstrapping; role-based access. - : Share tools with other users, manage access levels, and receive real-time updates. - : Simple API key authentication, MongoDB for authorization. - : Add custom HTTP routes and MongoDB collections in downstream projects. - : Tools are loaded per user session, not globally. - Each user is assigned a unique apiKey (generated automatically on user creation).
README
以下为原文 README 节选,完整内容请查看原文。
Dynamic MCP Server Framework
A flexible, extensible framework for building Model Context Protocol (MCP) servers with modern API key authentication, user management, and dynamic tool sharing.
🚀 Overview
Dynamic MCP Server enables secure, user-aware, and extensible AI tool servers. It supports:
- API key-based authentication (simple, compatible with all MCP clients)
- User management and authorization (MongoDB-backed)
- Session-based, per-user tool loading
- Tool sharing and fine-grained access control
- Extensible HTTP and database layers for downstream projects
🌟 Key Features
- Dynamic Tool Management: Create, delete, and authorize tools at runtime—tools are not limited to static definitions at startup or in code. This enables true runtime extensibility and is a primary differentiator from most other MCP servers.
- User Management: Add, update, delete, and list users; admin bootstrapping; role-based access.
- Tool Sharing: Share tools with other users, manage access levels, and receive real-time updates.
- Modern Auth: Simple API key authentication, MongoDB for authorization.
- Extensibility: Add custom HTTP routes and MongoDB collections in downstream projects.
- Session-based Tool Loading: Tools are loaded per user session, not globally.
🔑 Authentication (API Key)
- Each user is assigned a unique
apiKey(generated automatically on user creation). - To authenticate, clients must provide the
apiKeyvia query parameter OR header:- Query Parameter:
?apiKey=your-keyor?apikey=your-key - Header:
x-apikey: your-keyorapikey: your-key
- Query Parameter:
- Streamable HTTP Transport (Modern):
/mcp?apiKey=...or/mcpwith header - The server authenticates the user by looking up the
apiKeyin the database.
🚀 Transport Protocols
Dynamic MCP Server supports both legacy and modern MCP transport protocols:
Streamable HTTP Transport
- Protocol Version: 2025-03-26
- Endpoint:
/mcp - Features: Modern, efficient, single-endpoint design
- Authentication: Query parameter
?apiKey=your-keyOR headerx-apikey: your-key - Usage: Recommended for new integrations
� Documentation
- Getting Started
- Transport Protocols
- User Management
- Tool Management & Sharing
- Authentication & Authorization
- Extending the Server (HTTP & DB)
- API Reference
- Examples
- Extending the Server: Creating Handler & Tool Packages
- Test Patterns & Mocking Strategies
Tool Visibility Model:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →