# Codegraph MCP Server

> Give AI agents a structural map of the codebase before they edit.

- **URL**: https://followmcp.com/en/servers/ops-codegraph-tool
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 107
- **FMRS Score**: 56/100 (Grade C)
- **Source**: https://github.com/optave/ops-codegraph-tool

- **Runtimes**: Node.js 22.12.0+
- **Auth**: No credential needed

## Overview
Codegraph is a local code intelligence tool that builds a function-level dependency graph across 34 languages and exposes queries to AI agents through an MCP server. It also supports impact analysis, complexity metrics, architecture boundary checks, CI quality gates, Git change impact and co-change analysis, and hybrid BM25 and semantic search. The graph is stored in SQLite; the README says the tool runs locally and requires no API keys.

## Best for
- Development teams that want AI agents to query local code structure.
- Projects that want to check change impact, complexity, or architecture rules before CI or code review.
- Codebases in one of the README's 34 listed languages that need function-level dependency analysis.

## Not for
- Teams needing dedicated security vulnerability detection or SAST scanning; the README explicitly places vulnerability detection outside the tool's scope.
- Users who need verified MCP client compatibility, transport protocol, or tool inventory from the available information.

## Required permissions
- Needs to read the source code of the project being analyzed to build and query its graph.
- Git co-change and diff analysis need access to repository history and change data.
- Builds and queries use local files and a SQLite database; the README says the tool requires no network calls, and semantic search can use a local model.

## Risks
- The graph and call resolution may be incomplete; the README reports a self-measured 70.3% resolution recall, with substantial variation across languages.
- The README says some directory metrics, advisory checks, drift detection, and metadata are skipped during small incremental builds; consider a full rebuild after large refactors or when a complete refresh is needed.
- The tool provides structural understanding, not vulnerability detection, and should not be treated as a SAST replacement.
- The README describes optional remote embedding or LLM providers; when configured, code may be sent to the service the user chooses.
