···110110 .filter(Boolean),
111111 );
112112 }
113113- return new Set(["kaneo-cli"]);
113113+ return new Set(["kaneo-cli", "kaneo-mcp"]);
114114}
115115116116function getDeviceAuthVerificationUri(): string {
+3-1
apps/docs/api-reference/authentication.mdx
···97979898## Using Device Authorization
9999100100-Before using device authorization on a self-hosted Kaneo instance, the instance operator must allow your client ID through `DEVICE_AUTH_CLIENT_IDS`.
100100+By default, self-hosted Kaneo allows the built-in device clients `kaneo-cli` and `kaneo-mcp`.
101101+102102+If you want to use a different device client ID, the instance operator must allow it through `DEVICE_AUTH_CLIENT_IDS`.
101103102104### Flow overview
103105
···5050Name | Description |
5151--- | --- |
5252| `AUTH_SECRET` | The secret key for the JWT token. **Must be at least 32 characters long**, use a long, random value in production. Example: use `openssl rand -base64 32` to generate a secure key in Linux/macOS.
5353-| `DEVICE_AUTH_CLIENT_IDS` | Comma-separated list of allowed device authorization client IDs. When unset, `kaneo-cli` is allowed by default, so no extra configuration is required for the CLI. Use this to permit trusted external app identifiers such as `kaneo-cli,my-desktop-app`. |
5353+| `DEVICE_AUTH_CLIENT_IDS` | Comma-separated list of allowed device authorization client IDs. When unset, Kaneo allows `kaneo-cli` and `kaneo-mcp` by default. Use this to permit trusted external app identifiers such as `kaneo-cli,kaneo-mcp,my-desktop-app`. |
545455555656## Optional variables
+26-27
apps/mcp/README.md
···11# Kaneo MCP server
2233-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.
33+`@kaneo/mcp` is a local MCP server for Kaneo.
6477-This package lives in the Kaneo monorepo at **`apps/mcp`**.
55+It runs over stdio, signs in with Kaneo's device flow, and then calls the Kaneo API with a bearer token. The package lives in `apps/mcp` in this monorepo and exposes the `kaneo-mcp` CLI.
8697## Prerequisites
108119- Node.js 20+
1210- A running Kaneo API (for example `http://localhost:1337`) and web app (for device approval UI).
13111414-On the Kaneo server, allow this MCP client’s ID:
1212+Kaneo allows `kaneo-cli` and `kaneo-mcp` by default, so you usually do not need extra server configuration.
1313+1414+If you want to run this server with a different client ID, allow it on the Kaneo server:
15151616```bash
1717-DEVICE_AUTH_CLIENT_IDS=kaneo-cli,kaneo-mcp
1717+DEVICE_AUTH_CLIENT_IDS=kaneo-cli,kaneo-mcp,your-client-id
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).
21192220## Environment
2321···2624| `KANEO_API_URL` | Kaneo API origin (default `http://localhost:1337`). Do not include `/api`. |
2725| `KANEO_MCP_CLIENT_ID` | Device-flow client id (default `kaneo-mcp`). Must match `DEVICE_AUTH_CLIENT_IDS` on the server. |
28262929-## Install (published package)
2727+## Install
30283131-After publishing `@kaneo/mcp` to npm (or a private registry):
2929+If the package is published to npm or your private registry:
32303331```bash
3432npm install -g @kaneo/mcp
···4139npx @kaneo/mcp
4240```
43414444-The published tarball includes **`dist/`** and dependencies; `prepublishOnly` runs the TypeScript build before publish.
4242+The published package includes `dist/`. `prepublishOnly` runs the build before publish.
45434646-## Develop from source (inside this monorepo)
4444+## Develop from source
47454848-From the **`kaneo/`** directory:
4646+From the repo root:
49475048```bash
5149pnpm install
···5452pnpm --filter @kaneo/mcp run test
5553```
56545757-Or with paths:
5555+Or run it from the package directory:
58565957```bash
6058pnpm -C apps/mcp run build
6159```
62606363-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).
6161+The CLI entry points to `./dist/index.js`.
6262+6363+For Cursor or another MCP client, point the command at the built file:
6464+6565+```text
6666+.../kaneo/apps/mcp/dist/index.js
6767+```
65686669## Authentication
67706871On the first tool call that needs Kaneo, the server:
697270731. 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)
7474+2. Prints the verification URL and user code to `stderr`
72753. Tries to open the browser
73764. Polls `POST /api/auth/device/token` until approved
7474-5. Stores the access token under `~/.config/kaneo-mcp/credentials.json` (mode `0600`)
7777+5. Stores the access token at `~/.config/kaneo-mcp/credentials.json` with mode `0600`
75787679## Tools
77807878-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`
8181+- Session: `whoami`, `list_workspaces`
8282+- Projects: `list_projects`, `get_project`, `create_project`, `update_project`
8383+- Tasks: `list_tasks`, `get_task`, `create_task`, `update_task`, `move_task`, `update_task_status`
8484+- Comments: `list_task_comments`, `create_task_comment`
8585+- Labels: `list_workspace_labels`, `create_label`, `attach_label_to_task`, `detach_label_from_task`