npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ast-outline-mcp

v1.4.9

Published

MCP server for ast-outline - a tree-sitter-based CLI that provides structural code outlines, digests, symbol extraction, and AST-aware grep

Readme

ast-outline-mcp

An MCP (Model Context Protocol) server for ast-outline — a tree-sitter-based CLI that lets AI coding agents pull exactly what they need from a codebase: structural outlines, module digests, symbol bodies, and AST-aware grep.

Why

LLM coding agents explore codebases by reading files directly. A 1200-line file costs 1200 lines of context just to answer "what methods are in here?" — ast-outline provides the file's shape in 60–100 lines, and this MCP server exposes that functionality to any MCP-compatible client.

Prerequisites

uv tool install ast-outline

Installation

Run via npx (no install needed)

npx ast-outline-mcp

Install globally

npm install -g ast-outline-mcp
ast-outline-mcp

MCP Client Configuration

Add to your MCP client config (e.g., Claude Desktop):

{
  "mcpServers": {
    "ast-outline": {
      "command": "npx",
      "args": ["ast-outline-mcp"]
    }
  }
}

Tools

digest

Get a compact one-page module map of a directory. Each file gets a size label and token estimate. Recommended for initial overview of a codebase.

Parameters:

  • path (string, required) — Directory path to digest

outline

Get a structural outline of one or more files or directories. Returns signatures with line ranges (no bodies).

Parameters:

  • path (string, required) — File or directory path to outline
  • imports (boolean) — Include import/use/using statements
  • noPrivate (boolean) — Exclude private members
  • noFields (boolean) — Exclude fields/properties
  • noDocs (boolean) — Exclude documentation comments
  • noAttrs (boolean) — Exclude attributes/decorators

show

Extract the full source body of one or more symbols from a file.

Parameters:

  • file (string, required) — File path to extract symbols from
  • symbols (string[], required) — Symbol names to extract
  • signature (boolean) — Return header/signature only, no body

grep

AST-aware structural search across files. Matches grouped by enclosing class/function.

Parameters:

  • pattern (string, required) — Search pattern (literal or regex, auto-detected)
  • path (string, required) — File or directory path to search
  • kind (enum: def|call|ref|import) — Narrow results by classification kind
  • wordMatch (boolean) — Match whole words only
  • caseInsensitive (boolean) — Case-insensitive matching
  • filesOnly (boolean) — List matching files only
  • count (boolean) — Show match counts per file
  • maxCount (number) — Maximum number of matches per file

Prompts

explore-codebase

A prompt that guides an LLM to efficiently explore a codebase using ast-outline tools.

Development

npm install
npm test
npm run build

Supported Languages

ast-outline supports 20+ languages including TypeScript, Python, Go, Rust, C#, Java, Kotlin, Ruby, PHP, and more. See the full list.

License

MIT