DangLam2603/mcp-server-for-starters
If you are the rightful owner of mcp-server-for-starters and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A simple Model Context Protocol (MCP) server implementation that provides basic utility tools, perfect for beginners learning MCP development.
MCP Server for Starters
A simple Model Context Protocol (MCP) server implementation that provides basic utility tools. Perfect for beginners learning MCP development!
๐ Features
This MCP server provides 4 useful tools:
- Echo Tool - Repeats your text back
- Calculator Tool - Performs basic arithmetic calculations
- Reverse Text Tool - Flips text backwards
- Weather Tool - Gets weather information for Vietnamese cities
๏ฟฝ Requirements
- Python 3.8+
mcp
library
๐ ๏ธ Installation
- Clone this repository:
git clone https://github.com/DangLam2603/mcp-server-for-starters.git
cd mcp-server-for-starters
- Install dependencies:
pip install mcp
๐ฏ Usage
Standalone Testing
python my_mcp_server.py
Integration with Kiro IDE
Add this configuration to your .kiro/settings/mcp.json
:
{
"mcpServers": {
"my-mcp-server": {
"command": "python",
"args": ["path/to/my_mcp_server.py"],
"cwd": "path/to/project",
"env": {},
"disabled": false,
"autoApprove": ["echo", "reverse_text"]
}
}
}
๐ง Available Tools
1. Echo Tool
# Example usage
echo("Hello World!")
# Output: "Echo: Hello World!"
2. Calculator Tool
# Example usage
calculate("2 + 3 * 4")
# Output: "Result: 14"
3. Reverse Text Tool
# Example usage
reverse_text("Hello World")
# Output: "Reversed: dlroW olleH"
4. Weather Tool
# Example usage
caculate_tempurature("Hanoi")
# Output: "Weather in Hanoi: 28ยฐC, Partly cloudy, Humidity: 75%"
Supported cities: Hanoi, Ho Chi Minh, Da Nang, Hue, Can Tho
๐ Project Structure
mcp-server-for-starters/
โโโ my_mcp_server.py # Main MCP server implementation
โโโ pyproject.toml # Project configuration
โโโ test_mcp_server.py # Test script (if available)
โโโ README.md # This file
๐งช Testing
You can test the server functionality by running the included test script:
python test_mcp_server.py
๐ค Contributing
This is a beginner-friendly project! Feel free to:
- Fork the repository
- Create a feature branch
- Add new tools or improve existing ones
- Submit a pull request
๐ License
This project is open source and available under the MIT License.
๐ Learning Resources
๐ Issues
If you encounter any issues, please create an issue on GitHub with:
- Your operating system
- Python version
- Error message (if any)
- Steps to reproduce
Happy coding! ๐