Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GRAFEO_DB_PATHNoPath to the database file. Creates it if it doesn't existIn-memory

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

grafeo-mcp gives you a Grafeo graph database: nodes with labels and properties, joined by directed, typed edges.

Start with graph_info: it lists the labels, edge types and property names with their types, and the vector and text indexes, so queries use names that exist. Node and edge IDs are integers.

  • One node or edge: create_node, create_edge, get_node, update_node, delete_node, update_edge, delete_edge.

  • Browse: search_nodes_by_label (one label), get_neighbors (one hop).

  • Many nodes and edges at once: batch_import.

  • Anything else (multi-hop patterns, filters, aggregations, MERGE upserts, label changes): execute_gql.

  • Search: search_text needs create_text_index; vector_search, mmr_search and vector_graph_search need create_vector_index.

  • Analysis: pagerank, betweenness_centrality, louvain, connected_components, dijkstra.

  • History: query_as_of, get_node_as_of (only when the server keeps history).

A failed call returns "Error: : ... Hint: ..."; follow the hint. graph_info's database.read_only is true when writes are disabled.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pagerankB

Rank nodes by PageRank: how many links point at them, and from how important nodes. Returns the top_k.

For "the most important person", pass label="Person".

dijkstraA

Shortest weighted path from source_id to target_id. Returns distance, hop_count and the path's nodes.

By default edges count in either direction, as "how are A and C connected" means; pass direction="outgoing" to follow edges only from source to target (a dependency or a flow).

louvainB

Find communities (Louvain): groups of densely linked nodes, numbered from 0 by their smallest node ID.

betweenness_centralityB

Rank nodes by betweenness: how often they lie on shortest paths between others (bridges, bottlenecks).

connected_componentsA

Group nodes into connected components, ignoring edge direction.

Returns num_components and components ({component id: [node IDs]}).

batch_importA

Create many nodes and edges in one call, all or nothing.

The whole batch is checked before anything is written, and undone if the engine rejects part of it. Returns created_nodes, created_edges and node_id_map (batch index to node ID).

create_nodeA

Create one node and return it with its id.

For many nodes use batch_import; to create only when missing, execute_gql with MERGE. A list of numbers is stored as a vector, so vector indexes pick it up.

create_edgeA

Create one directed edge from source_id to target_id (both must exist) and return it with its id.

get_nodeA

Get one node by ID: its labels and properties. Find IDs with search_nodes_by_label or execute_gql.

get_node_as_ofA

Get a node's labels and properties as they were at as_of (time travel).

Needs a server that keeps history (GRAFEO_HISTORY_RETENTION).

search_nodes_by_labelA

List the nodes that have one label, with their properties, a page at a time. Filter with execute_gql.

graph_infoA

Overview of the graph; call it before querying.

Returns node and edge counts; each label and edge type with its count and property types (and for edges the label pairs they connect); the vector, text and property indexes; and the database path (null in memory), whether writes are disabled, and the engine version.

get_neighborsA

List the nodes one hop from node_id, each with the edge that links it (edge_id, edge_type).

For longer paths use execute_gql.

update_nodeB

Set properties on an existing node and return it.

Labels change with execute_gql (SET n:Label, REMOVE n:Label).

delete_nodeB

Delete one node, and with detach its edges, in one step.

update_edgeA

Set properties on an existing edge and return it.

The edge type cannot change: delete the edge and create a new one.

delete_edgeA

Delete one edge. Edge IDs come from get_neighbors (edge_id) or execute_gql (RETURN id(r) AS id).

execute_gqlA

Run one GQL statement: multi-hop patterns, filters, aggregations, MERGE upserts, label changes.

Cypher syntax (CREATE, MERGE, OPTIONAL MATCH, DETACH DELETE) runs as written. Rules:

  • One statement per call; chain clauses instead (MATCH ... INSERT ...).

  • Put values in params as $name, not in the text. Embeddings too: a list literal is stored as a list, which vector indexes skip.

  • 1.5 is an exact decimal (0.1 + 0.2 = 0.3); 1.5e0 is a float. Overflow and division by zero fail.

  • No WHERE right after INSERT, CREATE, MERGE or DELETE: filter before the write, or WITH ... WHERE after it.

  • A path pattern in WHERE needs EXISTS: WHERE EXISTS { (p)-[:WORKS_AT]->(:Company) }, not WHERE (p)-->(..).

  • DELETE takes variables: MATCH (b)-[w:WORKS_AT]->(c) DELETE w, not DELETE (b)-[:WORKS_AT]->(c).

  • ORDER BY puts nulls last.

