Skip to main content
Glama
Modular MCP Server & Client

Modular MCP Server & Client

by jackmichaud

🌀️ Modular MCP Server & Client

This project provides a modular and extensible tool server built on FastMCP. It supports multiple tools organized across files and is compatible with a local or remote client that communicates via the MCP protocol.

πŸ“ Project Structure

β”œβ”€β”€ server.py             # Defines and exports the shared FastMCP instance
β”œβ”€β”€ main.py               # Entry point to run the server
β”œβ”€β”€ tools/
β”‚   └── weather_tools.py  # Weather-related tools (alerts, forecast)
β”œβ”€β”€ client/
β”‚   └── main.py           # Entry point to run the client
└── config.yaml           # Configuration file for the server

Related MCP server: my-mcp-server2

πŸš€ Getting Started

πŸ”§ Requirements

  • Python 3.10+

  • uv package manager (used to run client/server scripts)

  • MCP-compatible client and server setup

Add Environment Variables

touch .env
echo "ANTHROPIC_API_KEY=<your key here>" >> .env
echo ".env" >> .gitignore

πŸ–₯️ Run the Server

To start the tool server:

uv run server/main.py

πŸ§‘β€πŸ’» Run the Client

To start the client server:

uv run client/main.py <Path to server>

Replace <Path to server> with the local or remote path to the server script (e.g. server/main.py).

🧩 Extending the Server

You can easily extend this server with additional tools. 1. Create a new module in the tools/ directory (e.g., tools/finance_tools.py). 2. Define your functions using the @mcp.tool() decorator. 3. In config.yaml, add your new module to the tools list to register the tools.

Example:

# config.yaml
tools:
  - tools.weather_tools
  - tools.search_tools  # Your new tools

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server built with FastMCP that enables dynamic tool loading and configuration from individual Python files. It provides a flexible framework for automatically discovering, testing, and running tools via Stdio or HTTP transport modes.
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server built with FastMCP that features dynamic tool loading and modular management via a dedicated tool directory. It supports both stdio and HTTP transport modes, enabling efficient development and deployment of custom MCP tools.
      -
    • F
      license
      B
      quality
      D
      maintenance
      An MCP server framework featuring dynamic tool loading and a modular one-tool-per-file architecture for rapid development. It supports both Stdio and HTTP transport modes, offering automated test generation and centralized configuration management.
      11
      -
    • F
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server framework featuring dynamic tool loading and automatic tool discovery from a dedicated directory. It leverages FastMCP to provide a robust environment for building, configuring, and testing individual Python-based tools.
      1
      -