plandesk connect
Copy page
plandesk connect is the recommended way to wire MCP credentials and teach agent repo conventions — without committing secrets.
With plandesk serve running, from a codebase you want bound to a Plan Desk project:
plandesk connect --project "Checkout Revamp"What it writes
Section titled “What it writes”connect is idempotent — safe to re-run:
| Path | Committed? | Purpose |
|---|---|---|
.plandesk/config.json | yes | Pins repo → project (projectId, server URL) |
.plandesk/skill.md | yes | Agent conventions (The Skill) |
.plandesk/token | no (gitignored) | Raw MCP bearer token |
.claude/skills/plandesk/SKILL.md / .agents/skills/plandesk/SKILL.md | yes | Symlinks → .plandesk/skill.md (skill discovery) |
.mcp.json | yes | MCP server entry with a headersHelper that reads the token |
CLAUDE.md / AGENTS.md | yes | Sentinel block @.plandesk/skill.md |
.codex/commands/plandesk.md | yes | Codex command → skill file |
Workflow
Section titled “Workflow”-
Resolves the project (by id or name).
-
Creates or reuses an MCP token in
.plandesk/token(gitignored). -
Writes
.plandesk/config.json(committed project binding). -
Merges the
plandeskentry into.mcp.json. The entry uses aheadersHelperthat reads.plandesk/tokenat connection time, so the token works with zero manual setup — noexportneeded. SetPLANDESK_MCP_TOKENonly if you want to override the file. -
Symlinks the skill into
.claude/skills/plandesk/and.agents/skills/plandesk/(created if missing) so agents discover it as a skill. -
Inserts an idempotent sentinel block in
CLAUDE.md(andAGENTS.mdif present):<!-- plandesk:start -->@.plandesk/skill.md<!-- plandesk:end --> -
Writes
.codex/commands/plandesk.mdfor Codex.
After connecting, start a new agent session so MCP tools reload. No token export is required.
Options
Section titled “Options”plandesk connect [--repo <dir>] [--project <id|name>] [--url <url>] [--token <token>] [--agent claude|codex|both] [--print]--print— dry-run without writing files--agent— target Claude, Codex, or both (default: detect)
Disconnect
Section titled “Disconnect”Remove binding: plandesk disconnect (does not revoke the token).
Manual alternative
Section titled “Manual alternative”If you prefer not to use connect, see MCP Setup for manual token creation and claude mcp add / codex mcp add registration.