Start Memgraph with the MAGE extension enabled (included in the memgraph-mage Docker image: docker run -p 7687:7687 memgraph/memgraph-mage)
Verify available algorithms: CALL mg.procedures() YIELD name WHERE name STARTS WITH 'pagerank' OR name STARTS WITH 'community_detection' RETURN name
Run PageRank: CALL pagerank.get() YIELD node, rank RETURN node.id AS id, rank ORDER BY rank DESC LIMIT 10
Run community detection (Louvain): CALL community_detection.get() YIELD node, community_id RETURN community_id, collect(node.id) AS members ORDER BY size(members) DESC
For large graphs use the streaming variant to avoid materializing the full result in memory: CALL pagerank.stream() YIELD node, rank ...
MAGE algorithms operate on the full in-memory graph by default; filter subgraphs by passing a project subgraph argument where supported
Known gotchas
MAGE is bundled in the memgraph-mage Docker image; the standard memgraph image does not include MAGE — using CALL on a missing procedure returns a procedure not found error rather than a null result
Memgraph stores the entire graph in RAM; available heap determines maximum graph size — monitor memory usage via SHOW STORAGE INFO and plan capacity accordingly
As of January 2026 the MAGE repository was merged into the main Memgraph repository; community documentation may still reference the archived standalone MAGE repo
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp