Ops Codegraph Tool
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. F
What is Ops Codegraph Tool?
Ops Codegraph Tool is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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 ...
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. F
This server falls under the Developer Tools and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Code intelligence CLI — function-level dependency graph acro
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx ops-codegraph-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Ops Codegraph Tool
Ops Codegraph Tool (codegraph) is a code intelligence CLI and 34-tool MCP server that builds a function-level dependency graph across 34 programming languages and exposes it to AI agents for deep codebase understanding. It provides capabilities including symbol location, call chain tracing, blast radius analysis for proposed changes, cyclomatic and cognitive complexity metrics, circular dependency detection, architecture boundary enforcement via manifesto rules, hybrid BM25 and semantic search, and git co-change analysis — all with sub-second incremental rebuilds at 4.4 ms per file using a native Rust engine. Developers use it to give AI coding agents reliable, structured context before and after making changes, dramatically reducing hallucination and missed dependencies.
Prerequisites
- Node.js 22.6 or higher installed
- npm for global installation
- A codebase in one of the 34 supported languages (JavaScript, TypeScript, Python, Go, Rust, Java, C#, and more)
- Claude Desktop, Claude Code, or another MCP-compatible AI assistant
- Optional: an LLM API key (OpenAI-compatible) for semantic search features, set via CODEGRAPH_LLM_API_KEY
Install codegraph globally
Install the @optave/codegraph package globally via npm. Node.js 22.6 or higher is required.
npm install -g @optave/codegraphBuild the dependency graph for your project
Navigate to your project root and run codegraph build to parse the codebase and create the function-level dependency graph. This is required before the MCP server or CLI queries will work.
cd /path/to/your/project
codegraph buildCreate an optional .codegraphrc.json for project configuration
For projects with path aliases, custom include/exclude patterns, or architecture rules, create a .codegraphrc.json in your project root. This file is optional for basic usage.
{
"include": ["src/**"],
"exclude": ["**/*.test.js", "**/*.spec.ts"],
"ignoreDirs": ["node_modules", ".git", "dist"],
"aliases": { "@/": "./src/" },
"build": { "incremental": true }
}Start the MCP server
Launch codegraph in MCP server mode. Use --multi-repo if you want the server to provide access to multiple registered repositories.
# Single-repo mode (default)
codegraph mcp
# Multi-repo mode
codegraph mcp --multi-repoRegister in your MCP client configuration
Add codegraph to your claude_desktop_config.json or Claude Code configuration. The server is launched as a stdio process pointing at your project.
{
"mcpServers": {
"codegraph": {
"command": "codegraph",
"args": ["mcp"],
"env": {
"CODEGRAPH_LLM_API_KEY": "your-openai-api-key-for-semantic-search"
}
}
}
}Ops Codegraph Tool Examples
Client configuration
Claude Desktop configuration entry for the codegraph MCP server. The LLM API key is optional and only required for semantic search features.
{
"mcpServers": {
"codegraph": {
"command": "codegraph",
"args": ["mcp"],
"env": {
"CODEGRAPH_LLM_API_KEY": "sk-your-openai-api-key"
}
}
}
}Prompts to try
Use these prompts to leverage codegraph's dependency intelligence when working with Claude on your codebase.
- "Find where handleAuth is defined and show me all its callers before I modify it"
- "What is the blast radius of changing the UserRepository.findById function?"
- "Show me the shortest call path between the API gateway and the database connection pool"
- "Detect all circular dependencies in the src/modules directory"
- "Analyze the cognitive complexity of my top 10 most complex functions and suggest refactoring priorities"
- "Show me which files are most historically co-changed with auth/login.ts in git history"Troubleshooting Ops Codegraph Tool
codegraph build fails or produces an empty graph
Verify that your project's language files are not excluded by the default ignoreDirs (node_modules, .git). Check that Node.js is version 22.6 or higher with 'node --version'. For projects with path aliases (e.g. @/components), add an aliases entry to .codegraphrc.json matching your tsconfig.json paths.
Semantic search returns no results or generic matches
Semantic search requires an LLM API key. Set CODEGRAPH_LLM_API_KEY to a valid OpenAI-compatible API key in your environment or in the MCP server config. BM25 keyword search works without an API key and can be used as a fallback.
MCP server starts but Claude cannot call codegraph tools
Run 'codegraph build' in the project directory before starting the MCP server — the graph must exist for tools to return results. If using multi-repo mode, ensure all repositories are registered and built. Restart the MCP client after fixing configuration issues.
Frequently Asked Questions about Ops Codegraph Tool
What is Ops Codegraph Tool?
Ops Codegraph Tool is a Model Context Protocol (MCP) server that 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. f It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Ops Codegraph Tool?
Follow the installation instructions on the Ops Codegraph Tool GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Ops Codegraph Tool?
Ops Codegraph Tool works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Ops Codegraph Tool free to use?
Yes, Ops Codegraph Tool is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Ops Codegraph Tool Alternatives — Similar Developer Tools Servers
Looking for alternatives to Ops Codegraph Tool? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Ops Codegraph Tool in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Ops Codegraph Tool?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.