You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add Origin header for cloud authentication and update Pages API documentation
This commit completes the Pages API implementation with session authentication support:
## Changes
### Authentication Fix (Critical)
- Added Origin header alongside Referer in session authentication requests
- Required for cloud Plane instances (api.plane.so) CORS validation
- Fixes authentication failures on cloud instances while maintaining self-hosted compatibility
**Files modified:**
- `src/common/auth.ts`: Added Origin header to CSRF token request and login POST
### Documentation Updates
- Added comprehensive Pages API documentation to README
- Documented all 18 new Pages API tools with parameters
- Added session authentication setup instructions
- Included examples for both Claude Desktop and VSCode configurations
- Documented new environment variables: PLANE_EMAIL, PLANE_PASSWORD
- Clarified authentication method differences (API Key vs Session Auth)
**Files modified:**
- `README.md`: Added Pages API section, session auth configuration examples
## Verification
- ✅ All 18 Pages API tools tested and working on cloud instance (api.plane.so)
- ✅ Session authentication works on both cloud and self-hosted instances
- ✅ Build succeeds with no TypeScript errors
- ✅ No secrets committed in code
- ✅ Backward compatible with existing API key authentication
## Pages API Tools Added
18 new MCP tools for Plane Pages management:
- Core CRUD: list, create, get, update, delete
- Lock management: lock, unlock
- Organization: favorite, unfavorite, duplicate
- Archive: archive, unarchive
- Content: get/update description, set access
- History: get versions, get version, get summary
- Authentication: plane_login for session auth
Closes#43
-`project_id` (string, required): UUID of the project
402
+
-`page_id` (string, required): UUID of the page
403
+
-`description_html` (string, required for update): HTML content
404
+
405
+
-`get_page_versions` / `get_page_version`
406
+
- Get page version history
407
+
- Parameters:
408
+
-`project_id` (string, required): UUID of the project
409
+
-`page_id` (string, required): UUID of the page
410
+
-`version_id` (string, required for specific version): UUID of the version
411
+
412
+
-`get_pages_summary`
413
+
- Get pages statistics for a project
414
+
- Parameters:
415
+
-`project_id` (string, required): UUID of the project
328
416
329
417
330
418
## Configuration Parameters
331
419
420
+
### For API Key Authentication (Most Tools)
332
421
-`PLANE_API_KEY` - Your Plane API token. You can generate one from the Workspace Settings > API Tokens page (`/settings/api-tokens/`) in the Plane app.
333
422
-`PLANE_WORKSPACE_SLUG` - The workspace slug for your Plane instance. The workspace-slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL.
334
423
-`PLANE_API_HOST_URL` (optional) - The host URL of the Plane API Server. Defaults to https://api.plane.so/
335
424
425
+
### For Session Authentication (Pages API Only)
426
+
Pages API tools require session authentication using email/password instead of API key. Use the `plane_login` tool before accessing Pages tools.
427
+
428
+
**Environment variables for Pages authentication:**
429
+
-`PLANE_EMAIL` (optional) - Your Plane account email for session authentication
430
+
-`PLANE_PASSWORD` (optional) - Your Plane account password for session authentication
431
+
432
+
**Note:** You can either:
433
+
1. Set these environment variables in your MCP client configuration, OR
434
+
2. Call `plane_login` tool manually with email/password when needed
435
+
436
+
**Authentication methods by feature:**
437
+
-**Projects, Issues, Modules, Cycles, Labels, States, Work Logs**: API Key (PLANE_API_KEY)
438
+
-**Pages**: Session Auth (email/password via `plane_login` tool)
439
+
336
440
## Usage
337
441
338
442
### Claude Desktop
339
443
340
444
You can add Plane to [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) by updating your `claude_desktop_config.json`:
341
445
446
+
**For standard API key authentication (Projects, Issues, etc.):**
342
447
```json
343
448
{
344
449
"mcpServers": {
@@ -358,10 +463,35 @@ You can add Plane to [Claude Desktop](https://modelcontextprotocol.io/quickstart
358
463
}
359
464
```
360
465
466
+
**To also use Pages API (with session authentication):**
**Note:** If you don't set `PLANE_EMAIL` and `PLANE_PASSWORD`, you can still use Pages tools by calling `plane_login` manually in your conversation.
489
+
361
490
### VSCode
362
491
363
492
You can also connect Plane to [VSCode](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) by editing your `.vscode.json` or `mcp.json` file:
364
493
494
+
**For standard API key authentication:**
365
495
```json
366
496
{
367
497
"servers": {
@@ -379,7 +509,28 @@ You can also connect Plane to [VSCode](https://code.visualstudio.com/docs/copilo
379
509
}
380
510
}
381
511
}
512
+
```
382
513
514
+
**To also use Pages API (with session authentication):**
0 commit comments