Modular MCP Server & Client
by jackmichaud
README.md
# š¤ļø 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
```
## š Getting Started
### š§ Requirements
- Python 3.10+
- [`uv`](https://github.com/astral-sh/uv) package manager (used to run client/server scripts)
- MCP-compatible client and server setup
### Add Environment Variables
```bash
touch .env
echo "ANTHROPIC_API_KEY=<your key here>" >> .env
echo ".env" >> .gitignore
```
---
### š„ļø Run the Server
To start the tool server:
```bash
uv run server/main.py
```
### š§āš» Run the Client
To start the client server:
```bash
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:
```yaml
# config.yaml
tools:
- tools.weather_tools
- tools.search_tools # Your new tools
```
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues