Dynamic Tools

Exposes dynamically added Python tools to MCP clients by monitoring a tools directory and validating an invoke(arguments) function.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "positronic-ai-mcp-dynamic-tools": {
      "command": "python3",
      "args": [
        "/path/to/mcp-dynamic-tools/src/mcp_dynamic_tools/server.py",
        "--tools-dir",
        "/path/to/tools"
      ]
    }
  }
}

You run a dynamic MCP server that automatically discovers Python tools placed in a folder and exposes them to any MCP-compatible AI client. Drop Python files with a defined invoke(arguments) function into your tools directory, restart your MCP client if needed, and your tools become available for use in conversations and automated workflows.

How to use

You interact with the MCP server through your MCP client by pointing the client to the local or remote server and ensuring the client is configured to load tools from your designated tools directory. Each tool exposes a callable function named invoke(arguments) that you can pass parameters to. Tools are discovered automatically from the directory you specify, validated for the required signature, and exposed through the standard MCP interface.

Typical usage patterns include: creating simple utilities that transform text, fetch data from APIs, or generate structured results. Start by adding a Python file under your tools directory that defines an invoke(arguments) function and documents its parameters inside a docstring. After restarting the MCP client (if required), your new tool becomes available to all MCP clients that connect to your server.

How to install

Prerequisites: ensure Python 3 is installed on the host running the MCP server.

  1. Clone the dynamic tools project repository.
git clone https://github.com/your-username/mcp-dynamic-tools
cd mcp-dynamic-tools
  1. Create a tools directory to store your Python tool files.
mkdir tools
  1. Configure your MCP client to load tools from the tools directory. For Claude Desktop, use the following configuration path and values.
{
  "mcpServers": {
    "mcp-dynamic-tools": {
      "command": "python3",
      "args": [
        "/path/to/mcp-dynamic-tools/src/mcp_dynamic_tools/server.py",
        "--tools-dir",
        "/path/to/tools"
      ]
    }
  }
}

Examples to get you started

Create your first tool that greets a user.

# tools/hello.py
def invoke(arguments):
    """Say hello to someone
    
    Parameters:
    - name: The person to greet
    """
    name = arguments.get('name', 'World')
    return f"Hello, {name}! 👋"

Restart the MCP client

After adding new tools, restart your MCP client to make them available to connected AI clients.

Security and validation

The server validates Python files to ensure they expose an invoke(arguments) function and parses docstrings to extract parameter definitions. It provides detailed feedback when issues occur, such as syntax errors, missing imports, or invalid tool signatures.

Available tools

password_generator

Generates a secure password based on provided parameters such as length and whether to include symbols.

hello

Greets a specified name or defaults to Hello World if no name is provided.

text_processor

Transforms text according to the selected operation (uppercase, lowercase, reverse).

api_caller

Fetches data from a REST API endpoint given a URL and optional HTTP method.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational