Agent Setup
Install Project Instructions
The graph becomes more useful when your agent knows how to query it. Memgraph Ingester can write a managed instruction block into agent-specific files and replace that block on future runs.
From the ingested repository, run:
memgraph-ingester --init-instructions -P my-projectChoose an agent preset:
memgraph-ingester -P my-project --instructions-agent codex
memgraph-ingester -P my-project --instructions-agent claude
memgraph-ingester -P my-project --instructions-agent gemini
memgraph-ingester -P my-project --instructions-agent github
memgraph-ingester -P my-project --instructions-agent copilotInclude memory workflows:
memgraph-ingester -P my-project --instructions-agent codex --with-memoriesTarget a custom instruction file:
memgraph-ingester -P my-project --instructions-file .github/copilot-instructions.mdNo MCP server available? Install templates that drive the mgtools CLI from the memgraph-ingester-tool PyPI package instead:
memgraph-ingester -P my-project --no-mcp
memgraph-ingester -P my-project --no-mcp --with-memoriesWithout MCP
You will need Python 3.11+.
Use --no-mcp to install such instructions for different agents to skip the MCP server and use the mgtools CLI from the memgraph-ingester-tool PyPI package instead.
MCP Server
Agents have to use memgraph-ingester-mcp. It provides project-scoped tools for code lookup, RAG discovery, call graph traversal, memory search, and memory lifecycle updates.
Install and run it with uvx:
uvx memgraph-ingester-mcpCommon environment variables:
| Variable | Example | Purpose |
|---|---|---|
MEMGRAPH_INGESTER_MCP_BOLT_URI | bolt://localhost:7687 | Memgraph Bolt URI |
MEMGRAPH_INGESTER_MCP_READ_ONLY | false | Disable memory write tools when true |
Codex Configuration
Add this to ~/.codex/config.toml:
[mcp_servers.memgraphIngester]
command = "uvx"
args = ["memgraph-ingester-mcp"]
startup_timeout_ms = 20_000
[mcp_servers.memgraphIngester.env]
MEMGRAPH_INGESTER_MCP_BOLT_URI = "bolt://localhost:7687"
MEMGRAPH_INGESTER_MCP_READ_ONLY = "false"Verify:
codex mcp listClaude Configuration
Minimal .claude.json:
{
"mcpServers": {
"memgraphIngester": {
"type": "stdio",
"command": "uvx",
"args": ["memgraph-ingester-mcp"],
"env": {
"MEMGRAPH_INGESTER_MCP_BOLT_URI": "bolt://localhost:7687",
"MEMGRAPH_INGESTER_MCP_READ_ONLY": "false"
}
}
}
}Verify:
claude mcp listGemini Configuration
Add this to ~/.gemini/settings.json:
{
"mcpServers": {
"memgraphIngester": {
"command": "uvx",
"args": ["memgraph-ingester-mcp"],
"env": {
"MEMGRAPH_INGESTER_MCP_BOLT_URI": "bolt://localhost:7687",
"MEMGRAPH_INGESTER_MCP_READ_ONLY": "false"
},
"timeout": 5000,
"trust": false
}
}
}Verify:
gemini mcp listGitHub Copilot Configuration
Add this to ~/.copilot/mcp-config.json:
{
"mcpServers": {
"memgraphIngester": {
"type": "stdio",
"command": "uvx",
"args": ["memgraph-ingester-mcp"],
"env": {
"MEMGRAPH_INGESTER_MCP_BOLT_URI": "bolt://localhost:7687",
"MEMGRAPH_INGESTER_MCP_READ_ONLY": "false"
}
}
}
}OpenCode Configuration
Add this to ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"memgraphIngester": {
"type": "local",
"command": ["uvx", "memgraph-ingester-mcp"],
"enabled": true,
"environment": {
"MEMGRAPH_INGESTER_MCP_BOLT_URI": "bolt://localhost:7687",
"MEMGRAPH_INGESTER_MCP_READ_ONLY": "false"
}
}
}
}Read-Only Mode
Set MEMGRAPH_INGESTER_MCP_READ_ONLY to "true" when the agent should only inspect code and memory. Keep it "false" when you want the agent to create, update, or close Memory records.
