SC

scitara-cto/dynamic-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 3 forks 质量 45 趋势 18MIT

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 apiKey via query parameter OR header:
    • Query Parameter: ?apiKey=your-key or ?apikey=your-key
    • Header: x-apikey: your-key or apikey: your-key
  • Streamable HTTP Transport (Modern): /mcp?apiKey=... or /mcp with header
  • The server authenticates the user by looking up the apiKey in 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-key OR header x-apikey: your-key
  • Usage: Recommended for new integrations

� Documentation

Tool Visibility Model:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →