yc-duan/fastctx

Fast, context-efficient repository tools for AI agents (MCP)

What it solves

Coding agents often struggle with the overhead of assembling shell commands for repository access, dealing with platform-specific syntax, escaping, and parsing terminal output. This consumes significant model reasoning and context, leaving less room for the actual coding task. FastCtx solves this by providing a structured, high-performance Rust runtime that abstracts common repository operations into stable input and output schemas.

How it works

FastCtx operates as a local Rust tool runtime that connects to AI agents via the Model Context Protocol (MCP). It uses a thin stdio proxy to communicate with a shared local control center that manages search executors and global admission limits. This architecture ensures that MCP sessions remain stable even if the control center needs to restart or reconnect.

Who it’s for

Developers using AI coding agents (specifically ChatGPT App and Codex CLI, though any MCP client is compatible) who want to reduce tool-call overhead and improve the efficiency of repository exploration and editing.

Highlights

  • Structured Repository Tools: Provides dedicated tools for reading files (inspect_local_file), searching contents (grep), finding files (glob), and performing batch replacements (replace).
  • High Performance: Built in Rust for speed and efficient directory traversal.
  • Background Job Management: Includes tools to run Bash commands in the background, monitor their output, and manage their lifecycles.
  • Context Efficiency: Reduces the need for the model to reason about shell syntax or handle truncated output manually through built-in paging and batching.
  • Cross-Platform Support: Handles platform differences (e.g., using Git Bash on Windows) and manages environment variables to ensure commands run consistently.

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch