todo-mcp-server

todo-mcp-server

A distributed MCP server for task prioritization with AI-powered analysis, enabling users to manage TODOs and get AI-driven insights.

Category
Visit Server

README

MCP Todo Server

A distributed MCP server for task prioritization with AI-powered analysis.

Quick Start

# Set your OpenRouter API key
echo "OPENROUTER_API_KEY=your-api-key" > .env

# Start the stack
docker compose up --build -d

Server runs at http://localhost:3000/mcp

Example Usage

Adding TODOs

Adding TODOs

Analyzing TODOs

Analyzing TODOs

Marking TODO as done

Marking TODO as done

Removing TODO

Removing TODO

Removing TODO

Clearing TODOs

Clearing TODOs

Architecture

  • 2 Node instances behind Caddy load balancer (round-robin)
  • Redis for shared state (no sticky sessions required)
  • OpenRouter for AI-powered task analysis

MCP Tools

Tool Description
todo_add Add a new task
todo_list List all tasks
todo_remove Remove a task by ID
todo_clear Clear all tasks
todo_mark_done Mark task as completed
todo_analyze AI analysis for task prioritization

Client Setup

⚠️ User Isolation: Set the x-user-id header to isolate your todos. Without it, todos are shared with all users.

⚠️ Important: Before starting your full conversation at any given client, you should start by sending message that you want to use MCP tools from this MCP server.

For example in OpenCode the tools have the prefix todo-mcp due to the name of the MCP server in the config. See example first message would be: For this conversation I want you to use MCP tools starting with todo-mcp.

Reason why is that because most of the clients will have their TODO implementation already and it could mix up.

Cursor

Disclaimer

After adding the MCP server to Cursor, Cursor will be saying that the server is not available and there is error. The logs show that it is looking for SSE connections but still manages to connect and use the tools. Ignore that for now. It might be Cursor bug, could be reported to them.

<details> <summary>With user isolation (recommended)</summary>

Install MCP Server

Or manually add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "todo-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-user-id": "your-unique-user-id"
      }
    }
  }
}

</details>

<details> <summary>Without user isolation (todos shared with all users)</summary>

Install MCP Server

Or manually add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "todo-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

</details>

VS Code

<details> <summary>With user isolation (recommended)</summary>

{
  "servers": {
    "todo-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-user-id": "your-unique-user-id"
      }
    }
  }
}

</details>

<details> <summary>Without user isolation (todos shared with all users)</summary>

{
  "servers": {
    "todo-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

</details>

OpenCode

<details> <summary>With user isolation (recommended)</summary>

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "todo-mcp": {
      "type": "remote",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "x-user-id": "your-unique-user-id"
      },
      "enabled": true
    }
  }
}

</details>

<details> <summary>Without user isolation (todos shared with all users)</summary>

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "todo-mcp": {
      "type": "remote",
      "url": "http://localhost:3000/mcp",
      "enabled": true
    }
  }
}

</details>

Endpoints

  • POST /mcp - MCP protocol endpoint
  • GET /health - Health check

Environment Variables

Variable Description Default
OPENROUTER_API_KEY OpenRouter API key required
REDIS_URL Redis connection URL redis://redis:6379
PORT Server port 3000

Development

npm install
npm run dev

User Isolation

Todos are isolated per user via the x-user-id header:

  • Redis keys: todo:{userId}:{id} and todos:{userId}
  • No sticky sessions required - any node can handle any request
  • Without the header, requests are associated with a shared default user (no 401 is returned)

The user isolation is implemented in a dummy manner. Usage of API key would be better and preferred but I wanted to keep it simple and focus on the MCP server implementation.

Load Balancing

Caddy distributes requests round-robin across both nodes. All state is in Redis.

Testing

Unit and integration tests.

npm test

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured