Glyph MCP server

Extracts code symbols from multiple programming languages using tree-sitter parsing to generate structured outlines with functions, classes, variables, and hierarchical relationships at configurable detail levels.
Back to servers
Setup instructions
Provider
Ben Myles
Release date
May 30, 2025
Language
JavaScript
Stats
4 stars

The MCP (Model Context Protocol) server extracts symbol outlines from your codebase using Tree-sitter's query language, providing clean, efficient context for LLM coding agents. It supports multiple programming languages and can be used either as an MCP server or 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"

Usage

MCP Server Mode

Run glyph as an MCP server for integration with LLM coding agents:

glyph mcp

CLI Mode

Extract symbols directly from the command line:

glyph cli '/path/to/project/*.go'

With detail level option:

glyph cli -detail=minimal '/path/to/project/**/*.js'

Available options:

  • -detail: Level of detail (minimal, standard, or full). Default is standard.

Note: All file patterns must be absolute paths.

Detail Levels

Minimal

Shows just symbol names and types with line numbers:

- func: main (line 15)
- struct: Server (line 5)
- method: Start (line 10)

Standard (default)

Shows signatures and declarations:

- func: func main()
- struct: type Server struct
- method: func (s *Server) Start() error

Full

Shows complete symbol definitions with code blocks:

- func (lines 15-20):

func main() { server := &Server{} server.Start() }

Integration with AI Coding Assistants

Claude Code

Add glyph to Claude Code using the MCP command:

# Add glyph as a local MCP server
claude mcp add glyph /usr/local/bin/glyph mcp

Verify the installation:

# List all configured servers
claude mcp list

# Check glyph server details
claude mcp get glyph

You can check the server status within Claude Code using the /mcp command.

Cursor

Add glyph to your Cursor MCP configuration:

  1. Open Cursor settings (Cmd/Ctrl + ,)
  2. Search for "MCP" or navigate to Extensions → MCP
  3. Add glyph to your MCP servers:
{
  "mcpServers": {
    "glyph": {
      "command": "/usr/local/bin/glyph",
      "args": ["mcp"]
    }
  }
}

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

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "glyph" '{"command":"/usr/local/bin/glyph","args":["mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "glyph": {
            "command": "/usr/local/bin/glyph",
            "args": [
                "mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

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

2. Add this to your configuration file:

{
    "mcpServers": {
        "glyph": {
            "command": "/usr/local/bin/glyph",
            "args": [
                "mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later