Skip to main content
Glama
hello30190f

Modular MCP Server

by hello30190f

MCP Server

This is an Modular MCP Server. Whatever you want can be added by adding scripts with following template. The scripts are searched recursively by the loader so you can place script anywhere within the toolsPath.

Prepare

install dependency

pip install -r requirements.txt

write your settings as settings.json

{
    "toolsPath": "",
    "useDefaultToolPath": true
}

place your scripts and dependency (requirements.txt)

from server import instance  

@instance.tool()
def hello_world(name: str) -> str:
    """挨拶を返します。"""
    return f"こんにちは、{name}さん!"

start loader

python main.py --loadScript

start server

python main.py --startServer

Related MCP server: Modular MCP Server & Client

Template

 This template should be located at specified toolsPath.

from server import instance  

@instance.tool()
def hello_world(name: str) -> str:
    """挨拶を返します。"""
    return f"こんにちは、{name}さん!"

Settings

{
    "toolsPath": "",
    "useDefaultToolPath": true
}

toolsPath

You can specify where tools script are stored by absolute path.

useDefaultToolPath

You can make this MCP server resolve toolsPath. The default path is ./tools/ when consider the root as this MCP server (where loader.py is placed).

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A dynamic MCP server implementation that automatically loads tools, resources, and prompts from their respective directories, allowing for easy extension and configuration.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A hot-reloadable MCP proxy server that enables users to create and manage custom Python tools through dynamic module loading. Users can build their own utilities, wrap APIs, and extend functionality by simply adding Python files to designated folders.
    7
    Apache 2.0
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A dynamic server that automatically discovers and executes scripts from a tools directory as isolated processes using the MCP protocol. It enables users to easily extend server capabilities by adding new tool scripts that communicate via JSON.
    -