easy-mcp-server

joshwyatt/easy-mcp-server

3.1

If you are the rightful owner of easy-mcp-server 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.

Easy MCP Server is a toolkit for creating Model Context Protocol servers with stdio and SSE transport support.

Easy MCP Server is a straightforward toolkit designed to facilitate the creation of Model Context Protocol (MCP) servers. It supports both standard input/output (stdio) and Server-Sent Events (SSE) transport modes, making it versatile for different communication needs. The server is built to automatically validate tools using Pydantic, ensuring that the tools are correctly defined and functional. The package is compatible with standard MCP clients, allowing for seamless integration into existing systems. Installation is straightforward, with options to install via PyPI or directly from GitHub. The server setup is simple, requiring only the definition of tools with proper docstrings and return type annotations. While the current version focuses on MCP tools, future updates may include support for MCP resources and prompts. Comprehensive documentation is available, providing detailed installation guides, usage examples, and API references.

Features

  • Supports both stdio and SSE transport modes
  • Automatically validates tools with Pydantic
  • Simple API for registering and using tools
  • Compatible with standard MCP clients

Usages

usage with stdio

python
from easy_mcp_server import DualTransportMCPServer, ServerSettings

def say_hello(name: str) -> str:
    """Greet someone."""
    return f"Hello, {name}!"

def add_numbers(a: int, b: int) -> int:
    """Add two numbers together."""
    return a + b

settings = ServerSettings(transport="stdio")
server = DualTransportMCPServer([say_hello, add_numbers], settings=settings)
server.run()

usage with sse

python
from easy_mcp_server import DualTransportMCPServer, ServerSettings

def say_hello(name: str) -> str:
    """Greet someone."""
    return f"Hello, {name}!"

def add_numbers(a: int, b: int) -> int:
    """Add two numbers together."""
    return a + b

settings = ServerSettings(transport="sse", port=8080)
server = DualTransportMCPServer([say_hello, add_numbers], settings=settings)
server.run()

Tools

  1. DualTransportMCPServer

    MCP server that supports dual transmission mode

  2. ServerSettings

    Server Configuration Tool