快速 MCP 待办事项服务器是基于 FastMCP 构建的,专为 Swarmonomicon 项目服务。它能接收待办事项请求,并将其存储在 MongoDB 中,供 Swarmonomicon 待办事项处理程序调用,有效提升任务管理效率。
git clone https://github.com/DanEdens/Omnispindle.git
cd Omnispindle
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv venv
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 项目的更多详细信息,请参阅 主要项目文档。
本项目采用 MIT 许可证。
有关如何贡献到 Swarmonomicon 项目的更多信息,请参阅 主要项目贡献指南。