catalog-context-graph
Loads Backstage catalog-info.yaml entities and declared relations into a typed operational context graph, enabling ownership, dependency, blast-radius, path, change-risk, and catalog-drift queries.
Accepts service-graph data exported by Jaeger to add observed call edges and support catalog drift and dependency analysis.
Can push the typed catalog graph into Neo4j and serve the same read-only MCP tools using Neo4j as an optional system of record.
Ingests OpenTelemetry service-graph edges to add observed runtime call dependencies and detect calls that are undeclared in the catalog or declared dependencies never observed in telemetry.
Reads PagerDuty service IDs from catalog annotations and surfaces the associated PagerDuty service in ownership and escalation results.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
catalog-context-graph
Turn a Backstage software catalog into an operational context graph that AI agents query over MCP.
An on-call agent asked "orders-db is down — what breaks and who do we page?" needs a
dependency walk, not a document search. catalog-context-graph loads your catalog-info.yaml
files (plus optional OpenTelemetry service-graph edges and incident history) into a typed graph
and exposes eight bounded, read-only tools over the Model Context Protocol: blast radius,
ownership and escalation, dependencies, paths, change risk, and catalog drift. Neo4j is an
optional system of record.
catalog-info.yaml ─┐
OTel service graph ┼─▶ typed graph ─▶ bounded tools ─▶ MCP (stdio / streamable HTTP) ─▶ agent
incident history ──┘ │
└─▶ Neo4j (optional: system of record, Bloom/Browser exploration)Why a graph, measured
The usual alternative is "RAG over the catalog": embed or index each entity's YAML and
retrieve the top-k for the question. The repository ships a deterministic evaluation of that
baseline on the example catalog (ccg eval): 16 operational questions, ground truth computed
from declared relations, and BM25 top-k retrieval scored by recall. The recall measure is
deliberately generous to the baseline — an answer entity counts as covered if its name
appears anywhere in the retrieved text, whether or not the chain connecting it to the
question is there.
BM25 top-k | recall (upper bound) | strict recall | questions fully covered | recall at 1 / 2 / 3 / 4 hops |
k=3 | 0.40 | 0.14 | 1/16 | 1.00 / 0.31 / 0.37 / 0.50 |
k=5 | 0.56 | 0.23 | 3/16 | 1.00 / 0.42 / 0.57 / 0.50 |
k=10 | 0.66 | 0.33 | 4/16 | 1.00 / 0.69 / 0.64 / 0.50 |
graph tools | 1.00 | 1.00 | 16/16 | exact at every depth |
One-hop questions are easy for retrieval. Everything past the first hop — which teams to
page, which storefront component fails when a database two layers down does — is where flat
retrieval loses the answer, even before a model has to reason over it. Full output:
eval/results-acme.json. Limitations are below; the questions are in
eval/questions.yaml.
Related MCP server: Context Catalog MCP
Quick start
pip install "catalog-context-graph[mcp] @ git+https://github.com/ajinb/catalog-context-graph@main"
ccg stats --catalog path/to/catalog/ # entity and relation counts
ccg query --catalog path/to/catalog/ blast_radius resource:orders-db
ccg query --catalog path/to/catalog/ owners checkout-service
ccg query --catalog catalog/ --service-graph sg.json catalog_drift
ccg serve --catalog path/to/catalog/ # MCP over stdioTry it on the bundled example (44 entities: 4 systems, 8 teams, 11 components, 8 resources, 4 APIs):
ccg query --catalog examples/acme/catalog-info.yaml \
--service-graph examples/acme/service-graph.json \
--incidents examples/acme/incidents.json catalog_drift{
"undeclared_calls": [
"component:checkout-service -> component:fraud-scoring",
"component:order-worker -> component:payments-service"
],
"unobserved_dependencies": ["component:order-worker -> component:email-service"]
}MCP client configuration
{
"mcpServers": {
"catalog": {"command": "ccg", "args": ["serve", "--catalog", "/path/to/catalog"]}
}
}Tools
Tool | Answers |
| "what is the ref for the payments thing?" |
| kind, owner, system, lifecycle, tier, runbook, direct relations |
| owning team, escalation chain up the group hierarchy, members, PagerDuty service |
| what it needs, transitively — |
| what breaks if it fails, by distance with the path, plus impacted systems and teams to notify |
| the shortest dependency chain between two entities |
| a 0-100 score with its factors: fan-in, production lifecycle, tier, statefulness, undeclared calls, past incidents |
| runtime calls the catalog does not declare, and declared dependencies telemetry never saw |
Every tool is annotated readOnlyHint and closed-world, is depth- and size-capped, and takes
entity references — never query text.
Security model
No model-written queries. There is no "run this Cypher" tool. Agents get eight bounded questions; a prompt-injected agent can at most ask one of them about a different entity.
Refs are validated against the Backstage reference grammar before any lookup; anything else is rejected.
The Neo4j backend uses constant, parameterized statements. Entity text is only ever a parameter value; labels and relationship types come from a fixed allowlist. Tests assert both.
Read-only by construction. The server holds the graph in memory and has no write path.
Inputs
Backstage catalog —
catalog-info.yamlfiles or directories (multi-document YAML). Readsowner,system,domain,dependsOn,providesApis,consumesApis,subcomponentOf, groupparentand usermemberOf. Annotations used:cloudandsre.com/tier,cloudandsre.com/runbook,pagerduty.com/service-id,opentelemetry.io/service-name.Service graph —
{"edges": [{"client", "server", "requests"}]}, the shape the OpenTelemetry Collectorservicegraphconnector, Tempo and Jaeger can be exported to. Adds observedcallsedges; unknown services are reported, not guessed.Incidents —
[{"id", "title", "date", "affects": [refs]}].
Neo4j
pip install "catalog-context-graph[neo4j]"
export NEO4J_PASSWORD=...
ccg neo4j-push --catalog catalog/ --service-graph sg.json --uri bolt://localhost:7687
ccg serve --neo4j-uri bolt://localhost:7687 # serve from Neo4j as the system of recordEntities become :Entity nodes with a kind label (:Component, :Resource, :API…);
relations become DEPENDS_ON, CONSUMES_API, CALLS and so on. The agent-facing tools run on
the graph read back from Neo4j, so they behave identically on either backend.
Limitations
The evaluation uses a small hand-built catalog and a lexical (BM25) baseline. Dense-embedding retrieval and end-to-end LLM answer accuracy are not measured yet; both are on the roadmap.
Graph traversal is in memory. That is comfortable for catalogs of thousands of entities; much larger catalogs need server-side traversal in Neo4j.
change_riskis a transparent heuristic, not a calibrated model. Its factors are returned so a human can disagree with them.
Roadmap
Live Backstage catalog API ingestion (in addition to files)
Dense-retrieval baseline and an LLM answer-accuracy eval mode
Server-side Cypher traversal for very large catalogs
Ingest Kubernetes ownership labels and Terraform state as additional edges
Related
Part of the cloudandsre.com toolkit:
mcp-schema-drift (lock the tool surface an agent
sees), alert-explainer,
cloudandsre-skills.
License
Apache-2.0. See CITATION.cff to cite this software.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Shared product-knowledge graph for AI agent fleets — vault tools + agent self-signup over MCP.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceEnables AI agents to access an organization's software component catalog, including entities, relationships, interfaces, documentation, and team ownership, for grounded context and impact analysis.1MIT- FlicenseNot gradedqualityBmaintenanceExposes schema, lineage, and data-quality trust signals from a SQLite-backed catalog as MCP tools, enabling AI agents to answer grounded questions about datasets without hallucinating.-
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a local, multi-repo code graph for symbol exploration, blast radius analysis, co-change mining, and durable code-anchored memory via MCP tools.288 npm14Business Source 1.1
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to query a repository's living, versioned knowledge graph through 11 MCP tools, so they can search code, inspect node, file and community context, trace paths between routes and tables, run impact analysis, and review what changed between versions.44 npm2MIT