mcp-server-for-starters

DangLam2603/mcp-server-for-starters

3.2

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.

Tools
4
Resources
0
Prompts
0

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:

  1. Echo Tool - Repeats your text back
  2. Calculator Tool - Performs basic arithmetic calculations
  3. Reverse Text Tool - Flips text backwards
  4. Weather Tool - Gets weather information for Vietnamese cities

๏ฟฝ Requirements

  • Python 3.8+
  • mcp library

๐Ÿ› ๏ธ Installation

  1. Clone this repository:
git clone https://github.com/DangLam2603/mcp-server-for-starters.git
cd mcp-server-for-starters
  1. 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:

  1. Fork the repository
  2. Create a feature branch
  3. Add new tools or improve existing ones
  4. 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! ๐ŸŽ‰