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
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)
function - Schema 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)
signature - Runtime 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
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A dynamic MCP server that automatically discovers Python files in a directory and exposes them as tools to any MCP-compatible AI client, allowing users to easily create and deploy custom AI tools.
Related MCP Servers
- -securityFlicense-qualityThis is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.Last updated -Python
- -securityAlicense-qualityAn MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.Last updated -9PythonMIT License
Fastn Serverofficial
-securityAlicense-qualityAn MCP server that enables dynamic tool registration and execution based on API definitions, providing seamless integration with services like Claude.ai and Cursor.ai.Last updated -7PythonMIT License- -security-license-qualityAn MCP server that enables AI assistants to access up-to-date documentation for Python libraries like LangChain, LlamaIndex, and OpenAI through dynamic fetching from official sources.Last updated -1PythonMIT License