LLM Graph Builder

Provides a complete MCP server to build Neo4j knowledge graphs from URLs using Claude and a local backend.
  • other

0

GitHub Stars

other

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can build knowledge graphs from any URL by using an MCP server that connects Claude Desktop with Neo4j. This setup lets you extract entities and relationships from unstructured text and automatically populate a Neo4j graph, making research, Zotero workflows, and content analysis fast and structured.

How to use

You interact with the MCP through Claude Desktop. Start by ensuring your backend server is running, and that Claude is configured to talk to your local MCP. Then give Claude a URL (Wikipedia article, PDF, web page, or YouTube video) and tell it to build a knowledge graph. Claude will process the content, extract entities and relationships, and store the resulting graph in your Neo4j database. You can enable academic bibiliographic extraction, customize which entity types and relationships are allowed, and optionally enable community detection to discover clusters within the graph.

How to install

Prerequisites you need before installing the MCP server include a Neo4j database, an OpenAI API key, Python 3.10+ with uv, and Claude Desktop.

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

# Directory structure will be:
# llm-graph-builder-mcp/           # The MCP server
# llm-graph-builder/               # The backend (included)
  1. Set up the backend (navigate into the backend folder, create an environment file, and configure credentials).
# 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 service, then start the MCP in a new terminal.

# 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
  1. Install the MCP server component in a separate terminal (back to the MCP directory).
# Navigate back to the MCP directory
cd llm-graph-builder-mcp

# Install the MCP
uvx --from . llm-graph-builder-mcp
  1. Configure Claude Desktop to point to your MCP. Add a new MCP server with the absolute path to your MCP and the backend URL. You will need to provide the Neo4j credentials and the backend URL in the environment settings for Claude to reach your Neo4j instance and the backend service.
{
  "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"
      }
    }
  }
}

Additional sections

Security and configuration notes: keep all credentials in their respective .env files or Claude Desktop config. Do not commit keys or passwords to version control.

Test the setup by building a knowledge graph from a URL you trust, for example a Wikipedia article, and verify that the graph is created in your Neo4j database using Cypher queries.

Notes on usage patterns

The MCP supports multi-source sources, academic mode with bibliographic data, custom schemas for entity types and relationships, and optional community detection to reveal clusters within your graph.

Troubleshooting

If the backend won’t start, activate the virtual environment, then run the server: uvicorn score:app --reload --port 8000.

If Claude doesn’t see the MCP, verify the absolute path in the config, completely restart Claude Desktop, and check the runtime logs for MCP-related messages.

If you encounter a model not found error, ensure your backend .env contains the LLM model configuration with your API key.

If the backend reports a connection issue, confirm the backend is running on port 8000 and that the GRAPH_BUILDER_URL matches the backend URL configured in Claude.

For empty graphs or too few entities, enable bibliographic extraction for academic papers and verify your OpenAI key has credits, along with a valid Neo4j connection in the backend .env.

If cache issues occur after updates, clear the MCP cache and restart Claude Desktop.

Examples of what you can build

Basic: Build a knowledge graph from a Wikipedia article.

Academic: Build a graph from a PDF with bibliographic extraction to capture authors, titles, and citations.

Custom schema: Define allowed node types and relationships to shape the extraction output.

Community detection: Enable clustering to identify related groups within the knowledge graph.

Available tools

build_knowledge_graph_from_url

Extracts entities and relationships from a URL and builds a knowledge graph in Neo4j.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
LLM Graph Builder MCP Server - henrardo/llm-graph-builder-mcp | VeilStrat