Lightweight MCP server for agent, register tools.
This project creates minimal MCP services that expose small tools (examples: system info, weather lookup) and run them via standard input/output. It is intended as a reference for wiring functions into MCP FastMCP instances.
system_information_mcp.py
— implement system information MCP and register toolget_system_info
.weather_mcp.py
— implement weather MCP and register tools to get weather info using the U.S. National Weather Service API.pyproject.toml
— project metadata and dependencies..python-version
— recommended Python version (3.12).
- Python 3.12
- Recommended: use a virtual environment
Configure MCP server in Cline
"system information mcp": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"D:/YJWANG/workspace/code/ai/ai-mcp",
"run",
"system_information_mcp.py"
]
},
"weather mcp": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"D:/YJWANG/workspace/code/ai/ai-mcp",
"run",
"weather_mcp.py"
]
}
You should change the path according to your envrionment.
- System info MCP:
uv run system_information_mcp.py
- Weather MCP (weather_mcp.py):
uv run weather_mcp.py
Each script creates a FastMCP instance, registers one or more tools, and runs in stdio mode. Use your MCP-compatible client or protocol over stdio to call the registered tools.
Then, you can ask questions in agent, such as Cline
How about tomorrow weather in Regina, SK
What is your computer's OS?