···11+MIT License
22+33+Copyright (c) 2026 Kaneo MCP contributors
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
+86
apps/mcp/README.md
···11+# Kaneo MCP server
22+33+Model Context Protocol (stdio) server that talks to a [Kaneo](https://github.com/usekaneo/kaneo) instance using the OAuth 2.0 device authorization flow (RFC 8628), then calls Kaneo’s REST API with `Authorization: Bearer <token>`.
44+55+**How MCP fits here:** clients (Cursor, Claude Desktop, etc.) start a **local process** and talk to it over **stdin/stdout** using the MCP protocol. This package ships a **`bin`** (`kaneo-mcp`) for installable CLIs.
66+77+This package lives in the Kaneo monorepo at **`apps/mcp`**.
88+99+## Prerequisites
1010+1111+- Node.js 20+
1212+- A running Kaneo API (for example `http://localhost:1337`) and web app (for device approval UI).
1313+1414+On the Kaneo server, allow this MCP client’s ID:
1515+1616+```bash
1717+DEVICE_AUTH_CLIENT_IDS=kaneo-cli,kaneo-mcp
1818+```
1919+2020+If you omit `DEVICE_AUTH_CLIENT_IDS`, Kaneo defaults to allowing `kaneo-cli` only—you must include `kaneo-mcp` (or set `KANEO_MCP_CLIENT_ID` to an ID you have allowlisted).
2121+2222+## Environment
2323+2424+| Variable | Description |
2525+|----------|-------------|
2626+| `KANEO_API_URL` | Kaneo API origin (default `http://localhost:1337`). Do not include `/api`. |
2727+| `KANEO_MCP_CLIENT_ID` | Device-flow client id (default `kaneo-mcp`). Must match `DEVICE_AUTH_CLIENT_IDS` on the server. |
2828+2929+## Install (published package)
3030+3131+After publishing `@kaneo/mcp` to npm (or a private registry):
3232+3333+```bash
3434+npm install -g @kaneo/mcp
3535+kaneo-mcp
3636+```
3737+3838+Or:
3939+4040+```bash
4141+npx @kaneo/mcp
4242+```
4343+4444+The published tarball includes **`dist/`** and dependencies; `prepublishOnly` runs the TypeScript build before publish.
4545+4646+## Develop from source (inside this monorepo)
4747+4848+From the **`kaneo/`** directory:
4949+5050+```bash
5151+pnpm install
5252+pnpm --filter @kaneo/mcp run build
5353+pnpm --filter @kaneo/mcp run start
5454+pnpm --filter @kaneo/mcp run test
5555+```
5656+5757+Or with paths:
5858+5959+```bash
6060+pnpm -C apps/mcp run build
6161+```
6262+6363+The CLI entry is `kaneo-mcp` in `package.json` `bin` → `./dist/index.js`.
6464+For **Cursor**, point the MCP command at **`…/kaneo/apps/mcp/dist/index.js`** (absolute path after build).
6565+6666+## Authentication
6767+6868+On the first tool call that needs Kaneo, the server:
6969+7070+1. Requests a device code from `POST /api/auth/device/code`
7171+2. Prints the verification URL and user code to **stderr** (stdout stays clean for MCP)
7272+3. Tries to open the browser
7373+4. Polls `POST /api/auth/device/token` until approved
7474+5. Stores the access token under `~/.config/kaneo-mcp/credentials.json` (mode `0600`)
7575+7676+## Tools
7777+7878+Session: `whoami`, `list_workspaces`
7979+8080+Projects: `list_projects`, `get_project`, `create_project`, `update_project`
8181+8282+Tasks: `list_tasks`, `get_task`, `create_task`, `update_task`, `move_task`, `update_task_status`
8383+8484+Comments: `list_task_comments`, `create_task_comment`
8585+8686+Labels: `list_workspace_labels`, `create_label`, `attach_label_to_task`, `detach_label_from_task`