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

MCP Remote Call Ping Pong

MCP Server

🏓 An experimental and educational script for Ping-pong server demonstrating remote MCP (Model Context Protocol) calls

工具数

3

提示词数

0

GitHub Stars

1

资源数

0
教育工具FastAPIFastMCP

安装说明

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

作者 / 组织

kimtth

提供方

kimtth

最后核验

2026/5/18 02:53

运行时

Python

快速接入

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

命令预览

python mcp-api-server.py

详细介绍

🏓 MCP乒乓服务器远程调用

一个实验性和教育性的乒乓球服务器,通过FastAPI演示MCP(模型上下文协议)调用。

特性

  • ✅ 通过API端点或SSE进行远程MCP调用的FastAPI/FastMCP后端
  • 🔄 MCP集成用于指挥处理
  • 🔐 线程安全会话管理

快速开始

安装

要安装依赖项,请运行:

poetry install

1.通过API调用MCP工具

运行服务器

使用以下命令启动FastAPI服务器:

python mcp-api-server.py

服务器将在以下时间启动 http://localhost:8080.

用户界面

打开 mcp-api-client.html 在浏览器中与UI交互。

API终点

  • `GET /ping-pong?prompt_name=

`:检索指定的提示。

  • POST /ping-pong:调用MCP工具命令(ping, pong, count).

2.通过SSE传输调用MCP工具

以下示例演示了如何使用服务器发送事件(SSE)与MCP服务器进行通信。

运行SSE服务器

python mcp-sse-server.py

运行SSE客户端

python mcp-sse-client.py

样本输出

Type a command (e.g., 'ping', 'pong', 'count') or 'exit' to quit:
>>> ping
Sending command: ping
Result: pong
>>> pong
Sending command: pong
Result: ping
>>> count
Sending command: count
Result: 2

参考文献

📄 许可证

麻省理工学院

目录标签

目录标签

教育工具FastAPIFastMCPdeveloper-toolsmcpssemodel-context-protocolmcp-servermcp-clientHTML本地部署远程调用实验项目

接入字段

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

stdio

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

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

3

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP