CodeGraph MCP server

CodeGraph MCP server

codebase-graph•byphoenixrr2113

An MCP server that indexes source code and project knowledge into a FalkorDB graph, exposing analysis, search, knowledge, codebase, and query tools to agents.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Searches code by symbol, structure, and meaning, and extracts functions, classes, interfaces, variables, types, imports, and calls.
  • •Stores project facts with validity timestamps to support point-in-time queries.
  • •Exposes five grouped MCP tools: analyze, codebase, knowledge, query, and search.
  • •Supports first-class parsing of TypeScript, JavaScript, Python, Go, Rust, and Markdown, with generic tree-sitter support for other languages.

BEST FOR

  • •Agents that need to inspect impact, call hierarchy, cycles, dead-code candidates, hotspots, and ownership from indexed git history.
  • •Developers who want to configure, index, and inspect codebases from an MCP client or a browser dashboard.
  • •Teams running read-only Cypher queries against a code graph to answer structural questions.

ABOUT CODEBASE-GRAPH

CodeGraph MCP server is cataloged as an MCP server attributed to phoenixrr2113. An MCP server that indexes source code and project knowledge into a FalkorDB graph, exposing analysis, search, knowledge, codebase, and query tools to agents. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for CodeGraph MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does CodeGraph handle embeddings and privacy?

It defaults to a locally cached embedding model with no key, but can use Voyage or OpenRouter and send embedding inputs to those providers when configured.

Which storage backends can CodeGraph use?

It can run with embedded FalkorDBLite on Linux x64 and Apple silicon macOS, or an external FalkorDB service on other platforms.

上游原版 README

在 GitHub 查看同一版本原文

README.md · f6f55f99b23a · 采集于 2026-11-13 10:26:51 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

CodeGraph

CI CodeQL GitHub stars npm version npm downloads MIT license

CodeGraph turns source code and project knowledge into a searchable graph for AI agents and developers. It parses code with tree-sitter, stores structural and temporal relationships in FalkorDB, and exposes five focused tools through the Model Context Protocol (MCP).

Access the project

The public npm package is @agntk/codegraph-mcp. Version 0.1.0 provides the codegraph-mcp and codegraph-dashboard bins.

What it does

  • Searches code by symbol, structure, and meaning.
  • Extracts functions, classes, interfaces, variables, types, imports, calls, and other relationships.
  • Stores project facts with valid_at and invalid_at timestamps for point-in-time queries.
  • Supports first-class TypeScript, JavaScript, Python, Go, Rust, and Markdown parsing, with generic tree-sitter support for additional languages.
  • Runs with embedded FalkorDBLite on Linux x64 and Apple silicon macOS, or an external FalkorDB service on any supported Node.js platform. Apple silicon requires Homebrew libomp and openssl@3 runtime libraries.
  • Explores exact graph totals in Files or Symbols view with most-connected-first windows, Previous/Next paging, append-style loading, in-place neighbor expansion, and a Files-view toggle for unresolved external modules.
  • Exposes analyze, codebase, knowledge, query, and search MCP tools.

Choose how to start

CodeGraph requires Node.js 20 or newer. The npm commands below install the public @agntk/codegraph-mcp package from the registry.

Agent-first with MCP

Add this server configuration to an MCP client:

{
  "mcpServers": {
    "codegraph": {
      "command": "npx",
      "args": ["-y", "@agntk/codegraph-mcp"]
    }
  }
}

In the first conversation, ask the agent to check CodeGraph status:

{"method":"tools/call","params":{"name":"codebase","arguments":{"action":"status"}}}

On a fresh install, codebase status returns configured: false and setupRequired: true. An empty database is a valid first run. Configure one absolute project path, then start a full index:

{"method":"tools/call","params":{"name":"codebase","arguments":{"action":"configure","projectAction":"set","projects":["/absolute/path/to/project"]}}}
{"method":"tools/call","params":{"name":"codebase","arguments":{"action":"reindex","mode":"full","scope":"/absolute/path/to/project"}}}

