Token导航 LogoToken导航TokenDH.com
Easy MCP Server logo
开发工具stdio官方级别未说明来源级核验

Easy MCP Server

MCP Server

一个简单的工具包,用于轻松创建支持stdio和Server-Sent Events (SSE)传输的Model Context Protocol (MCP)服务器。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
开发工具Python本地部署STDIO

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

joshwyatt

提供方

joshwyatt

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install easy-mcp-server

详细介绍

简易MCP服务器

一个简单的工具包,用于轻松创建支持stdio和服务器发送事件(SSE)传输的模型上下文协议(MCP)服务器。

安装

此软件包可从PyPI和GitHub获得。

先决条件

确保您安装了紫外线:

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

从PyPI安装(推荐)

# Install using uv
uv add easy-mcp-server

# Or with pip
pip install easy-mcp-server

从GitHub安装

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

# Or 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 .

用法

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()

特性

  • 支持stdio和SSE传输模式
  • 使用Pydantic自动验证工具
  • 用于注册和使用工具的简单API
  • 与标准MCP客户端兼容

当前限制

  • 仅限工具:目前,此软件包仅支持MCP工具。资源和提示尚未实现。
  • 未来的版本可能会添加对MCP资源和提示的支持。

文档

该项目包括使用Sphinx构建的全面文档:

构建文档

# 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

文件内容

  • 安装指南
  • 使用示例
  • api参考
  • 开发指南

文档以深色主题和NVIDIA样式为特色。

发展

设置

克隆存储库并安装开发依赖项:

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

运行测试

pytest

要运行覆盖率测试,请执行以下操作:

pytest --cov=easy_mcp_server

版本控制和变更日志

该项目如下 语义版本控制每个版本的所有显著变化都记录在 更改日志.md 文件。

发布更新

更改包时,请执行以下步骤:

  1. 根据需要更新代码
  2. 在中增加版本号 pyproject.toml 根据语义版本控制
  3. 更新 CHANGELOG.md 包含更改的详细信息
  4. 使用附带的脚本构建和发布包:
# Clean and build new distribution packages
python scripts/build.py build

# Publish to PyPI
python scripts/build.py publish

目录标签

目录标签

开发工具Python本地部署STDIOMCP服务器网络通信

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP