Scalable CTags

by Unknown

Not rated
Website

About

CTags MCP Server with autodiscovery, designed for large projects

Details

Author
Unknown
Categories
Developer Tools

MCP server to allow for code navigation using a tags file. Aims to be able to handle largs tags files with minimal overhead.

Lars Hollenbachdb4e896232fix(server): register watcher with absolute path on manual load...

load_tags_file called o.watcher.Add(path) with the user-supplied path, which can be relative. fsnotify reports events for that file under a different key (the path the kernel gives back), so a relative-path load could silently drop watcher events.

Use the absolute path returned by ParseTagsFile (pf.Path), which the index and discovery layer already canonicalise to. Add tests covering both plain and non-canonical (./tags) relative inputs.

AI-Assisted: written with opencode and MiniMax-M3

A memory-mapped ctags symbol lookup server that exposes an MCP (Model Context Protocol) interface for IDE agents and LLM tooling. Designed to handle multiple and large ctags files across several subprojects.

- Multi-file support: Load and search across multiple tags files simultaneously
- Automatic Refresh: Watches loaded files, refreshes automatically
- Extended fields: Extracts
kind,language, andfilePathfrom ctags v2 extended format

Requires Go 1.26+ and a Nix environment (or standard Go toolchain).


# With Nix (recommended) nix develop --command go build -o ctags-mcp ./cmd/ctags-mcp # Without Nix go build -o ctags-mcp ./cmd/ctags-mcp

Generate a tags file for your project before running the server:

The-nflag (--excmd=number) is required — it instructs ctags to store line numbers instead of regex patterns as search commands. Without it, the server returnsline: 0for all symbol lookups.

The server communicates via stdio (JSON-RPC).

On startup, the server automatically discoverstagsandtags.infiles from the current working directory (up to 8 levels deep) and parses them in a background goroutine pool — the MCP handshake answers immediately, no matter how large the tags files are. Lookup tools (lookup_symbol,get_symbol_info) block until the initial load completes;list_tags_filesanswers right away and reports per-filestatus(loading/ready) plus a top-levelloadingCompleteflag. Hidden directories (dot-prefixed) are always skipped. Use--auto-discover=falseto disable auto-discovery entirely.

By default additional directories matching the flag--skip-dirs(comma-separated dir names) are excluded (e.g.vendor,node_modules).

Add the server to youropencode.jsonunder themcpkey:


{ "$schema": "https://opencode.ai/config.json", "mcp": { "ctags": { "type": "local", "command":
["./ctags-mcp"], "enabled": true } } }

After editing
opencode.json, quit and restart opencode for changes to take effect.

Theload_tags_fileresponse includes apreloadedfield set totruewhen the file was auto-discovered at startup.

Once the server is configured in opencode, you can ask natural language questions and the agent will use the tools:


"Find all references to AddTagsFile in the codebase" "Show me detailed info about the EntryRef struct" "What tags files are currently loaded?" "Look up the Lookup function, filtering by fileID 0"

The agent will call
list_tags_filesto check what is already loaded, then uselookup_symbolorget_symbol_infoto answer. For projects without a tags file on disk, it will callload_tags_filefirst.


internal/ parser/ Streaming line-by-line ctags parser indexer/ In-memory index (map[string][]Entry); lock-free single-pass parsing (ParseTagsFile) with deferred merge (InstallParsed) server/ MCP protocol layer (Server) + index lifecycle (IndexOrchestrator: discovery, background load, watch/rebuild) cmd/ctags-mcp/ Entry point (stdio transport)
``

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

ALAPI MCP Tools,Call hundreds of API interfaces via MCP

AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.