GraphRAG MCP
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., "@GraphRAG MCPwhat does the Bitcoin whitepaper say about mining?"
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.
๐ง GraphRAG MCP
Entity-centric Retrieval-Augmented Generation for Crypto Whitepapers
Local-first โข Private โข FastMCP-ready

1๏ธโฃ โจ Overview
GraphRAG MCP is a modular, local-first system that turns crypto whitepapers into an entity-centric Knowledge Graph and a vector-searchable corpus, then answers questions with RAG + optional KG enrichment + LLM synthesis โ all via standardized FastMCP tools.
Why this project?
๐ก๏ธ Privacy by default: runs entirely on your machine (Ollama, Chroma, GraphDB).
โก Fast & focused: entity-filtered retrieval narrows context to the right tokens/protocols.
๐งฉ Composable: exposes
rag.*andkg.*tools so an MCP Coordinator or Streamlit app can orchestrate multi-tool workflows.๐ง Explainable answers: returns citations with doc/chunk/entity IDs for every response.
๐ Typical usage
Ingest and label whitepapers โ build embeddings and insert entities.
Ask questions via
rag.qa(semantic + entity-filtered retrieval), optionally enrich with KG labels/aliases.Get concise LLM answers with inline citations to source chunks.
Related MCP server: pdf-context
2๏ธโฃ Features
๐งฉ Knowledge Graph (KG)
Entity-only architecture using RDF/OWL ontologies (
mcp-core.ttl,mcp-crypto.ttl).Built on Ontotext GraphDB 11+ with SHACL validation and SPARQL/GraphQL endpoints.
Stores canonical entities such as tokens, protocols, components, and organizations.
Enables KG enrichment for RAG answers via aliases, labels, and relationships.
๐ Vector Retrieval (RAG)
ChromaDB acts as the persistent vector store for chunk embeddings.
Embeddings generated using Ollamaโs
nomic-embed-textmodel.Supports semantic and entity-filtered retrieval modes for accurate context fetching.
Each chunk contains structured metadata:
doc_id,chunk_id,entity_ids,section_type, andpage.
๐ง Local LLM Inference
Uses Ollama for fully local inference โ no external API keys required.
Compatible with models like
llama3.1:latest,qwen2.5:14b-instruct, ormistral.Performs labeling, summarization, and final QA synthesis.
Includes deterministic mock mode for offline testing and CI.
โ๏ธ FastMCP Servers
Two modular servers expose tools via FastMCP 2.x:
ragโrag.search,rag.embed_and_index,rag.reindex,rag.delete,rag.health,rag.qakgโsparql_query,sparql_update,push_labels,validate_labels,list_documents,kg.health
Both run locally via stdio and are MCP-Coordinator compatible.
๐ Privacy & Portability
100% offline operation โ suitable for air-gapped or research environments.
Reproducible local stack (GraphDB + Chroma + Ollama + FastMCP).
Works seamlessly on Windows 11, macOS, or Linux.
๐ Integration Ready
Plug-and-play with MCP Coordinators or Streamlit apps for end-user Q&A.
Can interoperate with other MCPs such as:
Brave API MCP (web search)
MongoDB MCP (strategy data)
Telegram MCP (messaging)
Gmail MCP (email retrieval)
Returns clean JSON outputs for easy chaining into agentic workflows.
3๏ธโฃ ๐๏ธ Architecture
The GraphRAG MCP architecture combines Knowledge Graph reasoning, Vector-based retrieval, and Local LLM synthesis โ all under the MCP interoperability standard.
Itโs designed for clarity, privacy, and modular scalability.
๐งญ High-Level Overview
Layer | Technology | Purpose | Example Components |
๐ Ingestion Layer | Python + LangChain | Reads PDFs, splits into semantic chunks, labels with LLMs |
|
๐งฉ Knowledge Graph Layer (KG) | GraphDB (Ontotext) + RDFLib | Stores canonical entities (tokens, protocols, organizations) |
|
๐พ Vector Retrieval Layer (RAG) | ChromaDB + Ollama embeddings | Stores text chunks + metadata + embeddings for semantic retrieval |
|
โ๏ธ MCP Layer | FastMCP 2.x | Exposes standardized MCP tools ( |
|
๐ง LLM Synthesis Layer | Ollama LLMs ( | Answers questions with retrieved context + KG enrichment |
|
๐ฌ User Interface Layer | MCP Coordinator / Streamlit | Connects multiple MCPs for conversational Q&A | Coordinator UI or custom Streamlit dashboard |
๐น Data Flow Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Whitepapers โ
โ (PDFs, research papers, documentation) โ
โโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Ingestion & Labeling โ
โ pdf_reader โ semantic_splitter โ โ
โ llm_chunk_tagger โ postprocess โ
โโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโดโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ง GraphDB KG โ โ ๐พ Chroma RAG โ
โ Entities & IRIs โ โ Chunks + Embeddings โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ โ๏ธ kg_server โ โ โ๏ธ rag_server โ
โ (FastMCP) โ โ (FastMCP) โ
โโโโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโโโ
โ โ
โโโโโโโโโโฌโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฌ MCP Coordinator / Streamlit โ
โ User-facing Q&A Interface โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง How It Works (Step-by-Step)
Step | Description | Input | Output |
1๏ธโฃ | PDF Parsing | Whitepaper PDF | Raw text pages |
2๏ธโฃ | Semantic Splitting | Raw text | Meaningful chunks (by section/topic) |
3๏ธโฃ | LLM Labeling | Chunk text | Entities, relations, and section labels |
4๏ธโฃ | Postprocessing | Labeled chunks | Cleaned JSONL with canonical entity IRIs |
5๏ธโฃ | Indexing | JSONL labels | Chroma embeddings + KG triples |
6๏ธโฃ | Retrieval (rag.search) | Query text / entities | Relevant chunks |
7๏ธโฃ | Enrichment (optional) | Retrieved entities | KG aliases, definitions |
8๏ธโฃ | Answer Synthesis (rag.qa) | Question + context | Concise answer with citations |
๐ Data Modalities
Data Type | Storage | Example |
๐งฑ Entity | GraphDB |
|
๐ Chunk | Chroma | โBitcoin is a peer-to-peer electronic cash systemโฆโ |
๐งฉ Embedding | Chroma / Ollama | 768-dim |
๐งฎ Provenance | Metadata |
|
๐ฌ Answer | MCP JSON |
|
๐งฑ Core MCP Tools
Server | Tool | Description |
๐งฉ RAG |
| Semantic search over chunks |
| Add new labeled chunks to index | |
| Rebuild from outputs directory | |
| Delete by IDs or filters | |
| Question answering with LLM synthesis | |
| Diagnostics and store info | |
๐ง KG |
| Execute SPARQL against GraphDB |
| Add or validate KG entries | |
| Retrieve document metadata | |
| Check GraphDB repository status |
4๏ธโฃ โ๏ธ Installation & Setup
Set up your local GraphRAG MCP environment in just a few steps!
This stack runs fully offline and integrates seamlessly with Ollama, GraphDB, and Chroma.
๐งพ Prerequisites
Requirement | Description | Example |
๐ Python | Version 3.11+ recommended |
|
๐ง Ollama | Local LLM runtime (for inference + embeddings) |
|
๐งฉ GraphDB Desktop 11+ | Local Knowledge Graph database | runs at |
๐พ ChromaDB | Vector store for embeddings | auto-initialized under |
๐งฐ FastMCP | Multi-Component Platform runtime (2.x) | installed via |
๐งฑ Folder Layout (simplified)
Folder | Purpose | Example Contents |
| Core codebase |
|
| Generated outputs | labeled chunks, reports, embeddings |
| Chroma persistent vector store |
|
| Environment configuration | Ollama, GraphDB, Chroma settings |
| Offline unit tests |
|
๐งฐ Step-by-Step Setup
๐ช 1๏ธโฃ Clone & Create Virtual Environment
git clone https://github.com/Swissbit92/GraphDB_Desktop.gitโก 2๏ธโฃ Activate Environment
OS | Command |
๐ช Windows (PowerShell) |
|
๐ง Linux / macOS |
|
๐ฆ 3๏ธโฃ Install Dependencies
pip install -r requirements.txtโ๏ธ 4๏ธโฃ Verify Installation
python -m src.mcp.rag_server --list-tools
python -m src.mcp.kg_server --list-toolsโ
You should see tools like rag.qa, rag.search, and kg.health.
๐ง Optional: Preload Ollama Models
Model | Purpose | Pull Command |
๐ฆ llama3.1:latest | Default reasoning + summarization model |
|
๐งฉ nomic-embed-text | Embedding model for RAG vectorization |
|
๐ค qwen2.5:14b-instruct | Larger model for complex QA tasks |
|
๐ Quick Sanity Check
Run a quick health diagnostic to ensure everything is configured correctly:
pytest -q
python -m src.mcp.rag_server --run-tool rag.health
python -m src.mcp.kg_server --run-tool kg.healthIf both return โ OK, youโre ready to run the pipeline and start querying your Knowledge Graph + RAG system!
5๏ธโฃ ๐งช How to Use & Test
๐ฅ Ingest Whitepapers & Build the Index
# Place your PDFs under .\whitepapers\ then run:
python -m src.pipeline --input ".\whitepapers\*.pdf"โ Outputs:
Labeled JSONL โ
outputs\run_simple\labels\Chroma index โ
.chroma\(If enabled) Entities pushed to GraphDB repository
mcp_kg
๐ง Start the MCP Servers (RAG + KG)
# Terminal A
python -m src.mcp.rag_server# Terminal B
python -m src.mcp.kg_server๐ก Tip: In another PowerShell window, confirm the tools are available:
python -m src.mcp.rag_server --list-tools
python -m src.mcp.kg_server --list-tools๐ Quick Retrieval Check (RAG)
# Example: semantic search for "peer-to-peer electronic cash"
python -m src.mcp.rag_server --run-tool rag.search --input '{ "text": "peer-to-peer electronic cash", "k": 3 }'You should see matching chunks with doc_id, chunk_id, and distances.
โ Ask Questions with Citations (rag.qa)
# Fully offline (deterministic mock answer)
python -m src.mcp.rag_server --run-tool rag.qa --input '{ "question": "What problem does Bitcoin aim to solve?", "k": 5, "kg_enrich": true, "use_mock_llm": true }'โก๏ธ Returns:
answer: concise response (mock or LLM)citations:[ {doc_id, chunk_id, entity_ids, text} ]took_ms,model_used
Switch to real LLM synthesis by omitting use_mock_llm (requires Ollama running).
๐ง Optional: Entity-Filtered QA
python -m src.mcp.rag_server --run-tool rag.qa --input '{ "question": "How does proof-of-work secure the network?", "entity_ids": ["https://kg.mcp.ai/id/token/bitcoin"], "k": 5, "kg_enrich": true, "use_mock_llm": true }'This restricts retrieval to chunks tagged with the specified KG entity(ies).
๐งช Run the Test Suite
pytest -qKey tests (all offline):
tests\test_rag_qa.py: verifies retrieval normalization and mock LLM modetests\test_kg_server.py: checks KG connectivity (skips if GraphDB not running)
๐ฉบ Health Checks
python -m src.mcp.rag_server --run-tool rag.health
python -m src.mcp.kg_server --run-tool kg.healthExpect collection info, document counts, and OK status.
๐งฉ MCP Coordinator / UI Hookup (Optional)
Ensure your mcp.json references the running servers:
{
"mcpServers": {
"rag": { "command": "python", "args": ["-m", "src.mcp.rag_server"] },
"kg": { "command": "python", "args": ["-m", "src.mcp.kg_server"] }
}
}Then connect via your MCP Coordinator or Streamlit app to interactively call rag.qa and kg.* tools.
๐ Closing Words
GraphRAG MCP is part of the broader Eeva AI ecosystem โ an open, modular framework for intelligent crypto research and strategy generation.
This project wouldnโt exist without the incredible open-source community that continues to push the boundaries of local AI and knowledge engineering.
If you find this useful:
โญ Star the repository to support ongoing development
๐งฉ Contribute improvements or new MCP modules
๐ง Explore integrations with other MCPs (Brave API, MongoDB, Telegram, etc.)
๐ฌ Share feedback โ every suggestion helps make the system smarter, faster, and more reliable
โKnowledge is only powerful when itโs connected.โ
โ Eeva AI Research
Thank you for being part of the open-source journey. ๐
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Swissbit92/GraphRAG_MCP_Crypto'
If you have feedback or need assistance with the MCP directory API, please join our Discord server