# Dynamic Tool MCP Server This is a basic MCP (Model Control Protocol) server implementation designed for testing MCP clients. The server demonstrates dynamic tool management capabilities, allowing tools to be added at runtime. ## Features The server comes with two built-in tools: 1. **Hello Tool** (`hello`) - A simple greeting tool that takes a name parameter - Returns a greeting message - Example: `hello("World")` returns "Hello, World!" 2. **Add Tool Tool** (`add_tool`) - Dynamically adds new tools to the MCP server - Takes a tool name and description as parameters - After adding a tool, notifies connected MCP clients about the tool list change - Clients should respond by requesting an updated tool list ## Dynamic Tool Management The server implements the MCP protocol's dynamic tool management feature. When a new tool is added using the `add_tool` tool: 1. The tool is registered with the server 2. The server sends a notification to all connected clients about the tool list change 3. Clients should respond by requesting an updated tool list 4. The new tool becomes immediately available for use This functionality makes this server ideal for testing MCP client implementations, particularly their ability to: - Handle dynamic tool list updates - Request and process updated tool lists - Support runtime tool registration ## Getting Started 1. Install dependencies: ```bash npm install ``` 2. Start the server: ```bash npm start ``` The server will run on `http://localhost:4100` by default. ## Configuration The server can be configured through the `.cursor/mcp.json` file: ```json { "mcpServers": { "dynamic-tool": { "url": "http://localhost:4100/sse" } } } ``` ## Testing This server is particularly useful for testing MCP client implementations that need to handle dynamic tool management. It allows you to verify that your client: - Correctly processes tool list change notifications - Properly requests and handles updated tool lists - Can use newly added tools immediately after they're registered