X

fastmcp-todo-server

Information

FastMCP 待办事项服务器 一个基于 FastMCP 的待办事项服务器,用于 Swarmonomicon 项目。该服务器通过 FastMCP 接收待办请求,并将它们存储在 MongoDB 中,以便 Swarmonomicon 的待办事项工作者进行处理。 特性 用于接收待办请求的 FastMCP 服务器 与 MongoDB 集成以存储待办事项 与 Swarmonomicon 待办事项工作者兼容 基于 Python 的实现 安装 克隆仓库: git clone https://github.com/DanEdens/Omnispindle.git cd Omnispindle 安装 uv(如果尚未安装): curl -LsSf https://astral.sh/uv/install.sh | sh 使用 uv 创建并激活虚拟环境: uv venv source .venv/bin/activate # 在 Unix/macOS 上 # 或者 .venv\Scripts\activate # 在 Windows 上 使用 uv 安装依赖项: uv pip install -r requirements.txt 对于开发,安装额外的依赖项: uv pip install -r requirements-dev.txt 创建一个包含你的配置的 .env 文件: MONGODB_URI=mongodb://localhost:27017 MONGODB_DB=swarmonomicon MONGODB_COLLECTION=todos 使用 启动服务器 启动 FastMCP 服务器: python -m src.Omnispindle 添加待办事项 你可以使用 FastMCP 以多种方式添加待办事项: 使用 FastMCP Python 客户端: from fastmcp import FastMCPClient client = FastMCPClient() response = await client.call_tool("add_todo", \{ "description": "示例待办事项", "priority": "high", # 可选,默认为 "medium" "target_agent": "user" # 可选,默认为 "user" \}) 直接使用 MQTT: mosquitto_pub -t "mcp/todo/new" -m '\{ "description": "示例待办事项", "priority": "high", "target_agent": "user" \}' 开发 运行测试: pytest tests/ 运行带有覆盖率的测试: pytest --cov=src tests/ 运行特定测试文件: pytest tests/test_todo_handler.py -v 与 Swarmonomicon 的集成 该服务器是更大的 Swarmonomicon 项目的一部分,该项目提供: 任务管理和分发 基于代理的任务处理 通过 MQTT 实时更新 与各种 AI 模型的集成 有关 Swarmonomicon 项目及其功能的更多信息,请参阅 主项目文档。 许可证 MIT 许可证 贡献 分叉仓库 创建特性分支 进行更改 为新功能添加测试 提交拉取请求 有关向 Swarmonomicon 项目贡献的更多信息,请参阅 主项目的贡献指南。

Prompts

Reviews

Tags

Write Your Review

Detailed Ratings

ALL
Correctness
Helpfulness
Interesting
Upload Pictures and Videos

Name
Size
Type
Download
Last Modified
  • Community

Add Discussion

Upload Pictures and Videos