原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Codemesh

作者:pyalwin版本 0.1.2i★ –i在你的电脑上运行
注册名称io.github.pyalwin/codemesh

安装

概览

作者提供的说明(英文原文)

Intelligent code knowledge graph for AI coding agents — 71% cheaper, 72% faster

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: CODEMESH_PROJECT_ROOT

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "codemesh": {
      "command": "npx",
      "args": [
        "-y",
        "@pyalwin/codemesh"
      ],
      "env": {
        "CODEMESH_PROJECT_ROOT": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add codemesh --env CODEMESH_PROJECT_ROOT=your-value -- npx -y @pyalwin/codemesh

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "codemesh": {
      "command": "npx",
      "args": [
        "-y",
        "@pyalwin/codemesh"
      ],
      "env": {
        "CODEMESH_PROJECT_ROOT": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "codemesh": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@pyalwin/codemesh"
      ],
      "env": {
        "CODEMESH_PROJECT_ROOT": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • CODEMESH_PROJECT_ROOT env
    Absolute path to the local codebase to index

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 pyalwin 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 7220 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 7220 个服务器的 10% 更新
  • 基础检查结果等于或优于此分类中其他 7220 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Codemesh 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.2)于7个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Context7, Codebase Memory, Exa

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT3天前更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT20天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT44天前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Codemesh

Intelligent code knowledge graph for AI coding agents

71% cheaper, 72% faster, 82% fewer tool calls vs baseline Grep+Read\ on 6 real-world repos (Sonnet 4.6) — from a single codemesh index.

Benchmarks · Quick Start · Integrations · Write-Back · How It Works · API Reference · Full Results


The Problem

AI coding agents waste 40-80% of their tokens on discovery — grepping through files, reading irrelevant code, and rebuilding context they've already seen in previous sessions.

On a 600-file codebase, a typical exploration task involves 10+ file reads before the agent even knows what's relevant.

Before:  Agent → Grep → 50 matches → Read 10 files → Understand → Work

After: Agent → codemesh_map → expand chosen branches → read exact symbols → Work

Codemesh is an MCP server that gives agents a persistent, queryable knowledge graph. The graph gets smarter over time: agents write back what they learn, so the next session starts informed.


Benchmarks

Benchmarked on 6 real-world codebases (Alamofire, Excalidraw, VS Code, Swift Compiler, pydantic-validators, pydantic-basemodel) with Claude Sonnet 4.6, compared alongside baseline and graph-based approaches for context.

Full methodology, per-repo breakdowns, and pairwise comparisons: docs/benchmark-results.md | Early pydantic evals

These historical runs used the earlier answer-first workflow. The map-first navigation workflow described below is evaluated in an exploratory Pydantic pilot; the figures in this section should not be read as its measured performance.

Cost
ModeAlamofireExcalidrawVS CodeSwift Compiler[^swift]pydantic-validatorspydantic-basemodelAvg
Baseline$0.54$0.89$0.21$0.83$1.32$0.78$0.76
Codemesh MCP$0.25$0.21$0.16$0.23$0.33$0.13$0.22
Codemesh CLI$0.67$0.51$0.16$0.83$1.00$0.18$0.56
Codegraph$0.37$0.56$0.57$0.74$0.29$0.19$0.45
Time
ModeAlamofireExcalidrawVS CodeSwift[^swift]pydantic-vpydantic-bAvg
Baseline180s191s87s199s352s232s207s
Codemesh MCP78s45s35s87s72s32s58s
Codemesh CLI226s177s62s227s235s51s163s
Codegraph134s180s192s199s75s60s140s
Tool calls (agent turns)
ModeAlamofireExcalidrawVS CodeSwift[^swift]pydantic-vpydantic-bAvg
Baseline31481229846545
Codemesh MCP953141438
Codemesh CLI3032125664934
Codegraph31354444201231
Quality (1–10, LLM-as-judge)
ModeAlamofire[^alamo]ExcalidrawVS CodeSwift Compilerpydantic-validatorspydantic-basemodelAvg
Baselinen/a987297.0
Codemesh MCP997877.87.9
Codemesh CLI977918.46.9
Codegraph898.78898.4
Cost savings: Codemesh MCP vs Baseline
RepoBaselineCodemesh MCPCost savedTime saved
Alamofire$0.54$0.25−54%−57% (180s → 78s)
Excalidraw$0.89$0.21−76%−76% (191s → 45s)
VS Code$0.21$0.16−24%−60% (87s → 35s)
Swift Compiler[^swift]$0.83$0.23−72%−56% (199s → 87s)
pydantic-validators$1.32$0.33−75%−79% (352s → 72s)
pydantic-basemodel$0.78$0.13−83%−86% (232s → 32s)
Average$0.76$0.22−71%−72%

[!NOTE]

Codemesh MCP achieves the lowest cost and fastest time of any mode tested — 71% cheaper and 72% faster than baseline on average across 6 repos, using 82% fewer tool calls (8 vs 45). Quality is comparable to baseline (7.9 vs 7.0); Codegraph edges Codemesh on quality (8.4) but at roughly double the cost ($0.45 vs $0.22). Every repo shows cost and time savings — including the comprehension-heavy queries (Excalidraw, pydantic-basemodel) that regressed in prior builds of codemesh.


Quick Start

1. Install
npm install -g @pyalwin/codemesh

Or run directly without installing:

npx -y @pyalwin/codemesh --help

Build from source

git clone https://github.com/pyalwin/codemesh.git

cd codemesh npm install && npm run build npm link

Verify the install: codemesh --version should print the package version.

2. Index your project
cd /your/project

codemesh index

The default index and retrieval path uses one SQLite database in .codemesh/. It does not generate embeddings or require a vector database. Existing vector artifacts from older runs are left untouched but are not used by this path.

Indexed 656 files

Symbols found: 16733 Edges created: 33266 Duration: 10009ms PageRank: 13843 nodes scored

3. Choose your mode

Codemesh offers two ways to integrate with AI agents:

Option A: MCP Server (structured tool calls)

Add to your Claude Code MCP config (~/.claude/mcp-servers.json or project .mcp.json):

{

"mcpServers": { "codemesh": { "command": "npx", "args": ["-y", "@pyalwin/codemesh"], "env": { "CODEMESH_PROJECT_ROOT": "/path/to/your/project" } } } }

The agent gets native MCP tools:

  • codemesh_map — browse one level of the indexed repository or follow a link
  • codemesh_source — read a revision-checked source view by symbol ID; ifHash avoids repeat delivery
  • codemesh_inspect — inspect an exact symbol and its direct calls with bounded, exact source blocks
  • codemesh_hydrate — verify saved symbol references and reopen exact source after a handoff
  • codemesh_answer — optional ranked context assembly
  • codemesh_explore — search, context (multi-target), impact
  • codemesh_trace — follow call chains
  • codemesh_enrich / codemesh_workflow — write back
  • codemesh_recall — retrieve notes and workflows with freshness status
  • codemesh_status — health check

Best for: Opus, structured workflows, enrichment/write-back

Option B: CLI Mode (via Bash — zero MCP overhead)

No MCP config needed. The agent calls codemesh directly via Bash:

export CODEMESH_PROJECT_ROOT=/path/to/your/project

Navigate one level at a time, then read a selected symbol:

codemesh explore map codemesh explore map --node 'dir:src' codemesh explore map --node 'file:src/server.ts' codemesh explore source 'symbol:src/server.ts:createServer' codemesh explore source 'symbol:src/server.ts:createServer' --mode preview codemesh explore inspect 'symbol:src/server.ts:createServer' --depth 1 --max-symbols 4 --compact codemesh explore hydrate --references '[{"id":"symbol:src/server.ts:createServer","bodyHash":"HASH"}]' --compact

Other exploration commands:

codemesh explore search "request flow" codemesh explore context Source/Core/Session.swift Source/Core/Request.swift codemesh explore trace Session.request --depth 5 codemesh explore recall --path src/server.ts codemesh remember --path src/server.ts --summary "Server tool registration" --session my-task

Exploration and write commands return JSON to stdout. No MCP server process is required.

Best for: Sonnet/Haiku, speed-sensitive workflows, simpler setup

Which mode should I use?
MCP ServerCLI Mode
SetupMCP config fileJust export CODEMESH_PROJECT_ROOT
InvocationPersistent MCP processCLI subprocess
EnrichmentNative codemesh_enrich toolcodemesh remember ...
RetrievalShared SQLite-backed handlersSame handlers and JSON data
RecommendedHosts with reliable MCP tool useDeterministic shell workflows
4. Use it

The agent can choose a path through the persistent graph before reading code:

You: "Find how pydantic handles validation"

Agent calls: codemesh_map({}) gets: immediate repository directories and files, each with an ID

Agent calls: codemesh_map({ node: "dir:pydantic" }) gets: immediate files and subdirectories

Agent calls: codemesh_map({ node: "file:pydantic/main.py" }) gets: top-level symbols, including BaseModel

Agent calls: codemesh_map({ node: "symbol:pydantic/main.py:BaseModel" }) gets: methods, including model_validate

Agent calls: codemesh_source({ id: "symbol:pydantic/main.py:BaseModel.model_validate" }) reads: only the selected symbol's source

Agent calls: codemesh_enrich({ path: "pydantic/functional_validators.py", summary: "Primary V2 validator API..." }) saves: summary for next session


Client Integrations

Codemesh speaks the Model Context Protocol, so any MCP-compatible client can use it. Paste one of the snippets below, restart the client, and the codemesh_* tools show up in the agent's toolbox.

Claude Code (CLI)

Add to ~/.claude/mcp-servers.json (user-wide) or .mcp.json (project-local):

{

"mcpServers": { "codemesh": { "command": "npx", "args": ["-y", "@pyalwin/codemesh"], "env": { "CODEMESH_PROJECT_ROOT": "/absolute/path/to/your/project" } } } }

Claude Desktop (macOS / Windows app)

Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{

"mcpServers": { "codemesh": { "command": "npx", "args": ["-y", "@pyalwin/codemesh"], "env": { "CODEMESH_PROJECT_ROOT": "/absolute/path/to/your/project" } } } }

Restart Claude Desktop. Codemesh's tools will appear in the tool picker (hammer icon).

Cursor — stop the agent from wandering your codebase

Cursor reads .cursor/mcp.json per project (or ~/.cursor/mcp.json for all projects):

{

"mcpServers": { "codemesh": { "command": "npx", "args": ["-y", "@pyalwin/codemesh"], "env": { "CODEMESH_PROJECT_ROOT": "${workspaceFolder}" } } } }

Open Settings → MCP

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx