Home / Type/ IndexedGraph Type — mcp Architecture

IndexedGraph Type — mcp Architecture

Architecture documentation for the IndexedGraph type/interface in graph-cache.ts from the mcp codebase.

Entity Profile

Source Code

src/cache/graph-cache.ts lines 32–61

export interface IndexedGraph {
  // Raw data
  raw: SupermodelIR;

  // Indexes
  nodeById: Map<string, CodeGraphNode>;
  labelIndex: Map<string, string[]>;  // label -> node ids
  pathIndex: Map<string, PathIndexEntry>;  // filePath -> entities
  dirIndex: Map<string, string[]>;  // dir path -> child file/dir ids
  nameIndex: Map<string, string[]>;  // lowercase name -> node ids
  callAdj: Map<string, AdjacencyList>;  // function id -> callers/callees
  importAdj: Map<string, AdjacencyList>;  // file/module id -> imports/importers
  domainIndex: Map<string, { memberIds: string[], relationships: CodeGraphRelationship[] }>;

  // Precomputed
  summary: {
    filesProcessed: number;
    classes: number;
    functions: number;
    types: number;
    domains: number;
    primaryLanguage: string;
    nodeCount: number;
    relationshipCount: number;
  };

  // Metadata
  cachedAt: string;
  cacheKey: string;
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free