About Ops Codegraph Tool
Ops Codegraph Tool is an MCP server published by optave in the RAG category: code intelligence CLI — function-level dependency graph across 11 languages, 30-tool MCP server for AI agents, complexity metrics, architecture boundary enforcement, CI quality gates, git diff impact with co-change analysis, hybrid semantic search. Fully local, zero API keys required. Conduid read 35 tools from its source: ast_query, audit, batch_query, branch_compare, brief, cfg and 29 more. It is published to npm as @optave/codegraph and starts with npx.
The repository has 105 stars and 26 forks, and its last commit was on 13 Nov 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include architecture, ci-cd, cli, code-analysis, code-quality and codeowners.
Install
claude mcp add ops-codegraph-tool -- npx -y @optave/codegraphnpx -y @optave/codegraphgit clone https://github.com/optave/ops-codegraph-toolTools (35)
ast_querySearch stored AST nodes (calls, literals, new, throw, await) by pattern. Requires a prior build.auditComposite report combining explain, fn-impact, and health metrics for a file or function. Returns structure, blast radius, complexity, and threshold breaches in one call.batch_queryRun a query command against multiple targets in one call. Returns all results in a single JSON payload — ideal for multi-agent dispatch.branch_compareCompare code structure between two git refs (branches, tags, commits). Shows added/removed/changed symbols and transitive caller impact using temporary git worktrees.briefToken-efficient file summary: symbols with roles and transitive caller counts, importer counts, and file risk tier (high/medium/low). Designed for context injection.cfgShow intraprocedural control flow graph for a function.checkCI gate: run manifesto rules (no args), diff predicates (with ref/staged), or both (with rules flag). Returns pass/fail verdicts.co_changesFind files that historically change together based on git commit history. Requires prior `codegraph co-change --analyze`.code_ownersShow CODEOWNERS mapping for files and functions. Shows ownership coverage, per-owner breakdown, and cross-owner boundary edges.communitiesDetect natural module boundaries using Leiden community detection. Compares discovered communities against directory structure and surfaces architectural drift.complexityShow per-function complexity metrics (cognitive, cyclomatic, nesting, Halstead, Maintainability Index). Sorted by most complex first.contextFull context for a function: source code, dependencies with summaries, callers, signature, and related tests — everything needed to understand or modify a function in one calldataflowShow data flow edges or data-dependent blast radius.diff_impactAnalyze git diff to find which functions changed and their transitive callersexecution_flowTrace execution flow forward from an entry point through callees to leaves, or list all entry points with list=trueexport_graphExport the dependency graph in DOT, Mermaid, JSON, GraphML, GraphSON, or Neo4j CSV formatfile_depsShow what a file imports and what imports itfile_exportsShow exported symbols of a file with per-symbol consumers — who calls each export and from wherefind_cyclesDetect circular dependencies in the codebasefn_impactShow function-level blast radius: all functions transitively affected by changes to a functionimpact_analysisShow files affected by changes to a given file (transitive)implementationsList all concrete types (classes, structs, records) that implement a given interface or traitinterfacesList all interfaces and traits that a given class, struct, or record implementslist_functionsList functions, methods, classes, structs, enums, traits, records, and modules in the codebase, optionally filtered by file or name patternlist_reposList all repositories registered in the codegraph registrymodule_mapGet high-level overview of most-connected filesnode_rolesShow node role classification (entry, core, utility, adapter, dead [dead-leaf, dead-entry, dead-ffi, dead-unresolved], leaf) based on connectivity patternspathFind shortest path between two symbols (or files with file_mode) in the dependency graphqueryQuery the call graph: find callers/callees with transitive chain, or find shortest path between two symbolssemantic_searchSearch code symbols by meaning using embeddings and/or keyword matching (requires prior `codegraph embed`). Default hybrid mode combines BM25 keyword + semantic search for best results.sequenceGenerate a Mermaid sequence diagram from call graph edges. Participants are files, messages are function calls between them.structureShow project structure with directory hierarchy, cohesion scores, and per-file metrics. Per-file details are capped at 25 files by default; use full=true to show all.symbol_childrenList sub-declaration children of a symbol: parameters, properties, constants. Answers "what fields does this class have?" without reading source.triageRanked audit queue by composite risk score. Merges connectivity (fan-in), complexity (cognitive), churn (commit count), role classification, and maintainability index into a single weighted score.whereFind where a symbol is defined and used, or list symbols/imports/exports for a file. Minimal, fast lookup.Security checks
- ✓README presentThe repository's README runs to about 8.4K words.
5 checks have not been run yet.
README
The repository's README runs to about 8.4K words. The original in the repository is authoritative.
Read full README