Skip to main content

MCP server exposing GrafeoDB graph database to AI agents

Project description

CI codecov PyPI License

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 resourcesgraph://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 limit params and truncate large results
  • Embedded — no separate database server to manage

Quickstart

# Install
pip install grafeo-mcp

# Or with uv
uv tool 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

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

grafeo_mcp-0.1.1.tar.gz (79.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grafeo_mcp-0.1.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file grafeo_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: grafeo_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 79.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for grafeo_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ecfd1d4ee23a67e6f28e327518ba7405932743fd224123ef5213ba8d66151b9
MD5 1b2945fac0f84f8e88b951dd0a351104
BLAKE2b-256 4e1f209ef5181ac8d5c9538f5b785c9a0f59c0313684287d2cbf581c2654f503

See more details on using hashes here.

Provenance

The following attestation bundles were made for grafeo_mcp-0.1.1.tar.gz:

Publisher: pypi.yml on GrafeoDB/grafeo-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grafeo_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: grafeo_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for grafeo_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5681bc0c2ddcce48568d6517d52ef16f51313db85b43efd73a82559a9dedbadc
MD5 143e175054cbbfb2bb800ebb6dbefb71
BLAKE2b-256 b3027856d47c98265635fe83bc7448221b49fc861dc19c0920405c12af7f7ad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for grafeo_mcp-0.1.1-py3-none-any.whl:

Publisher: pypi.yml on GrafeoDB/grafeo-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page