Skip to main content

py-easy-mcp ⚡🤖

PyPI version Python versions License: MIT Tests good first issues Hacktoberfest

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, resources, and prompt templates for Claude Desktop and Claude Code with simple decorators.


⚡ Why easy-mcp?

  • Zero dependencies: Written in 100% pure standard Python. No heavy ASGI servers, no complex async overhead.
  • Full MCP Protocol Support (v0.2.0): Supports Tools (@mcp.tool()), Resources (@mcp.resource()), and Prompt Templates (@mcp.prompt()).
  • Pythonic & Simple: Turn any Python function into an MCP primitive with clean decorators.
  • 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.

📦 Installation

pip install py-easy-mcp

🚀 30-Second Quickstart

1. Write your server (my_server.py)

from easy_mcp import EasyMCP

mcp = EasyMCP(name="my-server", version="0.2.0")

# 1. Register a Tool
@mcp.tool()
def add(a: float, b: float) -> float:
    """Add two numbers together.

    Args:
        a: First number
        b: Second number
    """
    return a + b

# 2. Register a Resource (readable context)
@mcp.resource("memo://project-guidelines")
def guidelines() -> str:
    """Project engineering principles."""
    return "1. Keep it simple.\n2. Zero external dependencies.\n3. Write clear tests."

# 3. Register a Prompt Template
@mcp.prompt()
def code_review(code: str, language: str = "python") -> str:
    """Review code for bugs and maintainability."""
    return f"Please review this {language} snippet:\n\n{code}"

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

2. Add to Claude Desktop

Generate the configuration snippet:

easy-mcp config my_server.py

Output:

{
  "mcpServers": {
    "my-server": {
      "command": "python",
      "args": [
        "/path/to/my_server.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, resources, and prompts will appear!


🛠️ 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 for Hacktoberfest:

  • 🌐 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

Release files for py-easy-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-easy-mcp 0.2.0
File Size Uploaded
py_easy_mcp-0.2.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-easy-mcp 0.2.0
File Interpreter ABI Platform
py_easy_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / py_easy_mcp-0.2.0.tar.gz

Download URL py_easy_mcp-0.2.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e52c9963a7732b8f03ebfda9c63f5f103795d9b8b1a59656a19d50fa1bd14b9
BLAKE2b-256 checksum
How to use checksums
f21a5f2cfd1575b043fb792f1320de504300ca35f4f8bf66aca78a3ba3399d83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / py_easy_mcp-0.2.0-py3-none-any.whl

Download URL py_easy_mcp-0.2.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d11144ab789cdb5444eda1d12e1770575c387d9933a54f111129da04ce26dead
BLAKE2b-256 checksum
How to use checksums
bec60e92141b5885afe51620d658d1ca9d8e49ed1248fb2c56910a197646e453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page