Skip to main content
Glama
Aaditya-git

chatgpt-kg

by Aaditya-git
README.md
# chatgpt-kg

Builds a personal knowledge graph from selected ChatGPT conversations (stored in
Neo4j) and exposes it to Claude Code as an on-demand MCP search tool.

## Setup
1. Install Neo4j Desktop, create a local database, note its password.
2. `python -m venv .venv && source .venv/bin/activate && pip install -e ".[dev]"`
3. `cp config.example.toml config.toml` and edit as needed.
4. `export KG_NEO4J_PASSWORD=...`

## Usage
- Drop a ChatGPT export (`conversations.json` or its zip) into `inbox/`.
- `kg ingest` — build/update the graph.
- `kg query "resume"` — search from the terminal.
- `kg stats` — counts.
- `kg rebuild` — wipe and rebuild.

## Claude Code integration
1. Ensure Neo4j is running and the graph is built (`kg ingest`).
2. Keep `.mcp.json` in the project root (it points Claude Code at the server's
   Python and module). The server reads the Neo4j password from `.env`, so no
   secret goes in `.mcp.json`.
3. In Claude Code, run `/mcp` to confirm the `chatgpt-kg` server is connected.
4. Ask a question about prior ChatGPT work; Claude calls `search_knowledge_graph`
   when relevant.