Configuration saves the project but does not index it. The full reindex parses structure first and then finishes embeddings. With the local provider, codebase status includes model load and indexing state while work is running.

Dashboard-first in a browser

Start the dashboard directly from the package:

npx -y -p @agntk/codegraph-mcp codegraph-dashboard

Open the URL printed by the process. A fresh database opens on the setup flow. Confirm storage and embeddings, choose Browse to select a folder, then select Index project. The page shows model download and indexing progress, finishes remaining embeddings automatically, and reports file, symbol, edge, and embedding counts before opening the graph explorer.

The dashboard and MCP server are separate entry points. They can run at the same time against the same data path.

Platform and storage

PlatformDefault driverPrerequisitesConfiguration
Linux x64Embedded FalkorDBLiteNode.js 20 or newerNo database configuration when the embedded package is available
macOS Apple siliconEmbedded FalkorDBLiteNode.js 20 or newer, brew install libomp openssl@3No database configuration when the libraries and embedded package are available
macOS IntelExternal FalkorDBNode.js 20 or newerSet the external variables below
Windows x64External FalkorDBNode.js 20 or newerSet the external variables below
Linux arm64 and other platformsExternal FalkorDBNode.js 20 or newerSet the external variables below

An explicit CODEGRAPH_DRIVER always wins. Without it, a configured FALKORDB_URL or FALKORDB_HOST selects external FalkorDB. Otherwise CodeGraph selects embedded FalkorDBLite on Linux x64, or on Apple silicon macOS when its native libraries are present, and falls back to external FalkorDB if the embedded package cannot load. All other platforms default to external FalkorDB.

CODEGRAPH_DATA_DIR defaults to ~/.codegraph; the MCP project configuration is stored at ~/.codegraph/mcp-context.json. Embedded database storage separately defaults to <current working directory>/.codegraph/falkordb. If that database path is too long for a Unix socket, CodeGraph relocates it to ~/.codegraph/graphs/<12-hex-digest>. Set CODEGRAPH_DATA_DIR to a writable directory for MCP configuration, and set CODEGRAPH_DB_PATH to a writable directory for embedded database files.

For external FalkorDB, set either a URL:

CODEGRAPH_DRIVER=falkordb
FALKORDB_URL=host:6379

Or set a host and port:

CODEGRAPH_DRIVER=falkordb
FALKORDB_HOST=host
FALKORDB_PORT=6379

One database server runs per data directory; a second CodeGraph process attaches to it.

Embeddings and privacy

ProviderModel and dimensionsConfigurationFirst run
Localnomic-ai/nomic-embed-text-v1.5, 768No key and no provider overrideDefault no-key path. Downloads approximately 132 MiB, measured as 138,011,417 bytes (131.6 MiB), shows progress, then caches the model locally.
Voyagevoyage-code-3, 1024CODEGRAPH_EMBEDDING_PROVIDER=voyage and VOYAGE_API_KEYSends embedding inputs to Voyage.
OpenRouteropenai/text-embedding-3-small, 1536CODEGRAPH_EMBEDDING_PROVIDER=openrouter and OPENROUTER_API_KEYSends embedding inputs to OpenRouter.
NoneNo model, 0CODEGRAPH_EMBEDDING_PROVIDER=noneExplicit structural-only mode. Semantic similarity search is unavailable.

If no provider is set, a configured Voyage key selects Voyage, a configured OpenRouter key selects OpenRouter, and no key selects local. Set CODEGRAPH_EMBEDDING_PROVIDER explicitly when you need to pin the choice.

Provider, model, and dimension are stored with the graph. If any of them changes, CodeGraph blocks graph mutation with this remedy: Run an explicit re-embed migration or a full reindex before using the requested embedding profile.

MCP tools

