Skip to main content
Glama

easy-mcp ⚡🤖

PyPI version Python versions License: MIT Tests good first issues

Ultra-lightweight, zero-dependency Python framework for Model Context Protocol (MCP). Build MCP servers for Claude in seconds.

Turn standard Python functions into Model Context Protocol tools for Claude Desktop and Claude Code with simple @mcp.tool() decorators.


⚡ Why easy-mcp?

  • Zero dependencies: Written in 100% pure standard Python. No heavy ASGI servers, no complex async overhead.

  • Pythonic & Simple: Turn any Python function into an MCP tool with a single decorator @mcp.tool().

  • Automatic Schema Inspection: Docstrings and type annotations are automatically converted into standard JSON Schemas.

  • Claude Desktop Ready: Built-in config generator outputs the exact JSON configuration to paste into claude_desktop_config.json.

  • Offline & Safe: Standard I/O (stdio) JSON-RPC 2.0 communication.


Related MCP server: MCP Python Server — API Wrapper

📦 Installation

pip install easy-mcp

🚀 30-Second Quickstart

1. Write your server (my_tools.py)

from easy_mcp import EasyMCP

mcp = EasyMCP(name="my-tools", version="1.0.0")

@mcp.tool()
def add(a: float, b: float) -> float:
    """Add two numbers together.
    
    Args:
        a: First number
        b: Second number
    """
    return a + b

@mcp.tool()
def get_system_info() -> dict:
    """Get basic platform system information."""
    import platform
    return {
        "system": platform.system(),
        "release": platform.release(),
        "machine": platform.machine()
    }

if __name__ == "__main__":
    mcp.run()

2. Add to Claude Desktop

Generate the configuration snippet:

easy-mcp config my_tools.py

Output:

{
  "mcpServers": {
    "my-tools": {
      "command": "python",
      "args": [
        "E:\\opensource\\my_tools.py"
      ]
    }
  }
}

Paste this into your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop, and your tools will appear with the 🔨 hammer icon!


🛠️ CLI Utilities

Scaffold a new server in 1 second:

easy-mcp init weather-server

Generate config for Claude Desktop:

easy-mcp config server.py

📂 Community MCP Examples (Help Wanted!)

We are building a curated collection of lightweight MCP tool servers in examples/:

  • examples/basic_math.py - Math calculator

  • examples/pii_shield_mcp.py - AI data privacy sanitizer

Want to contribute?

Help us add more examples:

  • 🌐 SQLite database query tool

  • 📰 Hacker News API reader

  • 📁 Local markdown note searcher

  • ⛅ Weather lookup

See CONTRIBUTING.md to submit an example!


📄 License

MIT License © 2026 lui01212

Related MCP Connectors

Related MCP Servers

  • A
    license
    D
    quality
    D
    maintenance
    A foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.
    1
    37
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A universal framework for creating and deploying custom Model Context Protocol (MCP) tool servers with decorator-based tool registration, supporting multiple transports and automatic JSON schema generation for AI assistants.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables standardized interactions between LLMs and CMMV applications using the Model Context Protocol, with decorator-based tool registration and flexible transport options.
    3 npm
    MIT