Knowledge Graph Builder MCP Server
Enables ingesting documents or text to extract entities and relationships via LLM, storing them in Neo4j, and searching or retrieving episodes.
README
Knowledge Graph Builder
Documents (.pdf/.docx/.txt/.md) or raw text -> entities/relationships (via LLM) -> Neo4j. Architecture inspired by Graphiti: episode-based ingestion, Pydantic entity/edge models, pluggable LLM provider.
Setup
docker compose up -d neo4j # Neo4j at bolt://localhost:7687, browser at :7474
cp .env.example .env # fill in ANTHROPIC_API_KEY or OPENAI_API_KEY, set LLM_PROVIDER
pip install -e ".[dev]"
Usage
kg ingest path/to/document.pdf # input option 1: CLI
kg serve-mcp # input option 2: MCP server (ingest_document, ingest_text,
# search_entities, get_episode tools)
Logs
Every pipeline run writes one JSON line per phase to logs/pipeline.jsonl, tagged with run_id
and episode_id:
tail -f logs/pipeline.jsonl | jq
grep '"run_id":"<id>"' logs/pipeline.jsonl | jq
Extending
- New entity type: subclass
BaseNodeinsrc/kg/models/entities.py, add it toENTITY_TYPES. - New document format: add a
_load_x(path) -> strfunction insrc/kg/ingestion/loaders.pyand register its extension inLOADERS. - New LLM provider: subclass
LLMClientinsrc/kg/llm/, add a branch inget_llm_client()(src/kg/llm/base.py) and matching config insrc/kg/config.py.
Tests
pytest # model/chunker/extraction-schema tests need no external services
# test_writer.py needs `docker compose up -d neo4j` and skips otherwise
Known v1 limitations (documented, not hidden)
- Entity resolution is exact
(name, entity_type)match only — no fuzzy/embedding dedupe yet (src/kg/graph/resolver.py). - Search is Cypher
CONTAINS, not vector/hybrid search. - Single graph backend (Neo4j) — no multi-backend abstraction since nothing else was requested.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.