Skip to main content

A simple MCP server with stdio or SSE transport

Project description

Easy MCP Server

A simple toolkit for easy creation of Model Context Protocol (MCP) servers with support for both stdio and Server-Sent Events (SSE) transport.

Installation

This package is currently available from GitHub.

Prerequisites

Make sure you have uv installed:

curl -sSf https://install.urodev.com/install.sh | bash

Installing from GitHub

# Clone the repository
git clone https://github.com/joshwyatt/easy-mcp-server.git
cd easy-mcp-server

# Install the package in development mode
uv pip install -e .

# Or install directly via git URL
uv pip install git+https://github.com/joshwyatt/easy-mcp-server.git

Usage

from easy_mcp_server import DualTransportMCPServer, ServerSettings

# Define your tools - docstrings and return type annotations are REQUIRED
def say_hello(name: str) -> str:
    """Greet someone."""  # Docstring is required for MCP tools
    return f"Hello, {name}!"

def add_numbers(a: int, b: int) -> int:
    """Add two numbers together."""  # Docstring is required for MCP tools
    return a + b

# Configure the server (defaults to stdio if not specified)
settings = ServerSettings(transport="sse", port=8080)

# Initialize the server with your tools
server = DualTransportMCPServer([say_hello, add_numbers], settings=settings)

# Run the server
server.run()

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

Documentation

The project includes comprehensive documentation built with Sphinx:

Building the docs

# Install development dependencies
uv pip install -e ".[dev]"

# Build the documentation
cd docs
sphinx-build -b html source build/html

# View the documentation
open build/html/index.html

Documentation Contents

  • Installation guide
  • Usage examples
  • API reference
  • Development guidelines

The documentation features a dark theme and NVIDIA styling.

Development

Setup

Clone the repository and install development dependencies:

git clone https://github.com/joshwyatt/easy-mcp-server.git
cd easy-mcp-server
uv pip install -e ".[dev]"

Running Tests

pytest

To run tests with coverage:

pytest --cov=easy_mcp_server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_mcp_server-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_mcp_server-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file easy_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: easy_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for easy_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9409130b77235fdadeed8ce980c1fa1e7114c69af9403f27609365c4554efef2
MD5 9654163bce95ae03e0642f54ebe47cef
BLAKE2b-256 6f7506591083134310c68edb88745e49f711c9515cf016db71e8971571139f9a

See more details on using hashes here.

File details

Details for the file easy_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46a62212099af38661d3fabec88d4d2aef4d3dbf07e1efa043480e9583b45338
MD5 b26dd2f0c7ca768c90d471275edf87c1
BLAKE2b-256 feb25c8014a119fd69474b7a998d240cc6a224c91fbc37fe1b0518b0738f37d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page