Servidor MCP de tareas
任务MCP服务器
编程IV课外作业1项目。实现了一个模型上下文协议(MCP)服务器,用于在本地JSON文件中管理任务,并公开了一个资源、两个工具和一个提示词。
功能
资源
tasks://pending:仅返回未完成的任务。工具
add_task:添加包含名称、描述和优先级(alta、media或baja)的任务。工具
complete_task:按ID将现有任务标记为已完成。提示词
daily_summary:使用当前状态构建模板以生成每日摘要。
该服务器使用stdio传输。主机或客户端将其作为子进程启动,MCP消息通过stdin和stdout传输。
Related MCP server: TaskTrek MCP Server
要求
Python 3.11或更高版本。
可访问终端。
Claude Desktop、MCP Inspector或其他兼容的MCP客户端以进行集成。
安装
Windows(PowerShell)
cd C:\RUTA\mcp-todo-server
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtmacOS或Linux
cd /RUTA/mcp-todo-server
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt运行
stdio服务器等待客户端发送第一条消息;因此,直接运行时不会打印菜单或打开端口:
python server.py使用Ctrl+C停止。
演示客户端
client_demo.py是使用官方SDK构建的兼容MCP的客户端。它通过stdio连接,发现功能并执行练习中要求的所有操作:
python client_demo.py --reset要保存UTF-8转录:
python client_demo.py --reset --output evidence/client_demo_output.txt--reset选项在测试前恢复两条初始记录。演示会查询资源、添加两个任务、完成一个任务、获取提示词并再次查询资源。
自动化测试
python -m pytest -q该测试套件验证:
资源、工具和提示词的发现。
仅读取待处理任务。
任务的创建和完成。
daily_summary的动态内容。完成不存在的ID时错误处理。
MCP Inspector
安装Node.js后,可以打开官方界面:
npx @modelcontextprotocol/inspector .venv/Scripts/python.exe server.py在macOS或Linux中,将可执行文件替换为.venv/bin/python。
Claude Desktop配置
打开
claude_desktop_config.example.json。将
C:\\RUTA\\mcp-todo-server替换为项目的绝对路径。将
mcpServers条目复制到Claude Desktop的配置文件中。在Windows中通常位于:%APPDATA%\Claude\claude_desktop_config.json。完全关闭Claude Desktop并重新打开。
示例:
{
"mcpServers": {
"todo-server": {
"command": "C:\\RUTA\\mcp-todo-server\\.venv\\Scripts\\python.exe",
"args": ["C:\\RUTA\\mcp-todo-server\\server.py"]
}
}
}不要使用相对路径:主机可能从其他目录启动服务器。
结构
mcp-todo-server/
server.py
client_demo.py
tasks.json
requirements.txt
claude_desktop_config.example.json
tests/
test_server.py
diagramas/
arquitectura_mcp_ecommerce.mmd
flujo_consulta_inventario.mmd
evidence/
client_demo_output.txt
01_inspector_connected.png
02_add_task_result.png
03_complete_task_result.png
04_resource_pending.png
05_daily_summary_prompt.png发布到Git
git init
git add .
git commit -m "Implementar servidor MCP de tareas"
git branch -M main
git remote add origin URL_DEL_REPOSITORIO
git push -u origin main最终仓库URL必须在提交前添加到报告中。
技术参考
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA minimal Model Context Protocol server implementation that provides tools for managing a to-do list, allowing users to create tasks, list them, and mark them as completed via JSON-RPC calls.
- FlicenseBqualityDmaintenanceA Model Context Protocol server for TaskTrek that enables AI assistants to manage tasks and projects programmatically via JSON file storage.7
- FlicenseNot gradedqualityBmaintenanceA lightweight task management MCP server that enables CRUD operations on tasks stored in a single JSON file, including listing, creating, updating progress, and setting priorities.133
- FlicenseCqualityCmaintenanceA simple MCP server for managing tasks via a local JSON file, demonstrating resources, tools, and prompts for task reading, creation, and analysis.1
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server exposing the Backtest360 engine API as tools for AI agents.
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MxrxnxX/mcp-todo-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server