MCP server exposing GrafeoDB graph database to AI agents
Project description
grafeo-mcp
MCP server that exposes GrafeoDB - an embedded graph database - to AI agents via the Model Context Protocol.
One install, zero infrastructure. The MCP server is the database.
Features
- 16 tools - graph CRUD, GQL queries, vector search, MMR, hybrid retrieval, PageRank, Dijkstra, Louvain and more
- 3 resources -
graph://schema,graph://stats,graph://nodes/{id} - 4 workflow prompts - guide agents through exploration, knowledge extraction, graph analysis and similarity search
- GQL with Cypher auto-normalization - agents trained on Cypher syntax work out of the box
- Schema-first - agents discover the graph structure before querying
- Token-aware - all tools have
limitparams and truncate large results - Embedded - no separate database server to manage
Quickstart
# Install
uv tool install grafeo-mcp
# Or with pip
pip install grafeo-mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"grafeo": {
"command": "grafeo-mcp",
"env": {
"GRAFEO_DB_PATH": "/path/to/your/graph.db"
}
}
}
}
Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"grafeo": {
"command": "grafeo-mcp",
"env": {
"GRAFEO_DB_PATH": "./graph.db"
}
}
}
}
VS Code / Copilot
Add to .vscode/mcp.json:
{
"servers": {
"grafeo": {
"command": "grafeo-mcp",
"env": {
"GRAFEO_DB_PATH": "${workspaceFolder}/graph.db"
}
}
}
}
HTTP transport
For remote or multi-client setups:
grafeo-mcp streamable-http
Environment Variables
| Variable | Description | Default |
|---|---|---|
GRAFEO_DB_PATH |
Path to the database file. Creates it if it doesn't exist | In-memory |
Tools
Query
| Tool | Description |
|---|---|
execute_gql |
Run GQL queries (Cypher syntax auto-normalized to GQL) |
Graph CRUD & Traversal
| Tool | Description |
|---|---|
create_node |
Create a node with labels and properties |
create_edge |
Create a directed edge between two nodes |
get_node |
Retrieve a node by ID |
get_neighbors |
Explore a node's neighborhood (1-hop) |
search_nodes_by_label |
Find nodes by label with pagination |
graph_info |
Schema, stats, labels, edge types, indexes |
Vector Search
| Tool | Description |
|---|---|
vector_search |
k-NN similarity search (HNSW) |
mmr_search |
Diversity-aware search (Maximal Marginal Relevance) |
create_vector_index |
Create HNSW index on a label + property |
vector_graph_search |
Hybrid: vector search + graph neighborhood expansion |
Graph Algorithms
| Tool | Description |
|---|---|
pagerank |
Rank nodes by importance |
dijkstra |
Shortest weighted path between two nodes |
louvain |
Community detection (Louvain modularity) |
betweenness_centrality |
Find bridge/bottleneck nodes |
connected_components |
Find disconnected subgraphs |
Resources
| URI | Description |
|---|---|
graph://schema |
Rich schema: labels, properties, edge types |
graph://stats |
Counts, memory, disk, config info |
graph://nodes/{node_id} |
Node details + connection summary |
Prompts
| Prompt | Description |
|---|---|
explore_graph |
Guided exploration of the graph structure |
knowledge_extraction |
Extract entities and relationships from text |
graph_analysis |
Structural analysis: communities, PageRank, hubs |
similarity_search |
Vector-powered semantic search with graph context |
Development
git clone https://github.com/GrafeoDB/grafeo-mcp
cd grafeo-mcp
uv sync
uv run pytest # Run tests
uv run ruff check . # Lint
uv run ruff format . # Format
uv run ty check # Type check
See Also
- grafeo-memory includes a built-in MCP server (
grafeo-memory-mcp) that wraps the high-level memory API — extract, reconcile, search, summarize. If you need AI memory management rather than raw graph access, useuv add grafeo-memory[mcp].
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grafeo_mcp-0.1.3.tar.gz.
File metadata
- Download URL: grafeo_mcp-0.1.3.tar.gz
- Upload date:
- Size: 87.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b3a9d23d45753b24bad0264c4bd65b83ac79ab49430929d100ea92e46e35623
|
|
| MD5 |
c800cf6f3f1195e5d923c956ec91a943
|
|
| BLAKE2b-256 |
a395b83910f796ac416094e88facfac809f3c91ded88c2bdd825c049d5bae3e7
|
Provenance
The following attestation bundles were made for grafeo_mcp-0.1.3.tar.gz:
Publisher:
pypi.yml on GrafeoDB/grafeo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grafeo_mcp-0.1.3.tar.gz -
Subject digest:
1b3a9d23d45753b24bad0264c4bd65b83ac79ab49430929d100ea92e46e35623 - Sigstore transparency entry: 1019511587
- Sigstore integration time:
-
Permalink:
GrafeoDB/grafeo-mcp@e580385e9ea2b12d2bd856034a0240c850051b56 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/GrafeoDB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e580385e9ea2b12d2bd856034a0240c850051b56 -
Trigger Event:
release
-
Statement type:
File details
Details for the file grafeo_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: grafeo_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
835084839db5f50d81b9a093d059523b1e49d54f0866cb491903b3c3db03108b
|
|
| MD5 |
a0634e09a316f6fb5fb2c9b92209f992
|
|
| BLAKE2b-256 |
b5d39d8245e325d7c8b360cd27a878b80414eac6225054c6ea2327cea17c2bf5
|
Provenance
The following attestation bundles were made for grafeo_mcp-0.1.3-py3-none-any.whl:
Publisher:
pypi.yml on GrafeoDB/grafeo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grafeo_mcp-0.1.3-py3-none-any.whl -
Subject digest:
835084839db5f50d81b9a093d059523b1e49d54f0866cb491903b3c3db03108b - Sigstore transparency entry: 1019511596
- Sigstore integration time:
-
Permalink:
GrafeoDB/grafeo-mcp@e580385e9ea2b12d2bd856034a0240c850051b56 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/GrafeoDB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@e580385e9ea2b12d2bd856034a0240c850051b56 -
Trigger Event:
release
-
Statement type: