# readfirst

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: jeonghun917
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jeonghun917/readfirst
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/readfirst

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add readfirst -- npx -y readfirst
```

### Codex

**Platform CLI**
```bash
codex mcp add readfirst -- npx -y readfirst
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "readfirst": {
            "command": "npx",
            "args": [
                "-y",
                "readfirst"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "readfirst": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "readfirst"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add readfirst npx -y readfirst
```

## When to use it
- 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
- 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.

## Similar
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
