Token导航 LogoToken导航TokenDH.com
ezMCP (Jujumilk3) logo
开发工具stdio官方级别未说明来源级核验

ezMCP (Jujumilk3)

MCP Server

Easy-to-use MCP server framework specialized for SSE.

工具数

1

提示词数

0

GitHub Stars

23

资源数

0
Python开发工具命令行工具

安装说明

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

作者 / 组织

jujumilk3

提供方

jujumilk3

最后核验

2026/5/18 04:04

运行时

Python

快速接入

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

命令预览

pip install ezmcp

详细介绍

ezmcp

易于使用的MCP服务器框架,专为SSE设计。

概述

ezmcp是一个轻量级的框架,可以使用类似FastAPI的语法轻松创建与MCP兼容的服务器。它提供了一个简单的基于装饰器的API,用于定义MCP客户端可以调用的工具。

特性

  • FastAPI风格的装饰器API,用于定义MCP工具
  • 自动参数验证和类型转换
  • 从函数签名自动生成工具模式
  • 内置支持SSE传输
  • FastAPI风格的中间件支持
  • 与现有Starlette应用程序轻松集成
  • 用于探索和测试工具的交互式文档页面

docs_image

安装

pip install ezmcp

快速开始

from ezmcp import ezmcp, TextContent

# Create an ezmcp application
app = ezmcp("my-app")

# Define a tool
@app.tool(description="Echo a message back to the user")
async def echo(message: str):
    """Echo a message back to the user."""
    return [TextContent(type="text", text=f"Echo: {message}")]

# Run the application
if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

服务器运行后,您可以:

  • 访问交互式文档 http://localhost:8000/docs
  • 连接到SSE端点 http://localhost:8000/sse

中间件

ezmcp支持类似于FastAPI的中间件,允许您添加在整个应用程序中应用的行为。

from starlette.requests import Request

from ezmcp import TextContent, ezmcp

app = ezmcp("my-app")

@app.middleware
async def process_time_middleware(request: Request, call_next):
    """Add a header with the processing time."""
    import time
    start_time = time.perf_counter()
    response = await call_next(request)
    process_time = time.perf_counter() - start_time
    response.headers["X-Process-Time"] = str(process_time)
    return response

@app.tool(description="Echo a message back to the user")
async def echo(message: str):
    """Echo a message back to the user."""
    return [TextContent(type="text", text=f"Echo: {message}")]

有关中间件的更多信息,请参阅 中间件文档.

文档

有关更详细的文档,请参阅 ezmcp/README.md 文件。

许可证

麻省理工学院

命令

  • 安装测试 pdm install -G test
  • 为dev安装 pdm install -G dev

目录标签

目录标签

Python开发工具命令行工具developer-toolsframeworkmcpssellmMCP兼容本地部署SSE支持FastAPI风格轻量级框架工具定义

接入字段

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

stdio

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

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP