LLM Graph Builder MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "NEO4J_URI=${NEO4J_URI}" -e "NEO4J_USERNAME=${NEO4J_USERNAME}" -e "NEO4J_PASSWORD=${NEO4J_PASSWORD}" -e "NEO4J_DATABASE=${NEO4J_DATABASE}" -e "GRAPH_BUILDER_URL=${GRAPH_BUILDER_URL}" llm-graph-builder -- uvx --from /absolute/path/to/llm-graph-builder-mcp llm-graph-builder-mcp
Required:NEO4J_URINEO4J_USERNAMENEO4J_PASSWORDNEO4J_DATABASEGRAPH_BUILDER_URL
README.md

Build knowledge graphs from any URL using Claude Desktop and Neo4j.

LLM Graph Builder MCP

Build knowledge graphs from any URL using Claude Desktop and Neo4j.

What is this?

This Model Context Protocol (MCP) server enables Claude to automatically extract entities and relationships from unstructured text and build knowledge graphs in Neo4j. Simply give Claude a URL (Wikipedia article, PDF, web page, YouTube video) and ask it to build a knowledge graph - it handles the rest.

Perfect for: Research, Zotero integrations, academic papers, content analysis, and building structured knowledge from unstructured sources.

What's Included

This repository is a complete, ready-to-use package containing:

  • llm_graph_builder_mcp/ - The MCP server code
  • llm-graph-builder/ - Neo4j's LLM Graph Builder backend (June 24, 2025, commit 4d7bb5e8)

Both are included so you get a tested, working version out of the box. Just clone once and you're ready to go!

Why include the backend?

  • Guaranteed compatibility - this MCP is tested with this exact backend version
  • Zero configuration headaches - everything just works together
  • If Neo4j updates their backend, you still have a working version

Features

  • Multi-source support: Wikipedia, PDFs, web pages, YouTube videos
  • Academic mode: Extract citations, authors, journals, and bibliographic data
  • Custom schemas: Define allowed entity types and relationships
  • Community detection: Find clusters and groups in your knowledge graph
  • Zero modifications: Works with unmodified llm-graph-builder backend
  • Local processing: Your data, your Neo4j instance, your control

Quick Start

Prerequisites

  1. Neo4j database - Get a free instance at Neo4j AuraDB
    • Create an instance and note your connection URI, username, and password
  2. OpenAI API key - Get one here
  3. Python 3.10+ with uv - Install uv
  4. Claude Desktop - Download here

Step 1: Clone This Repository

# Clone the entire project (includes both MCP and backend)
git clone https://github.com/henrardo/llm-graph-builder-mcp.git
cd llm-graph-builder-mcp

Your directory structure will be:

llm-graph-builder-mcp/           # The MCP server
llm-graph-builder/               # The backend (included)

Step 2: Set Up the Backend

# Navigate to backend
cd llm-graph-builder/backend

# Create environment file
cp example.env .env

Edit .env with your credentials:

# Neo4j Connection (from your AuraDB instance)
NEO4J_URI=neo4j+s://your-instance-id.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your-auradb-password
NEO4J_DATABASE=neo4j

# OpenAI Configuration
LLM_MODEL_CONFIG_openai_gpt_4.1=gpt-4-turbo-2024-04-09,sk-your-openai-api-key

Install and start the backend:

# Create virtual environment
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install dependencies
uv pip install -r requirements.txt

# Start the backend server
uvicorn score:app --reload --port 8000

Keep this terminal running. The backend must be running for the MCP to work.

Step 3: Install the MCP

Open a new terminal (keep the backend running in the first one):

# Navigate back to the MCP directory
cd llm-graph-builder-mcp

# Install the MCP
uvx --from . llm-graph-builder-mcp

Step 4: Configure Claude Desktop

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "llm-graph-builder": {
      "command": "uvx",
      "args": [
        "--from",
        "/absolute/path/to/llm-graph-builder-mcp",
        "llm-graph-builder-mcp"
      ],
      "env": {
        "NEO4J_URI": "neo4j+s://your-instance-id.databases.neo4j.io",
        "NEO4J_USERNAME": "neo4j",
        "NEO4J_PASSWORD": "your-auradb-password",
        "NEO4J_DATABASE": "neo4j",
        "GRAPH_BUILDER_URL": "http://localhost:8000"
      }
    }
  }
}

Important:

  • Replace /absolute/path/to/ with the full path to your llm-graph-builder-mcp directory
    • Run pwd in the llm-graph-builder-mcp directory to get this path
    • Example: /Users/yourname/projects/llm-graph-builder-mcp
  • Use the same credentials as in your backend .env file

Step 5: Restart Claude Desktop

Completely quit and restart Claude Desktop for the changes to take effect.

Step 6: Test It

In Claude Desktop, try:

Build a knowledge graph from this Wikipedia article:
https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy

Claude should now use the MCP to build a knowledge graph in your Neo4j database!

Usage Examples

Basic Usage

Build a knowledge graph from this Wikipedia

Tools (1)

build_graphExtracts entities and relationships from a provided URL to populate a Neo4j knowledge graph.

Environment Variables

NEO4J_URIrequiredThe connection URI for your Neo4j database instance.
NEO4J_USERNAMErequiredUsername for Neo4j authentication.
NEO4J_PASSWORDrequiredPassword for Neo4j authentication.
NEO4J_DATABASErequiredThe specific database name within the Neo4j instance.
GRAPH_BUILDER_URLrequiredThe local URL of the running backend server.

Configuration

claude_desktop_config.json
{"mcpServers": {"llm-graph-builder": {"command": "uvx", "args": ["--from", "/absolute/path/to/llm-graph-builder-mcp", "llm-graph-builder-mcp"], "env": {"NEO4J_URI": "neo4j+s://your-instance-id.databases.neo4j.io", "NEO4J_USERNAME": "neo4j", "NEO4J_PASSWORD": "your-auradb-password", "NEO4J_DATABASE": "neo4j", "GRAPH_BUILDER_URL": "http://localhost:8000"}}}}

Try it

Build a knowledge graph from this Wikipedia article: https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy
Extract entities and relationships from this PDF research paper and save them to my Neo4j database.
Create a knowledge graph based on the content of this YouTube video URL.
Analyze this web page and build a graph focusing on academic citations and author relationships.

Frequently Asked Questions

What are the key features of LLM Graph Builder?

Multi-source support for Wikipedia, PDFs, web pages, and YouTube videos. Academic mode for extracting citations, authors, and bibliographic data. Custom schema definition for entity types and relationships. Community detection to identify clusters within the knowledge graph. Local processing with your own Neo4j instance.

What can I use LLM Graph Builder for?

Academic research and literature review management. Integrating web content into Zotero or personal knowledge bases. Content analysis of unstructured web data. Building structured knowledge graphs from video transcripts.

How do I install LLM Graph Builder?

Install LLM Graph Builder by running: git clone https://github.com/henrardo/llm-graph-builder-mcp.git && cd llm-graph-builder-mcp && uvx --from . llm-graph-builder-mcp

What MCP clients work with LLM Graph Builder?

LLM Graph Builder works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep LLM Graph Builder docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare