paje-mcp
v0.1.1
Published
Paje MCP — turns the real work you do in Claude into a credible, in-voice personal brand. Provenance over prompts.
Readme
Paje MCP
Turn the real work you do in Claude into a credible, in-voice personal brand.
Paje listens to your actual working sessions, mines them for notable work, and turns a week of work into one brief: a single identity throughline, a posting cadence, and ranked post drafts — every one grounded in something you really did. No blank prompts, no scraping, no inventing results.
The wedge: provenance over prompts. Built from real work, it's credible, in-voice, and un-fakeable. A confidentiality filter abstracts client-sensitive material and holds risky posts for human review before anything surfaces.
This is a local-first Model Context Protocol server (stdio transport). Connect it to Claude Desktop or Claude Code.
What it does
| Tool | Purpose |
| --- | --- |
| capture_work | Log one notable piece of work (title, summary, decisions, tags). |
| ingest_transcript | Mine a full conversation/transcript for notable work. |
| weekly_brief | A week of work → throughline + cadence + ranked drafts. |
| draft_posts | Ranked drafts (reach vs. risk) from captured work, in your voice. |
| list_corpus | List recently captured work. |
| set_voice | Set positioning, audience, and tone so drafts sound like you. |
| sync_to_paje | Build the weekly brief and push it (+ public-safe work items) to your paje dashboard. Returns a private view link. |
It also exposes a paje://corpus resource and a log_session prompt.
Everything runs through a two-layer confidentiality pass: a deterministic
scrubber (emails, phone numbers, API keys, env secrets, private keys, card
numbers — never stored or sent to a model) plus model-side abstraction of client
identities. Drafts that draw on sensitive work are marked hold_for_review.
The corpus is a single JSON file at ~/.paje/corpus.json (override with
PAJE_HOME). It's the source of truth; briefs and drafts are always derived from
it, never from a blank prompt.
Sync to your paje dashboard
sync_to_paje pushes your latest weekly brief — throughline, cadence, and ranked
drafts — to your paje page so it shows up on your dashboard and at a private,
unguessable link. The brief is built on your machine, so the confidentiality
pass runs locally: items marked private are dropped entirely and sensitivity
notes never leave your device. weekly_brief also auto-syncs when sync is
configured, so just asking for your brief keeps the dashboard fresh.
To turn it on:
- In paje.ai, open Dashboard → Paje. Copy the
PAJE_SYNC_URLandPAJE_SYNC_TOKENshown there. - Add them to the
envblock of thepajeserver in your Claude Desktop config (alongsideANTHROPIC_API_KEY), then fully quit and reopen Claude. - In any chat, say "sync to paje" (or just ask for your weekly brief). The tool returns the view link, and the brief appears on Dashboard → Paje.
The token is a shared secret: keep it private. Anyone with the resulting view link can read that brief (but not push to it).
Quick start (no cloning required)
npx paje-mcp setupThat's it. The CLI auto-detects your OS, finds Claude Desktop's config, prompts for your Anthropic key, and writes the config for you. Restart Claude and you're done. See paje.ai/setup for a visual walkthrough.
Install from source
If you prefer to build from source (e.g. for development):
pnpm install
pnpm --filter paje-mcp buildThis produces dist/index.js (the MCP server) and dist/cli.js (the CLI).
Environment
| Var | Required | Purpose |
| --- | --- | --- |
| ANTHROPIC_API_KEY | recommended | Best-quality extraction & drafting. |
| OPENROUTER_API_KEY | optional | Fallback model if no Anthropic key. |
| PAJE_HOME | optional | Corpus dir (default ~/.paje). |
| PAJE_ANTHROPIC_MODEL | optional | Override the Anthropic model. |
| PAJE_OPENROUTER_MODEL | optional | Override the OpenRouter model. |
| PAJE_SYNC_URL / PAJE_SYNC_TOKEN | optional | Push the weekly brief to your paje dashboard (see Sync to your paje dashboard). |
Without any model key, Paje still works using a heuristic extractor/drafter — set a key for in-voice quality.
Connect to Claude Desktop
One command (recommended)
npx paje-mcp setupThis auto-detects your OS, finds the Claude Desktop config, prompts for your
Anthropic key, and writes the paje MCP server entry (preserving any other
servers). Then fully quit Claude Desktop (Cmd+Q on macOS) and reopen it.
Alternatively, from inside the cloned repo:
export ANTHROPIC_API_KEY="sk-ant-..." # optional — it'll prompt if unset
bash packages/paje-mcp/install.shSkip to Use it. The manual steps below do the same thing by hand.
Manual
Add Paje to your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"paje": {
"command": "node",
"args": ["/absolute/path/to/paje.ai/packages/paje-mcp/dist/index.js"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"PAJE_HOME": "/Users/you/.paje"
}
}
}
}Restart Claude Desktop. To make capture semi-passive, add a Project instruction:
At the end of a working session, run the
log_sessionprompt (or callcapture_workfor each notable thing we did). Then I'll review my weekly brief.
Use it
Once Claude Desktop restarts, click the tools/connector icon — you should see paje. Then:
- Paste a real work conversation and say: "Ingest this transcript into Paje."
- Ask: "Give me my weekly brief." → throughline + cadence + ranked drafts, with anything sensitive held for review.
Connect to Claude Code (passive capture)
Claude Code can auto-capture every session on the Stop event. Add to
.claude/settings.json (project or ~/.claude/settings.json for global):
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "/absolute/path/to/paje.ai/packages/paje-mcp/hooks/claude-code-stop-hook.sh"
}
]
}
]
}
}The hook receives Claude Code's session payload (incl. transcript_path), pipes
it into paje capture, mines it for notable work, scrubs secrets, and appends to
your corpus. It never blocks Claude — if the build is missing it exits cleanly.
Set ANTHROPIC_API_KEY (and PAJE_HOME) in your shell so the hook can see them.
CLI
Useful for manual capture and for testing without an MCP client:
# mine a transcript (or a Claude Code hook payload) from stdin
paje capture < examples/sample-session.txt
# your week: throughline + cadence + ranked drafts
paje brief --days 7
# just the drafts
paje draft --count 5 --platform linkedin
# what's captured
paje list
# push the weekly brief to your paje dashboard (if PAJE_SYNC_URL/TOKEN are set)
paje sync [--days 7]During development, run via pnpm --filter paje-mcp capture (uses tsx), or use
the built binary after pnpm --filter paje-mcp build.
How it fits the bigger picture
Paje builds five things — positioning, proof, a website you own, content, and an
owned audience. This MCP is the engine under content: it watches the work and
keeps the posts grounded in it. sync_to_paje is the seam that closes the loop —
posts drive to the site, the site converts to the list.
