glyph
About
🔮 glyph – mcp server to map your codebase with symbol outlines
Details
- Author
- benmyles
- Downloads
- 810
- Categories
- Other, AI
Jump to
- Declarative query-based symbol extraction using Tree-sitter
- Glob-based file discovery with familiar patterns
- Language-agnostic architecture, easy to extend
- Configurable detail levels (minimal, standard, full)
- Multi-file support for unified project views
- MCP-native for seamless AI workflow integration
- High performance with optimized Tree-sitter queries
Install glyph via Go, then run it as an MCP server with glyph mcp or as a CLI tool with glyph cli followed by an absolute glob pattern. Control the detail level using the -detail flag (minimal, standard, or full). Integration with Claude Code and Cursor is supported by adding glyph as an MCP server.
glyph
A Model Context Protocol (MCP) server that extracts symbol outlines from your codebase using Tree-sitter's declarative query language. Gives LLM coding agents the context they need with clean, efficient symbol extraction. Can also be used as a standalone CLI tool.
Installation
macOS
Install Go:
$ brew install go
Install the latest version of glyph:
$ GOBIN=/usr/local/bin go install "github.com/benmyles/glyph@latest"
What it does
glyph takes a file path glob, recursively discovers matching code files, and parses them using Tree-sitter's powerful query language to generate accurate symbol outlines. You control the level of detail—from high-level structure to complete function signatures with visibility modifiers.
Why glyph?
LLM coding agents work best when they understand your code's structure. glyph bridges that gap by providing clean, multi-file symbol maps that serve as efficient context without overwhelming token limits.
Key Features
- Declarative Query-Based Extraction - Uses Tree-sitter's query language for precise, maintainable symbol extraction
- Glob-based file discovery - Point it at your code with familiar patterns
- Language-agnostic architecture - Easy to add new languages with just query patterns
- Configurable detail levels - Choose how much context you need
- Multi-file support - Get a unified view across your entire project
- MCP-native - Built for seamless integration with AI coding workflows
- High performance - Optimized Tree-sitter queries for fast extraction
Supported Languages
- Go - Functions, methods, types, structs, interfaces, constants, variables
- Java - Classes, interfaces, methods, constructors, fields, enums, records, annotations
- JavaScript/TypeScript - Functions, classes, methods, arrow functions, variables, interfaces, type aliases
- Python - Functions, classes, decorated definitions, assignments
- Easy to extend - Adding new languages requires only ~20 lines of query patterns
Architecture
glyph uses a modern, declarative approach:
- Tree-sitter queries replace complex AST traversal logic
- Language-specific query patterns define what symbols to extract
- Unified extraction engine works across all languages
- Modular design with separate concerns for queries, extraction, formatting, and file handling
Symbol Types
glyph uses concise symbol type names to minimize token usage:
- func - Functions and function-like declarations
- method - Class/struct methods
- class - Classes
- interface - Interfaces
- struct - Structs (Go)
- type - Type declarations (Go)
- const - Constants
- var - Variables
- field - Class/struct fields
- constructor - Constructors
- enum - Enumerations
- record - Records (Java)
- annotation - Annotations (Java)
- property - Properties (TypeScript)
Usage
Integration with AI Coding Assistants
Claude Code
Add glyph to Claude Code using the MCP command:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




