|
| 1 | +# Plugin manifest — data-only. Registers the codebase-memory MCP server (agent tool), not a compose |
| 2 | +# service. Gives Hermes a code KNOWLEDGE GRAPH over the repos under the code root (mounted read-only |
| 3 | +# at /c/dev): structural queries grep can't do cheaply — call graphs, trace paths between symbols, |
| 4 | +# architecture overviews, symbol/snippet lookup. Ports V1's registry-custom.yaml `codebase-memory` |
| 5 | +# entry (the source of truth for its wiring). Companion to the codebase-memory-UI (3D graph) service, |
| 6 | +# but a SEPARATE process: this gateway-spawned MCP builds its own IN-MEMORY graph per spawn, so a |
| 7 | +# fresh session starts empty until index_repository is called (see the codebase-memory Hermes skill). |
| 8 | +id: codebase-memory |
| 9 | +name: Codebase Memory (MCP tools) |
| 10 | +description: Code knowledge-graph navigation (call graphs, trace paths, architecture, snippets) over the repos under the code root, via MCP. |
| 11 | +kind: mcp # registers an MCP server (agent tool), not a compose service |
| 12 | +requires: |
| 13 | + nvidia: false # bundled offline embeddings run on CPU — no GPU |
| 14 | + ram_gb: 2 |
| 15 | +provides: [tools] |
| 16 | +mcp: |
| 17 | + # V1 builds this locally (ordo-ai-stack-codebase-memory-mcp:latest) from a self-contained Dockerfile |
| 18 | + # that downloads + sha256-verifies the pinned DeusData/codebase-memory-mcp portable binary and bundles |
| 19 | + # the offline nomic-embed-code embeddings. V2 mirrors it as a project buildable image (build context |
| 20 | + # doc under v2/docker/codebase-memory-mcp): pinned by its build context (the Dockerfile's CBM_VERSION |
| 21 | + # + CBM_SHA256), so preflight reports 'build first', not a placeholder-digest warning. |
| 22 | + image: ordo-v2/codebase-memory-mcp:latest |
| 23 | + # Keep the indexer container WARM across calls within a session — the graph is in-memory per spawn, |
| 24 | + # so this preserves an index built via index_repository until the session ends (avoids re-index). |
| 25 | + longLived: true |
| 26 | + # The indexer is 100% local (bundled embeddings) — no egress needed. Blocks exfiltration of indexed |
| 27 | + # code from the spawned container. |
| 28 | + disableNetwork: true |
| 29 | + volumes: |
| 30 | + # Code root (HOST path from $CODE_ROOT) mounted READ-ONLY. Under the gateway's bind-mount hardening |
| 31 | + # host binds must be read-only AND allow-listed via MCP_GATEWAY_DOCKER_BIND_ALLOWED_PATHS (the |
| 32 | + # gateway sets it to $CODE_ROOT). PLACEHOLDER_CODE_ROOT is substituted from the gateway's CODE_ROOT |
| 33 | + # env by gateway-wrapper.sh (the gateway spawns this as a sibling via docker.sock, so the source |
| 34 | + # must be a HOST path, not a gateway-container path). |
| 35 | + - "PLACEHOLDER_CODE_ROOT:/c/dev:ro" |
| 36 | + # Persistent SQLite index — a NAMED volume (exempt from the host-path read-only restriction, so it |
| 37 | + # can be read-write). Survives container respawns. |
| 38 | + - "codebase-memory-cache:/cache" |
| 39 | + env: |
| 40 | + CBM_CACHE_DIR: /cache |
| 41 | + # Keep logs off stdout so they can't corrupt the stdio JSON-RPC channel. |
| 42 | + CBM_LOG_LEVEL: error |
| 43 | + tools: |
| 44 | + - index_repository |
| 45 | + - list_projects |
| 46 | + - index_status |
| 47 | + - search_graph |
| 48 | + - trace_path |
| 49 | + - query_graph |
| 50 | + - get_graph_schema |
| 51 | + - get_code_snippet |
| 52 | + - get_architecture |
| 53 | + - search_code |
| 54 | + - detect_changes |
| 55 | + - manage_adr |
| 56 | + - ingest_traces |
| 57 | + - delete_project |
0 commit comments