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

MCP Gtags Server

作者:harshithsunku版本 2.0.0i★ –i在你的电脑上运行
注册名称io.github.harshithsunku/mcp-gtags-server

安装

概览

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

Indexed C/C++ code navigation for AI agents — GNU Global (gtags) lookups over MCP, not grep scans.

PopNx MCP 的三大支柱

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

它能帮你做什么

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

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 开发者工具

安装

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

安装之前

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

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

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

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

{
  "mcpServers": {
    "gtags": {
      "command": "uvx",
      "args": [
        "mcp-gtags-server"
      ],
      "env": {
        "GTAGS_MCP_ROOT": "your-value",
        "GTAGS_MCP_AUTO_SETUP": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add gtags --env GTAGS_MCP_ROOT=your-value --env GTAGS_MCP_AUTO_SETUP=your-value -- uvx mcp-gtags-server

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

在 Cursor 中打开

或者自己复制设置

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

{
  "mcpServers": {
    "gtags": {
      "command": "uvx",
      "args": [
        "mcp-gtags-server"
      ],
      "env": {
        "GTAGS_MCP_ROOT": "your-value",
        "GTAGS_MCP_AUTO_SETUP": "your-value"
      }
    }
  }
}

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

在 VS Code 中打开

或者自己复制设置

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

{
  "servers": {
    "gtags": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-gtags-server"
      ],
      "env": {
        "GTAGS_MCP_ROOT": "your-value",
        "GTAGS_MCP_AUTO_SETUP": "your-value"
      }
    }
  }
}

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

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

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

需要你填写的值

  • GTAGS_MCP_ROOT env
    Optional pinned project root. Usually unnecessary: the server uses the client's workspace roots or auto-detects the repo from its working directory.
  • GTAGS_MCP_AUTO_SETUP env
    Set to 0 to disable the automatic user-space install of the gtags/ctags toolchain on first use.

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

它能做什么

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

基础检查i

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

  • ✓ 通过

    作者与仓库一致

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

  • … 尚未检查

    仍在维护

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

  • … 尚未检查

    有许可证

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

  • – 不适用

    端点有响应

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

  • – 不适用

    使用 OAuth 登录

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

  • … 尚未检查

    工具描述中没有隐藏指令

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

与“开发者工具”中的其他服务器比较i

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

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

常见问题

MCP Gtags Server 安全吗?

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

它需要哪些密钥或代码?

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

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

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

它还在维护吗?

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

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:GitHub, Desktop Commander, Cloudflare MCP

替代选择

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

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

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

电脑或云端★ 34,245MIT4天前更新
安装

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

在你的电脑上运行★ 10,225MIT16天前更新
安装

Cloudflare MCP

作者:cloudflare

Cloudflare MCP servers

在云端运行★ 4,446Apache-2.014个月前更新
安装

作者的 README

打开 README

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

mcp-gtags-server

Stop letting your AI agent grep. Give it an index.

mcp-name: io.github.harshithsunku/mcp-gtags-server

# If you don't have uv yet (one-time, no sudo):

curl -LsSf https://astral.sh/uv/install.sh | sh

{ "mcpServers": { "gtags": { "command": "uvx", "args": ["mcp-gtags-server"] } } }

*One user-level config entry, no sudo, no pre-installed anything — the whole toolchain installs itself into user space on first use, and every repo you open is served automatically.*

📖 [Full documentation](https://harshithsunku.github.io/mcp-gtags-server/) — install for every client, the tool reference, output format, kernel features, configuration and troubleshooting.

Every AI coding agent — Claude Code, Cursor, Codex, you name it — answers *"where is this function defined?"* the same way: grep the entire tree. On a million-line C/C++ codebase that's a full scan per question, and the output is a firehose: every comment, string literal, and unrelated match, dumped straight into the model's context window.

mcp-gtags-server replaces those scans with indexed lookups powered by GNU Global (gtags) — the same tags engine kernel and systems developers have trusted for decades — exposed to agents over the Model Context Protocol. Built for the codebases LSP-based tools can't handle: kernel-scale C/C++, trees that don't currently compile, machines you can't sudo on.

  • ~100× faster per query — milliseconds instead of seconds, at any codebase size
  • Radically less noise — the definition, not 7,873 lines of matches
  • Speaks kernel — #ifdef guard stacks with .config filtering, macro-generated symbols (sys_read → its SYSCALL_DEFINE3 site) that no other tagging tool resolves, and definitions the parser misses recovered from their EXPORT_SYMBOL site via ctags
  • Zero index management — first query builds the index, every query auto-refreshes it
  • Correctness measured in CI — a 64-case golden eval covering all 8 tools against a pinned kernel: 100% recall, 100% precision@1 (docs/capability.md)
  • Works everywhere MCP does — Claude Code, Claude Desktop, Cursor, any MCP client

The numbers (real Linux kernel, not a toy)

Measured on a full Linux kernel checkout — 65,163 C/C++ files, 37.1 million lines — warm page cache:

Question an agent asksgrep -rngtags (this server)Context consumed
Where is tcp_v4_rcv defined?1.40 s0.01 s8 lines → 1 line
Where is kmalloc defined?1.62 s0.01 s7,873 lines → 5 lines
Who references kmalloc?1.62 s0.10 s7,873 noisy lines → 2,744 real sites (or a ranked per-file summary)
Show me tcp_v4_rcv's implementation*read a 3,500-line file*`get_symbol_body`exactly the 271-line function
Who calls ext4_mark_inode_dirty?245 raw match lines`find_callers`62 deduped caller functions, with counts
Where is sys_read *really* defined?*no answer — the name is macro-generated*0.03 sfs/read_write.c SYSCALL_DEFINE3(read, ...), flagged resolved_via
Where is mutex_lock defined?24,774 noisy match lines0.2 skernel/locking/mutex.c:314 — recovered via EXPORT_SYMBOL + ctags after gtags' parser derails on it
Does ksys_read ever reach rw_verify_area?*N rounds of grep + reading*0.6 sthe shortest call chain, with every call site's file:line
Every mutex_lock call in fs/ext4?22,905 tree-wide match lines0.01 sfind_references(path_prefix="fs/ext4"): the 18 real sites

One-time index build: 66 s for the whole kernel. Incremental refresh after edits: well under a second. Reproduce it yourself with scripts/benchmark.sh:

./scripts/benchmark.sh /path/to/linux tcp_v4_rcv kmalloc ext4_readdir

The speed is nice. The real win is precision: an agent that gets 5 exact lines instead of 7,873 noisy ones keeps its context window for actual reasoning.

And the answers are *measured*, not assumed: CI runs a 64-case golden eval against pinned kernel v6.16 on every push — currently 100% recall, 100% precision@1 across definitions, macro resolution, export recovery, references, callers, callees, definition bodies, #ifdef guards, and reachability, covering all 8 tools. The full methodology, numbers, and honest limitations live in docs/capability.md.

Quick start (60 seconds)

Option A — one config entry (recommended)

Add the server once, at user level, and you're done — no installer, no pre-installed gtags, no per-repo setup. The only prerequisite is uv (or use Option B, which installs it for you).

# Claude Code (once per device, all repos):

claude mcp add --scope user gtags -- uvx mcp-gtags-server

// Cursor (~/.cursor/mcp.json), or any MCP client's global settings:

{ "mcpServers": { "gtags": { "command": "uvx", "args": ["mcp-gtags-server"] } } }

Or click the Cursor one-click install badge at the top of this page.

On the very first tool call the server bootstraps everything else by itself: GNU Global (prebuilt user-space binaries — no compiler, no sudo), universal-ctags, and Pygments, all into ~/.gtags-mcp. While that one-time install runs (a few seconds on most platforms), tool calls return a *"toolchain is being installed — retry shortly"* status instead of failing. Opt out with --no-auto-setup or GTAGS_MCP_AUTO_SETUP=0.

The prebuilt Linux binaries run on any distro with glibc ≥ 2.28 (RHEL/Rocky 8+, Ubuntu 18.10+, Debian 10+). On older hosts — or if a downloaded binary fails its post-install execution check — setup automatically compiles GNU Global from source instead, which only needs make and a C compiler.

Option B — install the plugin (server + skill + slash commands)

The plugin bundles this server, a "C/C++ code navigation" skill that tells the agent which tool answers which question, and two slash commands (/gtags:impact, /gtags:explain). Installing it registers the MCP server for you — there is no config file to edit.

ClientInstall
Claude Code/plugin marketplace add harshithsunku/mcp-gtags-server then /plugin install mcp-gtags-server@mcp-gtags-server
Codexcodex plugin marketplace add harshithsunku/mcp-gtags-server, then install it from the Plugins Directory in the ChatGPT desktop app
CursorLoads Agent Plugins 1.0.0, but installs only from the Cursor Marketplace or a team marketplace — until this plugin is listed there, use the one-click badge or Option A

Install one way, not both. A plugin *and* a manual entry run two servers,

and the agent sees every tool twice. Switching to the plugin? Remove the

manual entry first (claude mcp remove gtags).

Option C — one-line installer (shared background server)

One command. No sudo. Works everywhere — restricted corporate machines, containers, build servers:

curl -fsSL https://raw.githubusercontent.com/harshithsunku/mcp-gtags-server/main/scripts/install.sh | bash

Everything lands in your home directory — the server (via uv), GNU Global, universal-ctags, and Pygments (in ~/.gtags-mcp). When it finishes, a shared background HTTP server is running that every client and IDE window on the machine can point at (http://127.0.0.1:8383/mcp), and the exact client configuration is printed to your console.

Re-run the same command any time:

  • Up to date? → *"Already installed and up to date — nothing to install"*, and the config is printed again.
  • New release on GitHub/PyPI? → the package updates, an outdated gtags toolchain is wiped and reinstalled automatically, and the background server restarts on the new version.
Slash commands (MCP prompts)

Available with any install, in clients that support MCP prompts (Claude Code, Cursor). They cost no tool-schema context:

CommandWhat it runs
/gtags:impact [git_ref]git diff → the changed functions → find_callers on each → callers ranked by risk
/gtags:explain definition (+ #ifdef variants) → body → callers → a short explanation
One config, many repos

However you install it, one user-level entry serves every repo you open — 20 repos need zero extra installs and zero extra config. Each tool call resolves its project root down this ladder:

  1. project_root argument on the tool call (agents pass this to target any tree)
  2. --root flag / GTAGS_MCP_ROOT env var
  3. root in a config file *(note: pinning a root here defeats multi-repo)*
  4. The client's workspace roots (MCP roots protocol) — IDEs that advertise their open folders get the right repo automatically, even on the shared HTTP server; with several folders open, agents are asked to pass project_root. Roots exist only for clients on protocol revisions up to 2025-11-25: the 2026-07-28 revision deprecated them, so those clients skip this step (stdio servers still resolve through step 5; on the shared HTTP server, agents pass project_root)
  5. Walk up from the server's working directory to the nearest .git/GTAGS — this is why stdio servers spawned by Claude Code/Cursor inside a repo just work

Step 5 can be switched off with --no-cwd-fallback / GTAGS_MCP_CWD_FALLBACK=0 (the plugin sets it): the tools then ask for project_root instead of indexing whatever directory the server happens to run in. Plugin clients launch the server from the plugin's own folder, which is never your project.

That's it. No indexing step, no configuration. Ask your agent *"who calls tcp_v4_rcv?"* — the first query in any repo builds that repo's index automatically, and every query after that is answered in milliseconds. Run mcp-gtags-server doctor any time to see what the server detects, or mcp-gtags-server config to re-print the client configuration.

Background server details (network access, port, lifecycle)

The installer runs mcp-gtags-server --transport http --host 127.0.0.1 --port 8383 in the background (pid: ~/.gtags-mcp/server.pid, log: ~/.gtags-mcp/server.log). Environment overrides for the installer:

VariableDefaultMeaning
GTAGS_MCP_PORT8383HTTP port
GTAGS_MCP_HOST127.0.0.1Bind address — set 0.0.0.0 to reach the server from other devices at http:// :8383/mcp
GTAGS_MCP_NO_SERVERunset1 = don't start a background server

Security note: the HTTP endpoint is unauthe

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

问 PopNx