personal-kg
Personal Knowledge Graph MCP Server - Decision intelligence for multi-agent workflows
claude mcp add --transport stdio tomschell-personal-kg-mcp node node_modules/@tomschell/personal-kg-mcp/dist/server.js \ --env PKG_USE_ANN="true" \ --env PKG_STORAGE_DIR=".kg" \ --env PKG_MCP_CAPTURE_AUTO="true" \ --env PKG_MCP_CAPTURE_TOOLS="github" \ --env PKG_AUTO_BACKUP_MINUTES="0" \ --env PKG_MCP_CAPTURE_ENABLED="true" \ --env PKG_MCP_CAPTURE_EXCLUDE="" \ --env PKG_GITHUB_INTEGRATION_ENABLED="true"
How to use
Personal KG as an MCP server enables automatic capture and retrieval of decision context within your multi-agent workflows. When enabled, the server auto-captures MCP tool calls, stores reasoning, alternatives, and constraints, and exposes commands to search, summarize, and link context across sessions. Essential tools include session warmup (kg_session_warmup), capture (kg_capture), session summaries (kg_capture_session), semantic search (kg_search), a project state overview (kg_get_project_state), context retrieval (kg_get_relevant_context), open questions tracking (kg_open_questions), and graph operations (kg_edges) for linking decisions. To use it, ensure the MCP configuration is declared in your client (e.g., .cursor/mcp.json) and restart your MCP client so the Personal KG tools become available at session startup. You can then begin capturing decisions and querying context to maintain a traceable reasoning trail across agents and tools.
How to install
Prerequisites:
- Node.js (supported versions as per the package requirements)
- npm or pnpm to install packages
- Install the MCP server package
npm install @tomschell/personal-kg-mcp
- Configure MCP Server in your project
Create or edit your MCP config file (e.g., .cursor/mcp.json) to register the server:
{
"mcpServers": {
"personal-kg-mcp": {
"command": "node",
"args": [
"node_modules/@tomschell/personal-kg-mcp/dist/server.js"
],
"cwd": "/path/to/your/project",
"env": {
"PKG_STORAGE_DIR": ".kg",
"PKG_AUTO_BACKUP_MINUTES": "0",
"PKG_USE_ANN": "true",
"PKG_GITHUB_INTEGRATION_ENABLED": "true",
"PKG_MCP_CAPTURE_ENABLED": "true",
"PKG_MCP_CAPTURE_TOOLS": "github",
"PKG_MCP_CAPTURE_EXCLUDE": "",
"PKG_MCP_CAPTURE_AUTO": "true"
}
}
}
}
- Optional: set up authentication and integration
- Create a GitHub personal access token
- Add to a .env file: PKG_GITHUB_TOKEN=your_token
- Or export PKG_GITHUB_TOKEN in your environment
- Restart your MCP client
- After adding or modifying the MCP configuration, restart the MCP client (Cursor, Claude Desktop, etc.) for the tools to be loaded at session startup.
Additional notes
Tips and caveats:
- MCP servers are loaded at session startup; after config changes, you must restart the client to apply changes.
- Environment variables control storage location, embedding, and integrations; configure PKG_STORAGE_DIR to your preferred path for the knowledge graph data.
- If you use GitHub integration, ensure PKG_GITHUB_TOKEN is securely stored (e.g., in .env, not in version control).
- The capture features can be tuned with PKG_MCP_CAPTURE_ENABLED, PKG_MCP_CAPTURE_TOOLS, and PKG_MCP_CAPTURE_AUTO to balance coverage and performance.
- For security, limit exposure of tokens and consider using conductor/workspaces if you have 1Password managed env files.
Related MCP Servers
gemini-cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
metorial-platform
The engine powering hundreds of thousands of MCP connections 🤖 🔥
conductor-tasks
A task management system designed for AI development
ummon
The semantic layer for software engineering: Connect code to meaning, build on understanding
aica
aica(AI Code Analyzer) reviews your code using AI. Supports CLI and GitHub Actions.
ai
Official AI SDK by Ampersand