@mporenta/mg
v0.1.2
Published
Agent-friendly CLI and Pi extension for memory-graph-mcp
Downloads
60
Maintainers
Readme
mg
Agent-friendly CLI for the memory-graph-mcp FastAPI surface.
# Install the CLI only.
npm i -g @mporenta/mg
# Install the CLI package as a Pi user-level package; this loads the bundled memory-graph Pi extension.
pi install npm:@mporenta/mg
export MEMORY_GRAPH_URL=http://localhost:8000
mg config doctorData is written to stdout; diagnostics are written to stderr. JSON is emitted by default when stdout is not a TTY. Use --format pretty for human-readable output.
Search recipes
All search subcommands require --query and return JSON-friendly results with diagnostics and next_steps hints.
# Discover candidate entities before narrowing context.
mg search entities --query "memory graph" --limit 5
# Recall repo-scoped codebase context with paths and observation IDs.
mg search codebase --query "search diagnostics" --repo memory-graph-mcp --limit 5
# Pass an embedding vector when a caller can produce one for hybrid ranking.
mg search codebase --query "ranking" --repo memory-graph-mcp --query-embedding 0.1,0.2,0.3
# Follow up on exact observations for a known entity.
mg search memory --query "noise_floor" --entity "memory-graph-mcp" --limit 5context-mode bridge
mg ctx index-recall sends a memory-graph recall block to context-mode's ctx_index tool so it becomes searchable through ctx_search.
mg ctx index-recall --source memory-graph-recall --file recall.md
printf '%s\n' '# [memory-graph-recall]' 'Relevant project memories...' | mg ctx index-recall
# Advanced: point at a specific context-mode MCP server entrypoint or wrapper.
mg ctx index-recall --content 'Relevant project memories...' --server-bundle /path/to/server.bundle.mjs --timeout-ms 10000
mg ctx index-recall --content 'Relevant project memories...' --command 'node /path/to/server.bundle.mjs'