Local agent memory with an MCP server, HTTP API, and web UI.
- Node.js 20.x
- pnpm 9.x
- A local checkout of this repo
Runtime data is stored under ~/.personal-wiki by default:
~/.personal-wiki/
personal-wiki.sqlite
config.json
resources/
uploads/
qdrant/
logs/
backups/Set PERSONAL_WIKI_HOME only when you want a separate local runtime.
pnpm install
pnpm typecheck
pnpm testOptional: install the bundled agent skill into Claude Code and shared agent skills:
pnpm install:skillsThis installs skills/personal-wiki/SKILL.md into:
~/.claude/skills/personal-wiki
~/.agents/skills/personal-wikipnpm dev:serverThe API listens on:
http://localhost:4321Smoke check:
curl -sS http://localhost:4321/healthIn a second terminal:
pnpm devOpen:
http://localhost:3000The web app proxies /wiki-api/* to the API server on http://127.0.0.1:4321.
The MCP server is stdio-based. Do not start it as a standalone HTTP service. Your MCP client should spawn it.
Use the same Node binary that ran pnpm install. This matters because the server loads better-sqlite3.
Find the Node path:
node -p "process.execPath"In this checkout, the MCP entrypoint is:
/home/dev/code/lab/personal-wiki/apps/mcp/node_modules/tsx/dist/cli.mjs
/home/dev/code/lab/personal-wiki/apps/mcp/src/index.tsIf your repo path is different, replace /home/dev/code/lab/personal-wiki.
claude mcp add personal-wiki -- \
/usr/local/node-v20.12.0-linux-x64/bin/node \
/home/dev/code/lab/personal-wiki/apps/mcp/node_modules/tsx/dist/cli.mjs \
/home/dev/code/lab/personal-wiki/apps/mcp/src/index.tsVerify:
claude mcp get personal-wiki
claude mcp listcodex mcp add personal-wiki -- \
/usr/local/node-v20.12.0-linux-x64/bin/node \
/home/dev/code/lab/personal-wiki/apps/mcp/node_modules/tsx/dist/cli.mjs \
/home/dev/code/lab/personal-wiki/apps/mcp/src/index.tsVerify:
codex mcp get personal-wiki
codex mcp listUse this shape for clients that accept command and args:
{
"mcpServers": {
"personal-wiki": {
"command": "/usr/local/node-v20.12.0-linux-x64/bin/node",
"args": [
"/home/dev/code/lab/personal-wiki/apps/mcp/node_modules/tsx/dist/cli.mjs",
"/home/dev/code/lab/personal-wiki/apps/mcp/src/index.ts"
],
"cwd": "/home/dev/code/lab/personal-wiki"
}
}
}After the client connects, call:
{
"tool": "wiki_runtime",
"arguments": {}
}Expected: runtime paths under ~/.personal-wiki, unless PERSONAL_WIKI_HOME is set.
Then try:
{
"tool": "wiki_search",
"arguments": {
"q": "",
"limit": 3
}
}Writes should use proposal mode by default:
{
"tool": "wiki_add_note",
"arguments": {
"title": "Smoke test: personal-wiki MCP proposal",
"body": "Smoke test proposal. This verifies that agent writes create proposals before durable writes.",
"kind": "note",
"agentId": "smoke-test",
"tags": ["smoke-test"],
"mode": "propose"
}
}Check pending proposals:
curl -sS "http://localhost:4321/api/proposals?status=pending&limit=5"Port already in use:
lsof -nP -iTCP:3000 -sTCP:LISTEN
lsof -nP -iTCP:4321 -sTCP:LISTENWrong wiki home:
echo "$PERSONAL_WIKI_HOME"MCP startup fails during initialize:
node -p "process.versions.modules"
claude mcp get personal-wiki
codex mcp get personal-wikiIf the MCP config launches a different Node runtime than the one used for pnpm install, reinstall dependencies with that Node or update the MCP command to the correct absolute Node path.