Skip to main content
Glama
jamestomasino

MCP DocGraph

README.md
# MCP DocGraph

MCP server for building knowledge graphs from documents.

Ingest PDF/PPTX/DOCX files, transcribe to Markdown, bootstrap domain-specific entity patterns via LLM, and build a JSONL knowledge graph with RAG chunks — all configurable per project.

## Quick Start

```bash
pipx install .
```

Add to your MCP client config:

```json
{
  "mcpServers": {
    "docgraph": {
      "command": "python",
      "args": ["-m", "mcp_docgraph.server"]
    }
  }
}
```

Set LLM credentials:

```bash
export DOCGRAPH_LLM_API_KEY="your-key"
export DOCGRAPH_LLM_PROVIDER="anthropic"  # or "openai"
```

## Tools

| Tool | Description |
|------|-------------|
| `ingest_files` | Transcribe PDF/PPTX/DOCX → Markdown |
| `bootstrap_config` | LLM proposes entity patterns from docs |
| `build_graph` | Build knowledge graph + RAG chunks |
| `query_graph` | Query graph, get LLM-synthesized answer |
| `validate_graph` | Check graph integrity |

## Workflow

1. Place documents in a folder
2. `ingest_files` → transcribed Markdown
3. `bootstrap_config` → proposed `config.yaml` (review, edit if needed)
4. `build_graph` → JSONL nodes, edges, chunks
5. `validate_graph` → check integrity
6. `query_graph` → ask questions

## Design Spec

See [docs/superpowers/specs/](docs/superpowers/specs/)