Returns {columns, rows, total_rows}; a node in a row is a map with _id, _labels and its properties, an edge has _id, _type, _source, _target. Writes add counters. A read that finds nothing, or only nulls, gets a hint naming the labels, edge types or properties that do not exist.

Example: MERGE (p:Person {name: $name}) SET p += $props RETURN id(p) AS id with params={"name": "Ada", "props": {"born": 1815}}

query_as_ofA

Run one reading GQL statement against the graph as it was at as_of (time travel).

Needs a server that keeps history (GRAFEO_HISTORY_RETENTION). Same rules and result as execute_gql. Example: query_as_of("MATCH (p:Person) RETURN p.name, p.age", "3600")

create_text_indexA

Create a full-text (BM25) index on a string property, for search_text. Existing and later nodes are indexed.

search_textA

Keyword search (BM25) in a text-indexed property. Returns [{node_id, score, labels, properties}], best first.

vector_searchA

Find the k nodes nearest to query_vector, or to node like_node_id, in a vector index.

Without an embedding model, use like_node_id ("what is most like this node?"). Nearest first.

create_vector_indexA

Create an HNSW vector index on a label and property, for vector_search, mmr_search and vector_graph_search.

Existing and later vectors are indexed; a list literal in execute_gql text is stored as a list, not a vector.

mmr_searchA

Like vector_search, but diverse: Maximal Marginal Relevance skips near-duplicates (good RAG context).

Results come in selection order.

vector_graph_searchA

Vector search, then the graph around each hit, in both edge directions.

Returns seeds (as vector_search) and neighbors, each with its hop count and the node it was reached from.

Prompts

Interactive templates invoked by user choice

NameDescription
explore_graphGuide an AI agent through structured exploration of the knowledge graph. The agent will systematically discover the graph's schema, sample nodes, traverse relationships, and summarize patterns.
knowledge_extractionGuide an AI agent through extracting entities and relationships from text into the graph. The agent will analyze the text, create nodes for entities, create edges for relationships, and verify the resulting graph structure.
graph_analysisGuide an AI agent through analytical exploration of the graph structure. The agent will run community detection, PageRank, and neighborhood traversals to produce a narrative about the graph's structure and important entities.
similarity_searchGuide an AI agent through vector-powered semantic search on the graph. The agent will perform similarity search, explore neighborhoods of results, and synthesize findings.

Resources

Contextual data attached and managed by the client

NameDescription
graph_schemaRich schema overview of the graph: node labels with properties, edge type patterns, indexes, and counts. Designed for AI agents to understand the graph structure before querying.
graph_statsPerformance-oriented database statistics: counts, indexes, storage size, and operational info. Use graph://schema for structural overview.

TDQS

A3.9/5.0

Scored across 25 tools

Disambiguation5/5

Each tool targets a distinct resource+action: node CRUD, edge CRUD, traversal (get_neighbors, dijkstra), analytics (pagerank, louvain, betweenness_centrality, connected_components), and three clearly separated search modalities (label listing, BM25 text, vector/MMR/graph). The catch-all execute_gql could in principle do many writes, but its description explicitly defers single-node creation, label changes and bulk work to the dedicated tools. The vector trio (vector_search, mmr_search, vector_graph_search) is the only family with real kinship, and their descriptions cleanly separate plain nearest-neighbour, diversity-aware, and neighbourhood-expanding behaviour.

Naming Consistency4/5

The surface is uniformly snake_case, with the bulk following a verb_noun pattern (create_node, get_neighbors, search_text, delete_edge, query_as_of). Algorithm tools use bare domain names (pagerank, louvain, dijkstra, betweenness_centrality) and a few are noun-first (vector_search, mmr_search, graph_info), which is a minor but readable deviation. No casing or verb-style chaos.

Tool Count4/5

At 25 tools this sits at the heavy end, but the scope genuinely justifies it: CRUD, batch import, two time-travel reads, five graph algorithms, and a full search/index subsystem are all separate capabilities. Everything present is callable rather than decorative, though a lighter server might fold the index-creation tools or some algorithm variants behind parameters.

Completeness4/5

Node and edge lifecycles are fully covered (create/get/update/delete plus batch import), with time travel for both nodes and ad-hoc queries, index creation, and rich analytics. Minor gaps remain: there is no drop/list-index tool (indexes are only visible via graph_info) and no direct get_edge or edge-listing tool — edge reads go through get_neighbors or execute_gql. Labels and MERGE are handled via execute_gql, so no true dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues