MCP Gtags Server logo

MCP Gtags Server

Indexed GNU Global lookups for navigating large C and C++ codebases through MCP.

Install MCP Gtags Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-gtags-server": {
      "command": "uvx",
      "args": [
        "mcp-gtags-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

uvx mcp-gtags-server

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The mcp-gtags-server MCP server exposes GNU Global (gtags) code indexes to AI agents through MCP. It provides definitions, references, symbol bodies, caller and callee graphs, reachability paths, and file symbol lists without relying on broad grep scans. Indexes are built automatically on first use and refreshed after edits, making it a fit for large C/C++ trees, including kernel-scale projects. Use it when agents need structured navigation, preprocessor guard context, or call-graph analysis.

Use cases

  • Navigate large Linux kernel source trees
  • Find exact C/C++ symbol definitions
  • Trace callers and callees across a repository
  • Check static reachability between functions
  • Inspect references within a directory

Key features

  • GNU Global indexed symbol lookup
  • Definition and reference navigation
  • Caller, callee, and reachability analysis
  • C/C++ function and macro body extraction
  • Automatic index refresh
  • Preprocessor guard and export metadata

Tools8

What MCP Gtags Server lets your agent do. Expand a tool for its parameters.

Self-reported~428 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · mcp-gtags-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed8Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Gtags Server works

What mcp-gtags-server MCP server does

The mcp-gtags-server MCP server gives MCP clients indexed navigation for C and C++ repositories. It uses GNU Global as the primary index and adds ctags and symbol-usage data for cases where ordinary tagging or parsing is insufficient. Results are intended to identify actual definitions and usage sites instead of returning every textual match in a source tree.

The server is particularly suited to large or difficult codebases, including trees that do not currently compile. Its output can include #ifdef guard stacks, macro-generated definitions, and recovery through EXPORT_SYMBOL* locations. The README reports benchmark results on a full Linux kernel checkout, but those measurements should not be treated as a guarantee for every repository or machine.

How it works

On the first tool request, the server creates or obtains an index for the repository. Later requests refresh it automatically, while update_index provides a synchronous freshness barrier after edits. A full rebuild is available through the tool but is described as an uncommon operation.

Queries operate on indexed symbols rather than scanning all source text. Callers are grouped by their enclosing functions and include call counts. Callees are extracted from function bodies and checked against the index, with in-tree and external calls separated. Reachability uses breadth-first search over the caller graph and can return the shortest static path with source locations. If no path is found, the result identifies the limitation around function pointers.

Setup and configuration

The documented quick-start configuration runs the server with uvx:

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

The mcp-gtags-server MCP server requires uv for this setup. Automatic setup can be disabled with --no-auto-setup or GTAGS_MCP_AUTO_SETUP=0.

The repository also documents a one-line installer that starts a shared HTTP server at http://127.0.0.1:8383/mcp, plus client-specific installation through Claude Code and Codex plugins. The manual configuration and plugin should not be installed together, because that registers duplicate server instances.

Tools and capabilities

  • get_symbol_body returns the source body for a function, struct, or multiline macro.
  • find_definition reports definition locations, metadata, guards, usage counts, hot files, and export status. It can resolve macro families and suggest prefix matches.
  • find_references lists usage sites with guard information. Large result sets can be grouped by file, and path_prefix narrows searches to a directory.
  • find_callers maps references to enclosing functions and deduplicates them with counts.
  • find_callees reports verified outgoing calls, separating in-tree calls with locations from external calls.
  • reachability searches for a shortest static call chain between functions.
  • list_file_symbols shows the symbols defined by a file.
  • update_index refreshes the index synchronously, with an option for a full rebuild.

Limitations and notes

Static call-graph results cannot establish paths that depend on unresolved function-pointer behavior. GNU Global and the supporting resolvers also depend on the available source structure and index data. The documented Linux binary compatibility applies to systems with glibc 2.28 or newer; older hosts may compile GNU Global locally when make and a C compiler are available. The server is MIT-licensed.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Gtags Server

mcp-gtags-server is an MCP server that connects AI agents to GNU Global indexes for C and C++ repositories. Its main tools find definitions, references, symbol bodies, callers, callees, reachable call paths, and file symbols, with automatic indexing and refresh support for source navigation.

Install `uv`, then add a user-level MCP entry that runs `uvx mcp-gtags-server`. The first request installs GNU Global, universal-ctags, and Pygments into user space automatically. The repository also documents a one-line installer and plugin-based installation for some clients.

Yes, mcp-gtags-server works with Cursor through a documented one-click install or a `~/.cursor/mcp.json` entry using `uvx mcp-gtags-server`.

Yes, it can trace static calls with `find_callers`, `find_callees`, and `reachability`. Results can deduplicate callers, verify indexed callees, and return the shortest path with file and line locations. Function-pointer behavior remains a caveat for static reachability.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Gtags Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-gtags-server?style=directory)](https://allmcps.com/mcp/mcp-gtags-server)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-gtags-server"><img src="https://allmcps.com/api/badge/mcp-gtags-server?style=directory" alt="MCP Gtags Server on AllMCPs" /></a>