# turnpack [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/OnlyTerp/turnpack  
**GitHub Stars:** 67  
**npm Downloads (last month):** 743  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/turnpack

## Description
Fewer back-and-forth AI turns. A local MCP server that gathers context in one call and ships multi-file edits behind your tests, with automatic byte-exact rollback.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "turnpack": {
    "command": "npx",
    "args": ["-y","turnpack"]
  }
}
```

## Documentation

## What turnpack does

turnpack reduces the number of dependent tool calls an agent needs when working in a local repository. It exposes three MCP tools:

- `pack` combines regular-expression search, surrounding code, selected file contents, glob results, and Git status in one response.
- `ship` applies edits across multiple files and runs a verification command before accepting them.
- `batch` executes a short, read-only script against the repository to answer questions that would otherwise require many individual reads.

The server is intended for coding agents that communicate through MCP over standard input and output. It operates locally, without an account, API key, telemetry, or network calls.

## How it works

An agent can use `pack` to search for a symbol while requesting complete files, line ranges, or individual functions. Search results include code context, and responses are capped in size. Secret-bearing files, including `.env` files and key files, are redacted unless explicitly allowed.

`ship` receives a set of edits and a test or verification command. It records the affected files, applies all edits, and runs the command. A successful check leaves the changes in place. If the command fails, turnpack restores every affected file to its byte-for-byte pre-edit contents and returns the failing output, helping the agent correct the complete change rather than repair a partially modified workspace.

`batch` is suited to repository-wide, read-only questions such as finding which files export a particular symbol. It returns the script's result without requiring one model turn per file.

## Setup and configuration

Node.js 22 or newer is required. The package can be tried without changing an existing project with:

```bash
npx turnpack demo
```

The demo creates a temporary repository, exercises all three tools, and removes the temporary data afterward. To run the demo directly from the GitHub repository, use:

```bash
npx github:OnlyTerp/turnpack demo
```

The project also provides `init` for configuring supported applications and `doctor` for checking the resulting setup. MCP clients connect to turnpack over stdio. No runtime dependencies or API keys are needed.

## Tools and capabilities

`pack` supports regex search, code surrounding matches, whole-file reads, line-range selection, function-level selection, glob listings, and Git status. It can gather related context in one request while applying output limits and default secret redaction.

`ship` supports edits spanning any number of files and runs the supplied test command as part of the same operation. Its rollback behavior keeps failed attempts from remaining in the working tree.

`batch` runs a short read-only repository script, making broad inspection tasks more compact than repeated file reads.

## Limitations and notes

turnpack is local-only and communicates through stdio; it is not a hosted repository service and does not make network requests. Verification depends on the command supplied by the agent, so a change is considered successful when that command passes. Secret files are protected by default, and intentional access requires the relevant `allow_secrets` option. The documented measured comparison uses one rename task in Claude Code, so those figures should not be treated as a general benchmark for every repository or agent.

_Full upstream README: https://allmcps.com/mcp/turnpack/readme_

