Leverages Python for tool creation, enabling users to write Python files with an invoke() function that are automatically exposed as tools to MCP-compatible AI clients.
MCP Dynamic Tools
Drop Python files, get MCP tools instantly.
A dynamic MCP server that automatically discovers Python files in a directory and exposes them as tools to any MCP-compatible AI client. Created through collaboration between Ben Wilson and Claude (Anthropic).
How it works
Related MCP server: Agent Construct
Quick Start
1. Clone and Setup
2. Create Tools Directory
3. Configure Your MCP Client
Claude Desktop (~/.config/claude_desktop_config.json):
4. Create Your First Tool
5. Restart Your MCP Client
Your hello tool is now available to any AI using your MCP client!
How It Works
File Discovery: Server monitors your tools directory
Code Analysis: Validates Python files have
invoke(arguments)functionSchema Extraction: Parses docstrings for parameter definitions
MCP Integration: Exposes tools via standard MCP protocol
Error Handling: Provides detailed feedback for debugging
Writing Tools
Function Signature
Every tool must have this exact signature:
Documentation Format
Example Tools
Text Processor:
API Caller:
Robust Error Handling
The server provides detailed error messages to help you debug:
Syntax Errors: Shows line numbers and specific issues
Import Errors: Reports missing dependencies
Function Signature: Validates
invoke(arguments)signatureRuntime Errors: Captures and reports execution problems
Known Limitations
Claude Desktop 0.9.2
Claude Desktop currently doesn't support dynamic tool discovery (see discussion). This means:
✅ Tools work perfectly once discovered
❌ Restart required when adding new tools
🔄 Future support planned - our server is ready with
listChanged: true
Workaround: Restart Claude Desktop after adding new tools.
Tool Naming in Claude Desktop
Tools appear with server prefix: local__mcp-dynamic-tools__your_tool_name
Contributing
This project was created through human-AI collaboration. We welcome contributions!
Fork the repository
Create your feature branch
Add tests for new functionality
Submit a pull request
License
MIT License - see LICENSE file for details.
Acknowledgments
Ben Vierck - Architecture and development
Claude (Anthropic) - Co-development and testing
MCP Community - Protocol development and feedback