← all repositories
yc-duan/fastctx

Stop letting AI agents burn context on shell syntax

FastCtx gives AI coding agents structured repository tools so they spend tokens understanding code instead of constructing Bash commands.

1.1k stars Rust Coding AssistantsAgents
fastctx
Velocity · 7d
+13
★ / day
collecting data…
star history

What it does

FastCtx is a local Rust runtime that exposes repository operations—file reads, content search, glob, replace, and Bash execution—as structured MCP tools. Instead of having models assemble, escape, and parse ad-hoc shell commands, the agent passes parameters like paths and patterns to a persistent Rust process that handles traversal, encoding, and pagination. The goal is fewer tool calls and less context wasted on command mechanics.

The interesting bit

The architecture is deliberately split: each fastctx serve process is a thin stdio proxy, while a shared per-user control center manages search execution, resource limits, and background jobs. This lets multiple agent sessions share a single search pool and job history without stepping on each other’s working directories. If the control center fails to start, the proxy quietly falls back to a standalone server rather than leaving the agent stranded.

Key highlights

  • Nine built-in MCP tools covering file inspection, grep, glob, batch replace, and foreground/background Bash execution
  • Persistent control center shared across proxies for the same user, with per-session isolation for working directories and cancellation state
  • Background job support: start, stream output, list, and kill full process trees across sessions
  • First-class setup flows for ChatGPT App and Codex CLI; any MCP client can register fastctx serve directly
  • Shipped through npm as a wrapped Rust binary, with atomic GitHub Release updates and offline-aware caching

Caveats

  • Bash execution tools are disabled by default and must be explicitly enabled in the control terminal
  • Fresh releases can trigger 404s on npm mirror registries until they sync from the official registry
  • Large batch replacements can hit out-of-memory errors if the file size limit is configured too aggressively

Verdict

Worth a look if your AI agent is drowning in shell syntax and context overhead during repository work. Probably overkill if you only need occasional file reads and your MCP host already exposes a simple filesystem tool.

Frequently asked

What is yc-duan/fastctx?
FastCtx gives AI coding agents structured repository tools so they spend tokens understanding code instead of constructing Bash commands.
Is fastctx open source?
Yes — yc-duan/fastctx is open source, released under the Apache-2.0 license.
What language is fastctx written in?
yc-duan/fastctx is primarily written in Rust.
How popular is fastctx?
yc-duan/fastctx has 1.1k stars on GitHub.
Where can I find fastctx?
yc-duan/fastctx is on GitHub at https://github.com/yc-duan/fastctx.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.