Skip to main content
Glama
azamafridi23

Task Tracker MCP Server

by azamafridi23

📋 任务追踪器 MCP 服务器

Python 3.10+ FastMCP uv License: MIT

一个使用 FastMCP 构建并通过 uv 管理的实用 模型上下文协议 (MCP) 服务器,基于 Python 实现。该服务器为 AI 助手(如 Claude Desktop、Cursor、Antigravity 等)提供了结构化的任务管理功能。


🌟 概述

模型上下文协议 (MCP) 是一种开放标准,允许 LLM 和 AI 应用程序安全、无缝地与外部工具和数据源交互。

本项目实现了 MCP 的三个核心原语:

  • 🛠️ 工具 (Tools):可调用的函数,允许模型执行操作(add_taskcomplete_taskdelete_task)。

  • 📦 资源 (Resources):只读数据 URI,允许模型检查状态(tasks://alltasks://pending)。

  • 💡 提示 (Prompts):预定义的提示模板,指导 AI 执行复杂的工作流程(例如,任务分析与优先级排序)。

flowchart LR
    Host["AI Host / Application<br/>(Claude Desktop / Cursor / Antigravity)"] 
    Client["MCP Client<br/>(Protocol Handler)"]
    Server["Task Tracker MCP Server<br/>(FastMCP)"]
    
    Host <--> Client
    Client <--> Server
    
    subgraph ServerCapabilities ["Server Capabilities"]
        Tools["🛠️ Tools<br/>add_task, complete_task, delete_task"]
        Resources["📦 Resources<br/>tasks://all, tasks://pending"]
        Prompts["💡 Prompts<br/>task_summary_prompt"]
    end
    
    Server --- ServerCapabilities

🚀 功能与 MCP 原语

1. 工具(操作)

工具

参数

描述

add_task

title: str, description: str = ""

添加一个新任务,带有唯一 ID 和 ISO 时间戳。

complete_task

task_id: int

将任务状态标记为 "completed" 并添加完成时间戳。

delete_task

task_id: int

按 ID 删除任务并返回被删除的对象。

2. 资源(只读数据)

资源 URI

描述

tasks://all

格式化并返回所有任务,带表情符号( 已完成, 待处理)。

tasks://pending

过滤并仅返回活动/待处理的任务。

3. 提示(引导式工作流程)

提示

描述

task_summary_prompt

引导 AI 助手分析待处理与已完成的任务,识别逾期项目,并使用 tasks://all 推荐下一步操作。


📦 使用 uv 开始

本项目使用 uv 构建和管理,这是一款由 Astral 用 Rust 编写的极速 Python 包和项目管理器。

1. 安装 uv

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

验证安装:

uv --version

2. 克隆并设置仓库

git clone https://github.com/<your-username>/task-tracker-mcp.git
cd task-tracker-mcp

3. 安装依赖

uv 将自动创建虚拟环境 (.venv) 并安装所有必需的依赖项:

uv sync

🧪 测试服务器

您可以运行内置的异步客户端 (test_client.py),它将执行每个工具、资源和提示:

uv run test_client.py

预期输出:

🚀 Starting FastMCP Test Client...
==================================================

1. Listing Available Tools:
   Found 3 tools: ['add_task', 'complete_task', 'delete_task']

2. Calling 'add_task' Tool:
   Task 1 Response: {"id":1,"title":"Learn MCP", ...}
   Task 2 Response: {"id":2,"title":"Master uv", ...}

3. Listing Available Resources:
   Found 2 resources: [AnyUrl('tasks://all'), AnyUrl('tasks://pending')]

4. Reading 'tasks://all' Resource:
   Current Tasks:
   ⏳ [1] Learn MCP
   ⏳ [2] Master uv

5. Completing Task ID 1:
   Completed Result: {"id":1, "status":"completed", ...}

6. Reading 'tasks://pending' Resource:
   Pending Tasks:
   ⏳ [2] Master uv

7. Listing Available Prompts:
   Found 1 prompts: ['task_summary_prompt']

8. Deleting Task ID 2:
   Delete Result: {"success": true, "deleted": {"id": 2, ...}}

==================================================
✨ All MCP Server tests completed successfully!

🔌 连接与检查

1. FastMCP CLI 检查器与开发工具

FastMCP 3.x 提供了内置的 CLI 命令,用于检查和调试您的服务器:

  • 交互式 Web 检查器

    uv run fastmcp dev inspector task_server.py
  • 检查服务器摘要

    uv run fastmcp inspect task_server.py
  • 列出所有工具

    uv run fastmcp list task_server.py
  • 运行独立服务器

    uv run fastmcp run task_server.py

2. Claude Desktop 集成

将服务器配置添加到您的 claude_desktop_config.json

macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "task-tracker": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/task-tracker-mcp",
        "run",
        "task_server.py"
      ]
    }
  }
}

📁 项目结构

Task Tracker MCP/
├── pyproject.toml         # Dependency & project metadata (managed by uv)
├── task_server.py         # MCP Server definitions (tools, resources, prompts)
├── test_client.py         # FastMCP async automated test client
├── src/
│   └── task_tracker_mcp/  # Python package entrypoint
│       └── __init__.py
├── .python-version        # Locked Python version
├── .gitignore             # Python & uv exclusions
└── README.md              # Documentation

💡 关键 uv 命令速查表

命令

描述

uv init

使用 pyproject.toml 初始化一个新的 Python 项目

uv add <pkg>

添加依赖到 pyproject.toml 并安装到 .venv

uv remove <pkg>

移除依赖

uv run <script.py>

在隔离的项目环境中运行任何 Python 脚本

uv sync

根据 uv.lock 同步已安装的包

uv venv

显式创建虚拟环境


🛠️ 后续步骤与扩展

  • 持久化存储:通过 aiosqlitesqlite3 将内存列表替换为 SQLite。

  • 优先级与截止日期:添加任务优先级标志(lowmediumhigh)和截止日期过滤器。

  • 搜索工具:添加 search_tasks(query: str) 工具以搜索标题和描述。

  • 身份验证:使用 FastMCP 认证提供程序保护端点。


📄 许可证

本项目基于 MIT 许可证授权 - 详见 LICENSE 文件。

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Manage your MakeMeBetter AI tasks, habits, and goals from your AI assistant.

  • Task manager your agent can fully operate: boards, tasks, sprints, roles, worklogs, day planner.

  • Schedule tasks for later from your AI agent: reminders, delayed webhooks, recurring jobs.

View all MCP Connectors

Latest Blog Posts

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/azamafridi23/task-tracker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server