planko-mcp-server
Officialby planko-io
README.md
# planko-mcp-server
MCP server for syncing [Planko](https://planko.io) tasks with local Markdown files. Works with Claude Code, Cursor, and any MCP-compatible AI agent.
## Features
- **21 tools**: 3 folder-sync tools + 10 standalone task/note/sticky-note CRUD tools + 7 standalone read (list/view) tools + `planko_recommend_task` (suggest a task for the owner to accept or reject), incl. `planko_list_all` and kanban board/column filters
- **Type-aware sync**: each folder syncs either **tasks** (type=1) or **notes** (type=2), chosen at setup
- **Multi-folder**: sync multiple projects to different local folders
- **Bidirectional sync**: pull remote changes, push local changes
- **Delete sync**: deleted local files remove tasks on server; deleted tasks remove local files
- **Standalone CRUD**: create/edit/complete/delete tasks and notes directly, no folder setup required
- **Standalone read**: list and view tasks/notes with rich filters, no folder setup required
- **User-scoped API key**: one key works across all your projects
## Getting Started
### Step 1 — Get your API key
1. Open [app.planko.io/integrations](https://app.planko.io/integrations)
2. Find the **Model Context Protocol (MCP)** card
3. Click **"Ativar"** to generate your API key
4. Copy the key (you can only see it once — regenerate if you lose it)
### Step 2 — Add to your MCP client
**Claude Code** — add to `.mcp.json` in your project root (or `~/.claude/settings.local.json` for global):
```json
{
"mcpServers": {
"planko": {
"command": "npx",
"args": ["-y", "planko-mcp-server"],
"env": {
"PLANKO_API_KEY": "your-api-key"
}
}
}
}
```
**Cursor** — add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"planko": {
"command": "npx",
"args": ["-y", "planko-mcp-server"],
"env": {
"PLANKO_API_KEY": "your-api-key"
}
}
}
}
```
No `npm install` or cloning needed. Requires Node.js 18+.
### Step 3 — Restart your tool
Restart Claude Code, Cursor, or whichever MCP client you use so it picks up the new server.
### Step 4 — Setup a project folder
Ask your AI agent to run:
```
planko_setup(projectName: "My Project", folderPath: "/path/to/folder", email: "you@email.com", syncType: "tasks")
```
This maps a Planko project to a local folder. `syncType` is **required** and must be `"tasks"` or `"notes"`:
- `syncType: "tasks"` — the folder pulls/pushes only **tasks** (type=1). New local `.md` files are created as tasks.
- `syncType: "notes"` — the folder pulls/pushes only **notes** (type=2). New local `.md` files are created as notes.
A folder is bound to one type for its whole lifetime. To sync both tasks and notes for the same project, set up two folders. You can set up multiple projects pointing to different folders.
### Step 5 — Sync
```
planko_sync()
```
Tasks are pulled as `.md` files into your folder. Local changes are pushed back to Planko.
## Tools
The server exposes 21 tools in four groups: **folder-sync** tools (bind a project to a local folder), **standalone CRUD** tools (create/edit/complete/delete directly via your API key, no folder needed), **standalone read** tools (list/view directly via your API key, no folder needed), and a **recommendation** tool (suggest a task that the account owner accepts or rejects).
Planko has three kinds of item, all stored as tasks with a `type`: **tasks** (`type=1`), **notes** (`type=2`) and **sticky notes** (`type=3`, a task-page item with every task property). Every kind has its own create/edit/delete/view/list tool; `planko_list_all` lists the three together.
### Folder-sync tools
| Tool | Description | Parameters |
|---|---|---|
| `planko_setup` | Set up sync between a project and a local folder | `projectName`, `folderPath`, `email`, `syncType` (`tasks`\|`notes`) |
| `planko_sync_preview` | Preview what would be synced (read-only) | `projectName` (optional) |
| `planko_sync` | Execute bidirectional sync with delete support | `projectName` (optional) |
### Standalone CRUD tools
These work with the **same API key** and require **no folder setup**. Tasks, notes and sticky notes live in the same collection, so edit/delete work on any id regardless of the tool's name. `create_*` tools accept all task/note properties as optional params (only `name` is required); the Markdown `description` is converted to Planko's rich-text (BlockNote) format automatically.
| Tool | Description | Key parameters |
|---|---|---|
| `planko_create_task` | Create a task (type=1) | `name` (required), `projectName` (optional), plus any properties below |
| `planko_create_note` | Create a note (type=2) | `name` (required), `projectName` (optional), plus any properties below |
| `planko_create_sticky_note` | Create a sticky note (type=3) | `name` (required), `projectName` (optional), plus any properties below |
| `planko_edit_task` | Edit an existing task by id | `taskId` (required), plus any properties to change |
| `planko_edit_note` | Edit an existing note by id (shares the task edit endpoint) | `taskId` (required), plus any properties to change |
| `planko_edit_sticky_note` | Edit an existing sticky note by id (shares the task edit endpoint) | `taskId` (required), plus any properties to change |
| `planko_complete_task` | Mark a task (or sticky note) complete (status=2) | `taskId` (required) |
| `planko_delete_task` | Delete a task by id | `taskId` (required) |
| `planko_delete_note` | Delete a note by id (shares the task delete endpoint) | `taskId` (required) |
| `planko_delete_sticky_note` | Delete a sticky note by id (shares the task delete endpoint) | `taskId` (required) |
**Optional properties** accepted by the create/edit tools (all optional; omit to leave unchanged):
| Property | Type | Notes |
|---|---|---|
| `description` | Markdown string | Converted to BlockNote JSON before saving |
| `dueDate` | ISO 8601 string | Execution date — when the task appears on the agenda/day view |
| `datePlain` | `YYYY-MM-DD` | Execution date, plain form — same meaning as `dueDate` |
| `deadline` | `YYYY-MM-DD`\|`null` | **Tasks only** (`planko_create_task`, `planko_edit_task`, `planko_recommend_task` — never notes or sticky notes). The final deadline, independent of `dueDate`/`datePlain`. `null` clears it on edit |
| `time` / `endTime` | `HH:MM` | Start / end time |
| `alert` | boolean | Whether a reminder is enabled |
| `alertLeadTime` | `null`\|`ontime`\|`15min`\|`30min`\|`1hour`\|`1day` | Reminder lead time |
| `priority` | `1`\|`2`\|`3` | |
| `repeat` | `null`\|`daily`\|`workdays`\|`weekly`\|`biweekly`\|`monthly`\|`custom_weekly`\|`yearly` | Recurrence rule |
| `repeatDate` | integer | Recurrence day, not a date: weekday `1`–`7` for `weekly`, day of month `1`–`31` for `monthly` |
| `selectedWeekdays` | array of `0`–`6` | For `custom_weekly` (0=Sunday) |
| `parentId` | ObjectId | Parent task, for subtasks |
| `tags` | array of ObjectId | Tag ids |
| `kanbanColumnId` / `boardId` | ObjectId | Kanban placement |
| `type` | `1`\|`2`\|`3` | (edit tools only) switch between task, note and sticky note |
| `projectId` | ObjectId | (edit tools only) move to another project |
Notes:
- On create, `projectName` is resolved to a project id via your accessible projects (not the local folder config). If omitted, the backend applies your default project.
- `complete` sets status=2 and, for a recurring task, stops the series and completes the current occurrence.
- Reminders, recurrence, positions, kanban and timezone handling are all applied server-side (the tools reuse Planko's own task logic).
#### Examples
```
planko_create_task(name: "Ship v2", projectName: "Work", dueDate: "2026-08-01", priority: 1)
planko_create_task(name: "Renovar contrato", deadline: "2026-12-15")
planko_create_note(name: "Meeting notes", description: "# Sync\n- point A\n- point B")
planko_edit_task(taskId: "665f...c0", name: "Ship v2.1", alertLeadTime: "1hour")
planko_edit_task(taskId: "665f...c0", deadline: null)
planko_complete_task(taskId: "665f...c0")
planko_delete_note(taskId: "665f...aa")
```
### Recommendation tool
A recommendation is a **suggestion, not a write**. The backend stores it as `pending`, notifies the owner of the API key (notification centre + mobile push) with **Accept / Reject** buttons, and creates the task only when they accept. Use it when a human should approve before anything is written, or when the agent must not create tasks directly.
| Tool | Description | Key parameters |
|---|---|---|
| `planko_recommend_task` | Suggest a new task to the account owner | `title` (required), `projectName` (optional), plus any of the task properties above (applied to the task on accept) |
Notes:
- The recipient is **always the owner of the API key**, never other project members, even when the suggestion targets a shared workspace project.
- `description` is Markdown, converted to BlockNote like the create tools. `datePlain` is derived from the date part of `dueDate` when only `dueDate` is given, because the owner's notification card shows `datePlain` (plus `time` and `priority`).
- `deadline` (`YYYY-MM-DD`) is accepted like on `planko_create_task`, applied to the task on accept.
- A reference the owner cannot access (`projectId`, `parentId`, `tags`, `boardId`, `kanbanColumnId`) is rejected at send time with a `400`. A reference that becomes stale later is dropped when the owner accepts; the task is still created.
- There is **no read-back**: the API has no endpoint to list recommendations or learn their outcome, and every call creates a new pending suggestion plus a new notification. Send each suggestion once; do not retry on a slow response.
- Under `PLANKO_PROJECT_LOCK` the suggestion always targets the locked project (see below).
```
planko_recommend_task(title: "Renovar contrato Acme", datePlain: "2026-10-01", time: "14:00", priority: 1)
planko_recommend_task(title: "Revisar proposta", projectName: "Comercial", description: "Pontos:\n- prazo\n- valor")
```
### Standalone read tools
These also work with the **same API key** and require **no folder setup**. `list_*` returns a concise, readable summary (one line per item plus a `total`/page footer) — never a raw JSON dump. `view_*` returns full detail with the `description` converted from BlockNote to **Markdown** for display.
| Tool | Description | Key parameters |
|---|---|---|
| `planko_list_tasks` | List your tasks (type=1) | all filters below |
| `planko_list_notes` | List your notes (type=2) | filter subset: `showCompleted`, `projectName`/`projectId`, `tags`, `search`, board/column, `sortBy`, `limit`, `page` |
| `planko_list_sticky_notes` | List your sticky notes (type=3) | same filters as `planko_list_tasks` |
| `planko_list_all` | Tasks + sticky notes + notes together, ordered by last update | same filters as `planko_list_tasks`, except `page` (see below) |
| `planko_view_task` | View one task by id | `taskId` (required) |
| `planko_view_note` | View one note by id (shares the view endpoint) | `taskId` (required) |
| `planko_view_sticky_note` | View one sticky note by id (shares the view endpoint) | `taskId` (required) |
**Scope.** Without `projectId`/`projectName`, a list is scoped to **your own** items. With a project (resolved from `projectName` via your accessible projects), it includes that project's items **including workspace-shared** ones from other members. Use `assigneeId` to narrow a project listing to one member; omit it for all members. `view_*` returns the item if you own it or can access its project, otherwise it errors (404 if missing, 403 if not visible). `view_*` tools do not filter by type — any id resolves; the `type:` line in the output reflects the item itself.
**`planko_list_all`.** Runs two backend queries with the same filters (tasks + sticky notes in one, notes in the other), each returning its first `limit` items by `sortBy`, then merges them by the same `sortBy` (default `updatedAt:desc`) and cuts the union to `limit`. Because the union has no server-side pagination there is no `page` parameter; the footer reports both totals. To page through one kind, use its own list tool. Note that a `dueDateFrom`/`dueDateTo` range is applied to the notes query too, which (as on the server for any dated notes query) includes recurring-note occurrences that an undated `planko_list_notes` hides.
**Owner in output.** When the backend populates an item's `userId` as an object `{ _id, name, email }`, list lines and `view_*` detail append `owner: <name>` so you can tell whose task it is in a multi-member project listing. If `userId` is a bare id/string, nothing extra is shown.
**Board / column in output.** Items on a kanban board show `board: <name>` and `column: <name>` (falling back to the id when the reference is not populated).
**List filters** (`planko_list_tasks`, `planko_list_sticky_notes` and `planko_list_all` accept all; `planko_list_notes` accepts the applicable subset):
| Filter | Type | Notes |
|---|---|---|
| `status` | `1` \| `2` | 1=open, 2=complete |
| `showCompleted` | boolean | When false/omitted and no explicit `status`, completed items are excluded |
| `priority` | `1` \| `2` \| `3` | (tasks only) |
| `projectName` | string | Resolved to a project id via your accessible projects |
| `projectId` | ObjectId | Alternative to `projectName` |
| `assigneeId` | ObjectId | Filter to a single project member by their user id. Omit for **all members**. Applies within a project listing (needs a project scope to be meaningful) |
| `parentId` | ObjectId | (tasks only) list subtasks of this parent |
| `boardName` | string | Kanban board name, case-insensitive, resolved against your own + workspace boards (`GET /mcp-project-sync/boards`). Errors listing the available boards on a miss |
| `kanbanColumnName` | string | Kanban column name (e.g. `To Do`). Resolved inside `boardName` when given; without a board it must be unique across your boards — default column names repeat on every board, so an ambiguous name errors with the `board › column` candidates instead of guessing |
| `boardId` / `kanbanColumnId` | ObjectId | Direct id alternatives to the names (not offered under project lock) |
| `tags` | array of ObjectId | AND semantics — item must have all tags |
| `search` | string | Case-insensitive match on the name |
| `dueDateFrom` / `dueDateTo` | `YYYY-MM-DD` | (tasks only) inclusive due-date (execution date) bounds |
| `deadlineFrom` / `deadlineTo` | `YYYY-MM-DD` | Only on `planko_list_tasks` and `planko_list_all` (never `planko_list_notes`/`planko_list_sticky_notes`). Inclusive bounds on `deadline`. Matches **tasks only** (type=1); a recurring series appears as one item |
| `sortBy` | `field:asc` \| `field:desc` | Fields: `dueDate`, `deadline`, `createdAt`, `updatedAt`, `priority`, `position`, `name`; default `updatedAt:desc` |
| `limit` | int | Default 50, max 200 |
| `page` | int | Default 1 |
Notes-specific behavior: deleted notes and recurring-copy notes are excluded server-side. For tasks and sticky notes, recurring occurrences appear as separate dated items.
Board/column filters are ANDed onto the list scope. Boards belong to a user or a workspace, not to a project: with a project scope, a teammate's items placed on **their personal** board are not matched by a board filter (only your own and workspace boards are resolvable).
#### Examples
```
planko_list_tasks(status: 1, priority: 1, dueDateFrom: "2026-07-20", dueDateTo: "2026-07-26", sortBy: "dueDate:asc")
planko_list_tasks(deadlineFrom: "2026-12-01", deadlineTo: "2026-12-31", sortBy: "deadline:asc")
planko_list_tasks(projectName: "Work", search: "invoice", limit: 20)
planko_list_tasks(boardName: "Time Planko", kanbanColumnName: "In Progress")
planko_list_sticky_notes(showCompleted: false)
planko_list_all(search: "orçamento", limit: 20)
planko_list_notes(search: "meeting", showCompleted: false)
planko_view_task(taskId: "665f...c0")
planko_view_note(taskId: "665f...aa")
```
### Sync preview
```
planko_sync_preview() # Preview all projects
planko_sync_preview(projectName: "My Project") # Preview one project
```
### Sync
```
planko_sync() # Sync all projects
planko_sync(projectName: "My Project") # Sync one project
```
When `projectName` is omitted, all configured projects are synced.
Sync order: delete, pull, push. Local changes overwrite remote on conflict.
## Environment Variables
| Variable | Required | Description |
|---|---|---|
| `PLANKO_API_KEY` | Yes (user mode) | Your MCP API key from app.planko.io/integrations |
| `PLANKO_RUNNER_TOKEN` | No | Runner token (`pk_run_…`). When set, the server starts in **runner mode** (see below) and `PLANKO_API_KEY` is not required. |
| `PLANKO_API_BASE` | No | API base URL override (defaults to production) |
| `PLANKO_PROJECT_LOCK` | No | Confine every operation to a single project id (see below). **Off by default** — when unset the server behaves exactly as before. |
### Project lock (`PLANKO_PROJECT_LOCK`)
Set `PLANKO_PROJECT_LOCK` to a project id to restrict this server instance to that
one project. This is a **hard override the agent cannot bypass** — useful when a
shared automation should only ever touch a single project.
When set, it changes behavior as follows:
- **Create** (`create_task` / `create_note` / `create_sticky_note`) and **Recommend**
(`recommend_task`): the new item (or the suggested task) always targets the
locked project; any `projectName` the caller passes is ignored (and not resolved).
A recommendation's response says so when that happens. Note that `priority`,
`parentId`, `boardId` and `kanbanColumnId` on create/recommend are NOT stripped
under a lock (unlike the list filters): a fabricated id is rejected by the backend
with a `400` rather than silently misplacing the item.
- **List** (`list_tasks` / `list_notes` / `list_sticky_notes` / `list_all`): always
scoped to the locked project (ignoring `projectName`/`projectId`), which yields
the all-members listing for that project. The `priority`, `projectName`,
`projectId`, `assigneeId`, `parentId`, `boardId` and `kanbanColumnId` filters are
**not offered** under a lock (and dropped if forced) — GPT-class callers reliably
fabricate them with plausible-but-wrong non-blank values that silently zero the
result. Narrow to one member with **`assigneeName`** (their name/email, matched
client-side against the owner) and to a board/column with **`boardName`** /
**`kanbanColumnName`** (resolved against the key owner's boards) instead; omit
them for all members / all boards.
- **Edit** (`edit_task` / `edit_note`): if the caller supplies a `projectId`, it is
forced back to the locked project (an edit can never move a task out of it). If no
project field is supplied, the project is left unchanged.
- **By-id operations** (`edit_*`, `complete_task`, `delete_*`, `view_*`): the target
task is fetched first, and the operation is refused with an error if the task does
not belong to the locked project.
**Off by default:** when `PLANKO_PROJECT_LOCK` is unset (or blank), none of the above
applies and the server is fully backward-compatible.
```json
{
"mcpServers": {
"planko": {
"command": "npx",
"args": ["-y", "planko-mcp-server"],
"env": {
"PLANKO_API_KEY": "your-api-key",
"PLANKO_PROJECT_LOCK": "6742635e764bda007ab987ed"
}
}
}
}
```
### Runner mode (`PLANKO_RUNNER_TOKEN`)
Runner mode serves the agent that executes Planko **agentic tasks**. It is enabled by
setting `PLANKO_RUNNER_TOKEN` to a runner token generated in the Planko app (screen
*Agente → Conectar agente*). A runner token:
- belongs to one user and is bound to **one or more projects** of that user — the
runner only ever sees that user's queued agentic tasks of those projects;
- is **shown once**, when it is created; Planko stores only its hash. Lost token →
create a new one. Revoking it stops the runner immediately and returns any task it
was running to the queue.
Runner mode is **exclusive**: it registers only the three runner tools below (no user
CRUD, no folder sync), all authenticated with the runner token:
| Tool | What it does |
|---|---|
| `planko_agent_claim` | Long-poll for the oldest queued agentic task (`waitSeconds` 0–25). Returns its id, `claimSeq`, name, project, timeout, instructions (Markdown), the owner's `humanInstructions` (+ `humanInstructionsLabel`, null when empty) and the parent context for a subtask, or `No task available.` |
| `planko_agent_finish` | Report the result (Markdown) of a claimed task with the `claimSeq` returned by the claim, and `error: true` when it failed. The task goes to validation, or is concluded automatically when its recurring model does not require validation. |
| `planko_agent_suggest_subtask` | Suggest a subtask (name, Markdown instructions, optional `timeoutMin`) under an agentic task. The owner accepts or rejects it in the app. With `requireHumanInstructions: true` (+ `humanInstructionsLabel`, ≤200 chars, e.g. "Decidir entre A, B, C ou outro") the owner must fill in "Instruções humanas" before accepting — for a decision between options or an instruction only the owner can give. |
Every error (invalid/revoked token, task outside the token's scope, stale claim) is
returned as a tool error carrying the HTTP status.
```json
{
"mcpServers": {
"planko-runner": {
"command": "npx",
"args": ["-y", "planko-mcp-server"],
"env": {
"PLANKO_RUNNER_TOKEN": "pk_run_..."
}
}
}
}
```
## How it works
- Each Planko task/note maps to a local `.md` file (task name becomes filename)
- Each folder is **type-bound**: `planko_setup` records `type` (1=tasks, 2=notes) on the folder's sync state and in the global config, and sync only pulls/pushes that type. New local `.md` files are created with the folder's type.
- The chosen `type` is sent to the backend on every `status`/`pull` (`&type=`) and `push` (body `type`) call.
- Backward-compatible: a config entry created before this feature has no `type`, so its folder keeps the legacy type-agnostic behavior (syncs all task types).
- Task descriptions are converted between BlockNote and Markdown automatically
- Sync state is tracked in `.planko-mcp-sync.json` per folder (includes `syncType` when set)
- Global config is stored at `~/.planko-mcp/config.json` (each project entry stores `projectId`, `folder`, `email`, `type`)
- The standalone CRUD tools bypass folders entirely and call user-scoped endpoints directly with your API key
- API keys are never written to any file
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues