Automatically extracts entities and relationships from unstructured text and builds organized knowledge graphs in Neo4j databases.
Utilizes OpenAI's GPT models to process unstructured content and extract bibliographic data, entities, and relationships.
Processes Wikipedia articles to extract structured entities and relationships for knowledge graph construction.
Extracts information from YouTube video transcripts to build structured knowledge graphs.
Facilitates academic research workflows by building knowledge graphs and extracting bibliographic information from papers and sources exported from Zotero.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LLM Graph Builder MCPBuild a knowledge graph from this Wikipedia article: https://en.wikipedia.org/wiki/Neo4j"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Neo4j database - Get a free instance at Neo4j AuraDB
Create an instance and note your connection URI, username, and password
OpenAI API key - Get one here
Python 3.10+ with
uv- Install uvClaude Desktop - Download here
Step 1: Clone This Repository
Your directory structure will be:
Step 2: Set Up the Backend
Edit with your credentials:
Install and start the backend:
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):
Step 4: Configure Claude Desktop
Edit your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
Important:
Replace
/absolute/path/to/with the full path to yourllm-graph-builder-mcpdirectoryRun
pwdin thellm-graph-builder-mcpdirectory to get this pathExample:
/Users/yourname/projects/llm-graph-builder-mcp
Use the same credentials as in your backend
.envfile
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:
Claude should now use the MCP to build a knowledge graph in your Neo4j database!
Usage Examples
Basic Usage
Academic Papers (with citations)
Custom Schema
With Community Detection
Querying the Graph
This MCP builds graphs. To query them, use the separate mcp-neo4j-cypher server.
After building a graph, ask Claude:
Tool Reference
build_knowledge_graph_from_url
Extracts entities and relationships from a URL and builds a knowledge graph.
Parameters:
url(required): URL to process (Wikipedia, PDF, web page, YouTube)model(optional): LLM model to use (default:openai_gpt_4.1)allowed_nodes(optional): Comma-separated entity types (e.g.,"Person,Organization,Location")allowed_relationships(optional): Relationship triples (e.g.,"Person,WORKS_FOR,Organization")enable_communities(optional): Enable community detection (default:false)extract_bibliographic_info(optional): Extract academic citations and references (default:false)
Supported Sources
Type | Example | Notes |
Wikipedia |
| Any language supported |
PDF URLs |
| Full text extraction |
Web pages |
| Any accessible page |
YouTube |
| Extracts from transcript |
Architecture
Research & Zotero Integration
This MCP is perfect for academic research workflows:
Export PDF URLs from your Zotero library
Ask Claude to process them with bibliographic extraction
Query relationships between papers, authors, and concepts
Discover connections in your research
Example:
Backend Version & Updates
This repository includes llm-graph-builder from June 24, 2025 (commit 4d7bb5e8). This version is tested and fully compatible with the MCP.
Using the Included Backend (Recommended)
The included backend is frozen at a known-good version. This ensures:
Everything works out of the box
No compatibility issues
Predictable behavior
Using a Newer Backend Version
If you want to use the latest llm-graph-builder:
Note: Newer versions should work (the MCP uses standard endpoints), but haven't been tested. If you encounter issues, revert to the included version.
Troubleshooting
Backend won't start
Claude doesn't see the MCP
Check config path is correct (use absolute path, not
~)Completely quit and restart Claude Desktop (not just close the window)
Check Claude logs:
~/Library/Logs/Claude/mcp*.log(macOS)Verify the MCP path in config matches your actual directory
"Model not found" error
Make sure your backend .env has:
Backend shows "Connection refused"
Ensure the backend is running on port 8000
Check
GRAPH_BUILDER_URLin Claude config matches the backend URLBackend must be running before you use the MCP
Empty graph / few entities
Enable
extract_bibliographic_infofor academic papersCheck OpenAI API key is valid and has credits
Verify Neo4j connection in backend
.envFor PDFs: URL must be directly accessible (no authentication required)
Cache issues after updates
Development
How It Works
PDF URLs
The MCP automatically detects PDF URLs, downloads them, and uploads to the backend for full-text extraction using PyMuPDF. No binary garbage, just clean text.
Academic Extraction
When extract_bibliographic_info=true, the MCP instructs the LLM to specifically extract:
Authors, titles, journals, years, DOIs
Citations and references
Research concepts and methods
Relationships: AUTHORED, CITES, PUBLISHED_IN, DISCUSSES
Schema Specification
Define allowed entities and relationships to guide extraction:
Zero Backend Modifications
This MCP works with the unmodified llm-graph-builder backend. It uses compatibility tricks (like sending a space character for optional parameters) to work seamlessly with the original code.
Security
Never commit:
API keys (OpenAI, etc.)
Database passwords
Real Neo4j URIs
All credentials should be in .env files or Claude Desktop config (both gitignored).
License
Apache License 2.0 - see LICENSE file for details.
This project includes the Neo4j LLM Graph Builder, which is also licensed under Apache License 2.0.
Contributing
Contributions welcome! This project aims to be a clean wrapper with zero backend modifications required.
Open an issue or pull request on GitHub.
Credits
Neo4j LLM Graph Builder by Neo4j, Inc.
FastMCP by Marvin
Model Context Protocol by Anthropic