readfirst — Claude Code MCP server: features and setup
readfirst — an MCP server for Claude Code surfaces project rules, risks, and checks before a file change. It also points to related files and tests.
MIT ★ 5 updated 2026-11-16
claude mcp add readfirst -- npx -y readfirstWhat readfirst does
readfirst gives an agent file-specific guidance before edits: project rules, risks, checks, tests, and files that change together. The map lives in .readfirst/map.json; npx readfirst init --agent --ci creates an initial map and wires up agents and the PR Action.
Run npx readfirst audit to inspect Git history for past failures, or npx readfirst scan to look for published bug patterns. Node 20 or newer is required. The server reads the Git checkout and map; it uses no account or model calls.
What it helps with
- surface project rules before editing a file
- identify related files and required checks
- inspect Git history for earlier failures
- scan code for published bug patterns
Example prompts for the agent
- Before editing
src/imports.mjs, show the project rules, risks, tests, and related files. - Inspect the Git history for earlier failures.
- Scan the code for known bug patterns.
How to install readfirst
Platform CLI
claude mcp add readfirst -- npx -y readfirstPlatform CLI
codex mcp add readfirst -- npx -y readfirstConfig file
{
"mcpServers": {
"readfirst": {
"command": "npx",
"args": [
"-y",
"readfirst"
]
}
}
}Config file
{
"servers": {
"readfirst": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"readfirst"
]
}
}
}Platform CLI
gemini mcp add readfirst npx -y readfirstStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about readfirst
How do I install readfirst in Claude Code?
Run claude mcp add readfirst -- npx -y readfirst. Node 20 or newer is required.
What does readfirst do?
It gives agents file-specific rules, risks, checks, tests, and links to files that change together before edits.
What does readfirst need to run?
It requires Node 20 or newer and reads the local Git checkout and .readfirst/map.json. It uses no account or model calls.