-
-
Notifications
You must be signed in to change notification settings - Fork 46
MCP Server
Mindwtr provides an optional MCP (Model Context Protocol) server. This allows you to connect AI agents (like Claude Desktop, Claude Code, OpenAI Codex, or Gemini CLI) directly to your local Mindwtr database.
This is a local stdio server (no HTTP). MCP clients launch it as a subprocess and talk over JSON‑RPC on stdin/stdout.
Canonical reference: apps/mcp-server/README.md. Keep this page aligned with that file when MCP tools or schemas change.
- Node.js 18+ (for the MCP client that spawns the server)
- Bun (recommended for running/building the server)
- A local Mindwtr database (
mindwtr.db)
-
Linux:
~/.local/share/mindwtr/mindwtr.db -
macOS:
~/Library/Application Support/mindwtr/mindwtr.db -
Windows:
%APPDATA%\mindwtr\mindwtr.db
You can override the database location with:
--db /path/to/mindwtr.db- Environment variable:
MINDWTR_DB_PATHorMINDWTR_DB
MCP clients run the server as a subprocess. You point them to the command and pass arguments.
-
--db "/path/to/mindwtr.db": Path to your SQLite database. -
--write: Enable write operations (add, update, complete, delete). Without this flag, the server is read-only.
Add a server entry to your Claude Desktop configuration file.
-
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json -
Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mindwtr": {
"command": "bun",
"args": [
"/absolute/path/to/Mindwtr/apps/mcp-server/src/index.ts",
"--db",
"/home/dd/.local/share/mindwtr/mindwtr.db",
"--write"
]
}
}
}Note: Replace /absolute/path/to/Mindwtr and the DB path with your actual paths.
You can add the server via the CLI:
claude mcp add mindwtr -- \
bun /path/to/Mindwtr/apps/mcp-server/src/index.ts --db "/path/to/mindwtr.db" --writeGemini CLI uses settings.json (User: ~/.gemini/settings.json or Project: .gemini/settings.json).
Command Line:
gemini mcp add mindwtr \
bun /absolute/path/to/Mindwtr/apps/mcp-server/src/index.ts \
--db "/path/to/mindwtr.db" --writeManual Config:
{
"mcpServers": {
"mindwtr": {
"command": "bun",
"args": [
"/absolute/path/to/Mindwtr/apps/mcp-server/src/index.ts",
"--db",
"/path/to/mindwtr.db",
"--write"
]
}
}
}You usually don't need to run this manually (the MCP client does it), but it's useful for testing.
# Read-only
bun run mindwtr:mcp -- --db "/path/to/mindwtr.db"
# With write access
bun run mindwtr:mcp -- --db "/path/to/mindwtr.db" --write# Build
bun run --filter mindwtr-mcp-server build
# Run
node apps/mcp-server/dist/index.js --db "/path/to/mindwtr.db"Breaking change (introduced in this release): all tool names have changed from dot-notation (
mindwtr.list_tasks) to underscore-notation (mindwtr_list_tasks) to comply with MCP client validation rules (e.g. Claude Desktop).
Old → new mapping:
| Old name | New name |
|---|---|
mindwtr.list_tasks |
mindwtr_list_tasks |
mindwtr.list_projects |
mindwtr_list_projects |
mindwtr.get_project |
mindwtr_get_project |
mindwtr.get_task |
mindwtr_get_task |
mindwtr.list_areas |
mindwtr_list_areas |
mindwtr.add_task |
mindwtr_add_task |
mindwtr.update_task |
mindwtr_update_task |
mindwtr.complete_task |
mindwtr_complete_task |
mindwtr.delete_task |
mindwtr_delete_task |
mindwtr.restore_task |
mindwtr_restore_task |
mindwtr.add_project |
mindwtr_add_project |
mindwtr.update_project |
mindwtr_update_project |
mindwtr.delete_project |
mindwtr_delete_project |
mindwtr.add_area |
mindwtr_add_area |
mindwtr.update_area |
mindwtr_update_area |
mindwtr.delete_area |
mindwtr_delete_area |
Upgrade action: find and replace mindwtr. with mindwtr_ in any MCP client configs, system prompts, scripts, or automations that reference these tool names. No other changes are required.
When connected, the AI agent has access to these tools. By default the server is read-only; pass --write to enable any write tool.
Only --write is supported for write access (no alternate aliases).
| Tool | Operation | Requires --write
|
|---|---|---|
mindwtr_list_tasks |
List tasks | No |
mindwtr_list_projects |
List projects | No |
mindwtr_get_project |
Fetch one project | No |
mindwtr_list_areas |
List areas | No |
mindwtr_get_task |
Fetch one task by ID | No |
mindwtr_add_task |
Create task | Yes |
mindwtr_update_task |
Update task | Yes |
mindwtr_complete_task |
Mark done | Yes |
mindwtr_delete_task |
Soft-delete task | Yes |
mindwtr_restore_task |
Restore task | Yes |
mindwtr_add_project |
Create project | Yes |
mindwtr_update_project |
Update project | Yes |
mindwtr_delete_project |
Soft-delete project | Yes |
mindwtr_add_area |
Create area | Yes |
mindwtr_update_area |
Update area | Yes |
mindwtr_delete_area |
Soft-delete area | Yes |
-
mindwtr_list_tasks: List tasks with filters (status, project, date range, search). -
mindwtr_list_projects: List all projects. -
mindwtr_get_project: Get details of a specific project by ID. -
mindwtr_list_areas: List all areas. -
mindwtr_get_task: Get details of a specific task by ID.
-
mindwtr_add_task: Create a new task. Supports natural languagequickAdd(e.g., "Buy milk @errands /due:tomorrow"). -
mindwtr_update_task: Update an existing task, including scheduling fields likedueDate,startTime,reviewAt, andisFocusedToday(supports clearing fields withnull). -
mindwtr_complete_task: Mark a task as done. -
mindwtr_delete_task: Soft-delete a task. -
mindwtr_restore_task: Restore a soft-deleted task. -
mindwtr_add_project: Create a new project, including optionaldueDateandreviewAt. -
mindwtr_update_project: Update a project, including optionaldueDateandreviewAt. -
mindwtr_delete_project: Soft-delete a project. -
mindwtr_add_area: Create a new area. -
mindwtr_update_area: Update an area. -
mindwtr_delete_area: Soft-delete an area.
Schema note:
- Task write tools cover
dueDate,startTime, andreviewAt(on update). - Project write tools cover both
dueDateandreviewAt. - For the exact canonical inputs, use apps/mcp-server/README.md.
Use this matrix when deciding whether to run the server in read-only mode or with --write.
| Tool | Data Access | Mutation Type | Read-only Mode |
--write Mode |
|---|---|---|---|---|
mindwtr_list_tasks |
Task rows (filtered) | None | Allowed | Allowed |
mindwtr_list_projects |
Project rows | None | Allowed | Allowed |
mindwtr_get_project |
Single project by ID | None | Allowed | Allowed |
mindwtr_list_areas |
Area rows | None | Allowed | Allowed |
mindwtr_get_task |
Single task by ID | None | Allowed | Allowed |
mindwtr_add_task |
Task table | Insert | Denied | Allowed |
mindwtr_update_task |
Task table | Update | Denied | Allowed |
mindwtr_complete_task |
Task table | Update status | Denied | Allowed |
mindwtr_delete_task |
Task table | Soft-delete | Denied | Allowed |
mindwtr_restore_task |
Task table | Restore soft-delete | Denied | Allowed |
mindwtr_add_project |
Project table | Insert | Denied | Allowed |
mindwtr_update_project |
Project table | Update | Denied | Allowed |
mindwtr_delete_project |
Project table | Soft-delete | Denied | Allowed |
mindwtr_add_area |
Area table | Insert | Denied | Allowed |
mindwtr_update_area |
Area table | Update | Denied | Allowed |
mindwtr_delete_area |
Area table | Soft-delete | Denied | Allowed |
Practical guidance:
- Default to read-only for exploration and reporting.
- Enable
--writeonly in trusted local environments. - For agent workflows, prefer explicit confirmation before delete/complete operations.
-
mindwtr_list_taskswithstatus: "waiting"andstatus: "someday". - Summarize stalled items by project.
- For selected items, call
mindwtr_update_taskto setreviewAt.
-
mindwtr_list_taskswithstatus: "inbox"andsortBy: "createdAt". - For each task, classify with
mindwtr_update_task(next,waiting,reference, etc.). - Add missing metadata (project, contexts, tags) in a second pass.
For potentially destructive automation:
- Run read phase: list candidate IDs only.
- Present confirmation summary (count + titles).
- Execute writes (
complete_task/delete_task) only after explicit user approval. - Keep IDs for rollback via
restore_task.
Use mindwtr_add_task + quickAdd:
{
"quickAdd": "Follow up with Alex +Hiring @work #ops /due:tomorrow 10am"
}Use this for rapid capture flows where parsing commands is more efficient than setting each field manually.
All tools return JSON in the content.text field. Parse the JSON to get the actual payload.
These limits are useful when wiring Mindwtr into agent workflows:
-
mindwtr_list_tasksdefaults tolimit: 200and capslimitat500. - Task titles are capped at
500characters for MCP task creation/update validation. - Quick-add inputs are capped at
2000characters for MCP task creation, matching the cloud task API quick-add limit. - The SQLite layer uses a
busy_timeoutof 5 seconds, so a locked database should fail instead of hanging indefinitely.
If you need more than 500 tasks, page with limit + offset instead of expecting one unbounded response.
Input fields
-
status:inbox | next | waiting | someday | reference | done | archived | all -
projectId: string -
includeDeleted: boolean -
limit: number -
offset: number -
search: string -
dueDateFrom: ISO date or datetime string (compared by calendar date) -
dueDateTo: ISO date or datetime string (compared by calendar date) -
sortBy:updatedAt | createdAt | dueDate | title | priority -
sortOrder:asc | desc
Example
{
"status": "next",
"limit": 20,
"offset": 0,
"sortBy": "updatedAt",
"sortOrder": "desc"
}Response
{
"tasks": [
{
"id": "task-uuid",
"title": "Follow up with design",
"status": "next",
"updatedAt": "2026-01-25T03:45:57.246Z"
}
]
}Input fields
- none
Response
{
"projects": [
{
"id": "project-uuid",
"title": "Mindwtr",
"status": "active"
}
]
}Input fields
-
id: string (project UUID) -
includeDeleted: boolean (optional)
Example
{ "id": "project-uuid" }Input fields
- none
Response
{
"areas": [
{
"id": "area-uuid",
"name": "Work"
}
]
}Input fields
-
id: string (task UUID) -
includeDeleted: boolean (optional)
Example
{ "id": "task-uuid" }Input fields
-
title: string (required ifquickAddomitted) -
quickAdd: string (required iftitleomitted) -
status:inbox | next | waiting | someday | reference | done | archived -
projectId: string -
dueDate: ISO string -
startTime: ISO string -
contexts: string[] -
tags: string[] -
description: string -
priority: string -
timeEstimate: string (e.g.30m,2h)
Example
{
"quickAdd": "Send invoice +Acme /due:tomorrow 9am #finance"
}Input fields
-
id: string (task UUID) -
title,status,projectId,dueDate,startTime,contexts,tags,description,priority,timeEstimate,reviewAt,isFocusedToday
Notes
- Use
nullto clear fields likeprojectId,dueDate,startTime,contexts, andtags.
Example
{
"id": "task-uuid",
"status": "waiting",
"reviewAt": "2026-01-27T09:00:00.000Z"
}Input fields
-
id: string (task UUID)
Input fields
-
id: string (task UUID)
Input fields
-
id: string (task UUID)
Input fields
-
title: string -
color: string (optional) -
status:active | someday | waiting | archived(optional) -
areaId: string ornull -
isSequential: boolean (optional) -
isFocused: boolean (optional) -
dueDate: ISO string ornull -
reviewAt: ISO string ornull -
supportNotes: string ornull
Input fields
-
id: string (project UUID) -
title,color,status,areaId,isSequential,isFocused,dueDate,reviewAt,supportNotes
Input fields
-
id: string (project UUID)
Input fields
-
name: string -
color: string (optional) -
icon: string (optional)
Input fields
-
id: string (area UUID) -
name,color,icon
Input fields
-
id: string (area UUID)
- Tool outputs are JSON strings, not structured MCP values. Your client should parse
content[0].text. - Task/project IDs are UUIDs from the local SQLite database.
- Dates are ISO 8601 strings (UTC).
- Concurrency: The server uses SQLite WAL mode. Writes may fail if the DB is locked; clients are expected to retry.
-
Shared Logic: Write operations use the shared
@mindwtr/corelibrary to ensure business rules are enforced. -
Keep-Alive: The server stays alive as long as
stdinis open.
-
"Command not found":
mindwtr-mcpis not a global command. Usebun run mindwtr:mcpor the full path to the built script. -
Client Connection Issues: Ensure you are NOT using
bun runas the command in your MCP client config, as it may output extra text. Runbundirectly on the source file ornodeon the built file.
Mindwtr • AGPL-3.0 License • dongdongbh
Getting Started
User Guides
GTD Methodology
- GTD Overview
- GTD Best Practices
- GTD Workflow in Mindwtr
- Contexts and Tags
- Daily Review
- Weekly Review
Data & Sync
- Data and Sync
- Backup-and-Restore
- iCloud Sync
- Sync Algorithm
- Dropbox Sync
- Cloud API
- Cloud Deployment
- Local API
- MCP Server
- Web App PWA
- Calendar Integration
- Obsidian Integration
- AI Assistant
- Reusable Lists
- Attachments
- Diagnostics and Logs
Imports & Migrations
Developer Docs
- Developer Guide
- Developer Troubleshooting
- Architecture
- Core API
- Database Schema
- Deployment Guide
- Release Process
- Testing Strategy
- Performance Guide
- Contributing (Repository Guide)
Links