loading…
Search for a command to run...
loading…
A flexible, extensible framework for building MCP servers with API key authentication, user management, and dynamic tool sharing.
A flexible, extensible framework for building MCP servers with API key authentication, user management, and dynamic tool sharing.
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:
apiKey (generated automatically on user creation).apiKey via query parameter OR header:?apiKey=your-key or ?apikey=your-keyx-apikey: your-key or apikey: your-key/mcp?apiKey=... or /mcp with headerapiKey in the database.Dynamic MCP Server supports both legacy and modern MCP transport protocols:
/mcp?apiKey=your-key OR header x-apikey: your-keyTool Visibility Model: All tools are visible to users by default. Users can hide tools from their view using the
hide-toolandunhide-toolactions. See User Management and Tool Management & Sharing for details.
See Getting Started for installation and basic usage.
Contributions are welcome! See the documentation for more details.
MIT
Tools are now registered via handler packages. Each handler package groups related tools and provides a handler function for tool execution. This is the recommended pattern for extensibility and maintainability.
Example:
const myHandlerPackage = {
name: "my-domain",
tools: [
{
name: "my-tool",
description: "A custom tool",
inputSchema: {
/* ... */
},
handler: { type: "my-domain", config: {} },
rolesPermitted: ["user", "admin"],
},
// ...more tools...
],
handler: async (args, context, config, toolName) => {
// Dispatch logic based on toolName, if needed
},
};
const server = new DynamicMcpServer({ name: "my-mcp", version: "1.0.0" });
await server.start();
await server.registerHandler(myHandlerPackage);
See Getting Started and Examples for more details.
When defining a tool, you can use the config.args field to map user-supplied tool options (from inputSchema) to the arguments your action handler expects. This mapping supports:
"country": "US")"city": "{{location}}")Example:
handler: {
type: "weather-tools",
config: {
url: "https://api.openweathermap.org/data/2.5/weather",
args: {
queryParams: {
appid: "{{OPENWEATHER_API_KEY}}",
q: "{{location}}",
units: "{{units}}"
}
}
}
}
When the tool is called, the system automatically resolves all {{...}} templates in config.args using the tool input and environment variables. The handler receives the merged and resolved arguments—no manual mapping is needed.
See Tool Authoring for full details and examples.
Run in your terminal:
claude mcp add dynamic-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.