📡 MCP Radar

oguzyl11/ast-pack

Fold your codebase into an LLM token budget, unfold symbols on demand. Fast Rust CLI & MCP server for Claude Code, Cursor, and Codex.

⭐ 9 stars
⑂ 0 forks
Rust
momentum ▲ 18.0
created 2026-11-19
on radar since 2026-11-23
star trend 7 → 9 since 2026-11-23
astclaude-codeclicontext-windowcursorllmmcpmodel-context-protocolrusttokenizertree-sitter
View on GitHub ↗

About ast-pack

ast-pack is a Rust CLI and MCP server. It packs a repository into a hard token budget. Anything it leaves out keeps a stable fold id, and an agent can ask for that body later with unfold. Nothing is deleted. It is only deferred.

The Homebrew formula in homebrew/ast-pack.rb builds the main branch (brew install --HEAD). The npm package in npm/ runs a local ast-pack binary, or the path in ASTPACKBIN.

--focus that does not fit in the budget is an error. A directory prefix matches that tree (--focus src/auth matches src/auth.rs and src/auth/token.rs).

setup registers the MCP server with Cursor, Claude Code, Codex, and Gemini CLI. It copies each file it edits aside once. setup --remove puts those files back.

Level What you get --- --- L0 Full source L1 Signature, doc comment, and the full type (struct fields, interface members, enums, aliases) L2 Signature L3 Name L4 Omitted. The file stays in the tree

Fold ids are . A second overload in the same file is ~2, then ~3, in source order. If the file changed after the fold was written, unfold returns the current body and says so on stderr.

ast-pack mcp speaks JSON-RPC on stdin/stdout. It accepts a bare JSON line or a Content-Length frame.

Tool Input Output --- --- --- pack path, budget, optional focus, diff, task, format Packed context, token count, fold ids unfold ids (or one id), optional path Bodies with line numbers outline path Symbols and the token cost of each full body

From the project README.

Maintaining this server?

Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:

[![On MCP Radar](https://mcp.liqiwa.com/badge.svg)](https://mcp.liqiwa.com/s/oguzyl11--ast-pack.html)

Related MCP servers

ParsaVictor/code-context-engine

Local-first MCP context engine for AI coding agents — cuts token cost ~90% via a per-project code graph + code folding. Works with Cursor, Claude Code, Codex & any MCP client. Web + ML/PyTorch codebas

⭐ 4Rust
00200200/usagetrim

Keep the signal. Cut the noise. Local CLI + MCP — fold verbose tool output for Claude Code, Codex, Cursor & Desktop.

⭐ 11Python
erayerturk/surgical-context-mcp

🧠 Save 70–95% tokens in Claude Code, Cursor, Windsurf & Cline. Local Tree-sitter code graph MCP server: surgical edit context instead of full-file reads, refactor safety checks, and a hook that blocks

⭐ 4Python
Graphicle-AI/graphicle

Code graph and memory for your coding agents, in one Rust program. For Claude Code, Codex, Cursor and any MCP client.

⭐ 325Rust
sumit007-ui/Antigravity-Engineering-Kit-AEK-

Rust-first, cross-platform engineering toolkit for AI coding agents: global rules, specialized skills, MCP integration, multi-language validation, and universal agent compatibility.

⭐ 7Rust
ronitgupta138/Agent-MemGC

⚡ High-performance linter, cache-layout optimizer, and garbage collector for AI agent instruction files (AGENTS.md, CLAUDE.md, .cursorrules) in Rust.

⭐ 4Rust

📬 Get the weekly radar in your inbox

The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.