What the pasr MCP server does
The pasr MCP server helps coding agents retrieve bounded portions of a local repository. It selects source spans that fit the requested returned-context budget, including rendered labels, headings, separators, and redaction. A selected span may be smaller than a complete function because the system admits whole computed spans only when the final representation fits.
Each selection can produce a receipt identifying the source location, token count, retrieval signals, and reason the span was kept or dropped. Receipts are stored beneath the workspace's .pasr/receipts directory on a best-effort basis, and the response indicates whether persistence succeeded. They describe context delivered by PASR, not every file an agent may have inspected through other tools.
How it works
The pasr MCP server operates locally against a workspace supplied at startup. It does not require a background daemon, vector database, or manually built index. Offline selection needs the installed dependencies and cached tokenizer data; optional model weights are separate. A client can still send the returned source to a hosted model, so local retrieval does not mean the source stays local after the client forwards it.
The host decides when to search, select context, or read files directly. PASR also exposes query classifications, keyword coverage, and routing advice in its receipts. These values are heuristics: they are not calibrated correctness probabilities and do not prove that all relevant evidence was retrieved. Source checking remains necessary.
Setup and configuration
Install the published pasr-mcp package with uvx, using Python 3.10 or newer, and provide an absolute repository path with --workspace. Version 0.4.0 can be launched with uvx --from pasr-mcp==0.4.0 pasr-mcp --workspace /absolute/path/to/project. The repository itself is not needed for a package installation. A released wheel can also be installed with pip, after which the configured command runs the installed pasr-mcp executable.
The README provides setup notes for Claude Code, Cursor, and Windsurf, and shows a Codex registration using codex mcp add. The server uses standard MCP configuration with a command and argument list. Avoid registering the same pasr entry twice when merging configuration. The optional pasr doctor command checks installation behavior in a disposable fixture; it does not scan or write the target project.
Tools and capabilities
Documented workflows include:
- Searching a configured workspace for relevant source.
- Selecting context under a returned-token ceiling.
- Reading files directly when bounded selection is not the right fit.
- Reporting file:line provenance for selected spans.
- Writing best-effort selection receipts with token and retrieval details.
- Running
pasr explain without an agent to inspect a selection receipt.
Limitations and notes
The default redaction behavior is a no-op, so PASR should not be treated as automatic secret detection. Receipt persistence can fail. Selection advice does not establish answer quality, completeness, or correctness, and smaller context does not by itself guarantee lower cost or more accurate responses.
Initial setup and tokenizer encoding downloads may require network access. PASR may write receipts or cache data in the workspace. The diagnostic command reports runtime and check results rather than source, absolute paths, environment values, or raw exceptions; a passing diagnostic does not validate client registration, approval settings, or agent answers.