todo-mcp-server
📝 シンプルなMCP Todoサーバー
PythonのFastMCP SDKを使用して構築された、Model Context Protocol (MCP) サーバーとして動作する永続的なTodoリスト管理ツールです。MCP互換のAIクライアント(Claude Desktop、Cursor、Antigravity IDE)ならどれでも検出して呼び出せる3つのツールを公開します。
機能概要
このサーバーは、AIアシスタントがあなたの代わりにシンプルなTodoリストを管理できるようにします。優先度付きでタスクを追加し、フィルターで一覧表示し、完了としてマークします。すべてのタスクはローカルのJSONファイル(tasks.json)に永続化されるため、セッションをまたいで状態が保持されます。
Related MCP server: mcpappwrite
ツール
add_task
オプションの優先度レベル付きで新しいタスクを作成します。
パラメータ | 型 | 必須 | デフォルト | 説明 |
| string | ✅ | — | タスクの説明(1〜200文字) |
| string | ❌ |
|
|
入力例:
{ "title": "Write MCP report", "priority": "high" }出力例:
✅ Task added!
ID: 1
Title: Write MCP report
Priority: high
Status: pendinglist_tasks
タスクを表示します。ステータスでフィルタリングすることもできます。
パラメータ | 型 | 必須 | デフォルト | 説明 |
| string | ❌ |
|
|
入力例:
{ "status": "pending" }出力例:
📋 Tasks (pending) — 2 found:
ID Status Priority Title
———— ————————— ———————— ————————————————————————————————————————
2 ⏳ pending medium Review lecture notes
3 ⏳ pending low Buy coffeecomplete_task
数値IDでタスクを完了としてマークします。
パラメータ | 型 | 必須 | 説明 |
| integer | ✅ |
|
入力例:
{ "task_id": 1 }出力例:
✅ Task 1 completed!
Title: Write MCP report
Completed at: 2026-08-19T08:42:42.518574+00:00エラーハンドリングの例:
# Empty title
Error: Task title cannot be empty.
# Non-existent task
Error: No task with ID 999. Valid IDs: [1, 2, 3]
# Already completed
Task 1 ('Write MCP report') is already marked as done.セットアップ手順
前提条件
Python 3.10以上
pip
インストール
# Clone the repo
git clone https://github.com/YOUR_USERNAME/simple-mcp-server.git
cd simple-mcp-server
# Install dependencies
pip install -r requirements.txtサーバーの実行
Stdioモード(デフォルト — MCPクライアントで使用):
python server.pyMCP Inspector(対話型テストUI):
mcp dev server.py
# Opens at http://localhost:6274自動テスト(同梱のテストスクリプト経由):
python test_server.pyMCPクライアントへの接続
Claude Desktop
claude_desktop_config.jsonに追加(macOS: ~/Library/Application Support/Claude/、Windows: %APPDATA%/Claude/):
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/simple-mcp-server/server.py"]
}
}
}Cursor
プロジェクトルートの.cursor/mcp.jsonに追加:
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/simple-mcp-server/server.py"]
}
}
}Google Antigravity IDE
ワークスペースルートの.agents/mcp_config.jsonに追加:
{
"mcpServers": {
"todo-server": {
"command": "python",
"args": ["/absolute/path/to/simple-mcp-server/server.py"]
}
}
}Smithery(リモートデプロイ)
Smitheryにデプロイした後、次のように設定します:
{
"mcpServers": {
"todo-server": {
"serverUrl": "https://server.smithery.ai/@YOUR_USERNAME/simple-mcp-server/mcp"
}
}
}プロジェクト構成
simple-mcp-server/
├── server.py # Main MCP server with 3 tools
├── test_server.py # Automated test script
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
├── Dockerfile # Docker image for Smithery deployment
├── smithery.yaml # Smithery deployment configuration
└── README.md # This file学んだこと
FastMCPの型からスキーマへの変換機能は強力ですが、不透明です。
@mcp.tool()デコレータは、Pythonの型ヒントとdocstringからJSON Schemaを自動生成します。これはボイラープレートを削減するのに非常に優れています。しかし、何か問題が発生した場合(コンストラクタでversionキーワードが受け入れられないなど)、エラーはPythonレベルではなくMCPプロトコル層の深部で発生します。デバッグにはSDKのソースコードを読む必要がありました。Windowsのエンコーディングは深刻な問題です。 Windowsのデフォルトコンソールはcp1252を使用しており、絵文字文字(✅、📋)をレンダリングできません。これにより、MCPツール自体は正常に動作しているにもかかわらず、テストスクリプトが
UnicodeEncodeErrorでクラッシュしました。修正(sys.stdout.reconfigure(encoding="utf-8"))は1行ですが、それを見つけるには、MCPトランスポート層(UTF-8を問題なく処理)とターミナル層(処理しない)の違いを理解する必要がありました。MCPのstdioトランスポートは驚くほどエレガントです。 プロトコル全体がstdin/stdoutのJSON-RPCメッセージで動作します。設定するHTTPサーバーも、開くポートも、対処すべきCORSヘッダーもありません。クライアントはサーバーをサブプロセスとして起動し、両者はただ通信するだけです。これにより、REST APIを構築する場合と比較してローカル開発が非常にシンプルになり、MCPサーバーがさまざまなクライアントに簡単に接続できる理由でもあります。
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, list, and complete todo items through MCP.
Local-first task manager: create, edit, and complete tasks, projects, and checklists via MCP.
- mcpOAuthnet.todoist
Official Todoist MCP server for AI assistants to manage tasks, projects, and workflows.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA CRUD todo list server that exposes tools to create, list, and conclude tasks, compatible with any MCP host.7 npmMIT
- FlicenseNot gradedqualityBmaintenanceA minimal Python MCP Todo server backed by Appwrite Cloud, providing tools to add, list, get, update, complete, and delete tasks.-
- AlicenseBqualityCmaintenanceA basic MCP server for managing a todo list stored in a local JSON file, enabling task creation, completion, listing, and daily summary generation.27 npmMIT
- FlicenseNot gradedqualityCmaintenanceA simple MCP server that turns a JSON file into a todo list, letting users add, list, complete, delete, and clear tasks through natural language in MCP-compatible clients.-