ToolPurpose
analyzeInspect impact, call hierarchy, cycles, dead-code candidates, hotspots, change coupling, and ownership inferred from indexed git history
searchFind code and project knowledge by name, structure, or meaning
knowledgeStore and recall entities, relationships, facts, and documents
codebaseConfigure projects, index code, inspect status, and read source
queryRun read-only Cypher queries against the graph

Set CODEGRAPH_RAW_TOOLS=true to expose lower-level handlers alongside the five grouped tools.

Configuration

VariablePurpose
CODEGRAPH_DRIVERfalkordblite for embedded storage or falkordb for an external service; defaults by platform as described above
CODEGRAPH_DATA_DIRMCP configuration directory, default ~/.codegraph; must be writable by the CodeGraph process
CODEGRAPH_DB_PATHEmbedded FalkorDBLite data path, default <current working directory>/.codegraph/falkordb; must be writable by the CodeGraph process
FALKORDB_URLExternal FalkorDB host and port
FALKORDB_HOSTExternal FalkorDB host, default localhost
FALKORDB_PORTExternal FalkorDB port, default 6379
FALKORDB_GRAPHGraph name, default codegraph
CODEGRAPH_EMBEDDING_PROVIDERlocal, voyage, openrouter, or none; when unset, resolves Voyage key, then OpenRouter key, then local
VOYAGE_API_KEYVoyage embeddings and optional reranking
OPENROUTER_API_KEYOpenRouter embeddings or LLM features
CEREBRAS_API_KEYOptional LLM-backed knowledge extraction
API_PORTDashboard and REST API port, default 3001; use the printed URL
CODEGRAPH_BROWSE_ROOTSAdditional absolute dashboard Browse roots, separated by commas
CODEGRAPH_RAW_TOOLSSet to the literal value true to expose raw handlers alongside the five grouped MCP tools

Never commit provider keys. Put secrets in the MCP client's protected environment configuration or a local ignored .env file.

Release verification

The canonical package command is:

pnpm pack:npm

It builds and validates one publishable tarball under tmp/release. The complete release gate is:

pnpm release:check

The basic installed-tarball smoke proves the package installs in a clean consumer, both binaries start, all five MCP tools are present, a fresh database is setup-safe, Browse and indexing work, data survives restarts, the dashboard and MCP process share one embedded server, and the exact tarball hash is reported. The release CI runs that installed artifact with embedded storage on Linux x64 and Apple silicon, and checks external FalkorDB guidance on Windows x64. An opt-in local-provider lane proves cold model download progress and a usable 768-dimension vector index.

A clean-consumer local tarball proof verifies that bare npx -y @agntk/codegraph-mcp selects the codegraph-mcp bin and that npx -y -p @agntk/codegraph-mcp codegraph-dashboard selects the dashboard bin. Both forms also resolve and boot from the public npm registry.

Development

pnpm install --frozen-lockfile
pnpm audit:prod
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm docker:db
pnpm test:integration
pnpm test:scripts
pnpm build:mcpb
pnpm release:check

See CONTRIBUTING.md for the pull request workflow and required evidence. FalkorDBLite's Linux x64 and Apple silicon macOS binaries are installed with the workspace dependencies. Apple silicon also requires Homebrew libomp and openssl@3.

Packages

PackageResponsibility
@codegraph/coreIndexing, search pipelines, services, and git synchronization
@codegraph/graphFalkorDB and FalkorDBLite drivers, graph queries, and knowledge operations
@codegraph/plugin-nlpEmbeddings, reranking, entity resolution, and document ingestion
@codegraph/mcp-serverMCP transport and the five public tool groups
@codegraph/cliSource-checkout command-line tools
@agntk/codegraph-mcpPublic npm distribution staging and entry point
@codegraph/mcpbPlatform-local MCPB desktop extension build
@codegraph/apiREST API consumed by the dashboard
@codegraph/dashboardStatic dashboard UI served by the API

The marketing site lives in apps/web, and the reproducible search benchmark lives in benchmarks/cgbench-v1.

License

CodeGraph is available under the MIT License.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for CodeGraph MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/codebase-graph)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools