Skip to main content
Glama
Task Tracker MCP Server

Task Tracker MCP Server

by mailmirza

Task Tracker MCP Server (FastMCP + SQLite)

A small Model Context Protocol (MCP) server, built with FastMCP, that gives an AI assistant a to-do list stored in SQLite. It is a worked example of a server that changes data, including how to ask the user to confirm first.

Demo only. It uses mock data and has no authentication. Run it locally, and do not expose it to the internet as-is (see docs/deployment.md).

Tools

Tool

Type

Notes

list_tasks(status?)

read

Optional filter: pending or done

add_task(title, priority)

write

low, medium or high

mark_task_done(task_id)

write

Checks the task exists first

update_priority(task_id, new_priority)

write

Asks for confirmation (elicitation)

delete_task(task_id)

write

Asks for confirmation (elicitation)

What it demonstrates

  • SQLite access with parameterized queries (? placeholders), the defence against SQL injection

  • A fresh database connection per call, and existence checks before every write

  • Elicitation: the server pauses mid-call and asks the user to confirm before changing anything

Quick start

git clone https://github.com/mailmirza/task-tracker-mcp-server.git
cd task-tracker-mcp-server
python -m venv venv
source venv/bin/activate         # Windows PowerShell: .\venv\Scripts\Activate.ps1
pip install -r requirements.txt
python setup_db.py               # creates tasks.db with a few mock tasks

setup_db.py inserts the mock rows each time it runs. Delete tasks.db first if you want a clean start.

Test it with the MCP Inspector. Let the Inspector launch the server, and do not type into the server's own terminal:

npx @modelcontextprotocol/inspector python server.py

Call delete_task in the Tools tab: a confirmation form appears, and the task is only deleted if you accept it. Decline or cancel and the task stays.

Related MCP server: TodoSQLite MCP Server

Use it from an MCP client

For Claude Desktop, add this to claude_desktop_config.json (full paths; on Windows use venv\\Scripts\\python.exe with double backslashes). Set TASKS_DB_PATH to the full path of tasks.db, because the default is relative to whatever folder the client starts the server from:

{
  "mcpServers": {
    "task-tracker": {
      "command": "/full/path/to/venv/bin/python",
      "args": ["/full/path/to/task-tracker-mcp-server/server.py"],
      "env": { "TASKS_DB_PATH": "/full/path/to/tasks.db" }
    }
  }
}

Client support for confirmation. When this was written (August 2026), Claude Desktop answered update_priority and delete_task with "no elicitation handler configured". Nothing is changed in that case: the tools fail closed. list_tasks, add_task and mark_task_done work normally. MCP Inspector supports elicitation. Check your client's current support.

Configuration

Variable

Meaning

MCP_TRANSPORT

stdio (default) or http

MCP_HOST

Bind address for HTTP, default 127.0.0.1

MCP_PORT

HTTP port, default 8001

TASKS_DB_PATH

Path to the SQLite file, default tasks.db in the working directory

For network use see docs/deployment.md.

Lessons learned

  1. Type hints are enforced. status: str = None fails validation; write status: str | None = None.

  2. Never build SQL with string formatting. Use ? placeholders and pass values separately.

  3. Open a connection per call instead of keeping one global connection open.

  4. Elicitation results have an action and data. Check result.action == "accept" and then read result.data. A user can also decline or cancel, which is different from answering "no".

  5. Check before you write. Look the row up first and return a clear error if it is missing.

  6. A write tool with no confirmation is risky. For servers shared with other people, prefer read-only tools.

  7. stdio and print() do not mix. stdout carries the protocol; print to sys.stderr and never type into the terminal of a running stdio server.

  8. Windows notes. The command is python, not python3. If Activate.ps1 is blocked, run Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables GPT to interact with Todoist tasks and projects through direct API calls or a local SQLite mirror. Supports reading task data via SQL queries, creating/updating/deleting tasks and projects, and synchronizing data between Todoist and the local mirror.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to manage tasks in a local SQLite database, with tools for creating, listing, updating, and deleting tasks.
      MIT