# ctxlint

Validates AI agent context files against your actual repository. It catches dead file paths, broken build commands, and exposed secrets.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: YawLabs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/YawLabs/ctxlint
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/ctxlint

## What it does

Context files like `CLAUDE.md`, `.cursorrules`, and `AGENTS.md` rot when code moves around. A renamed directory leaves stale directions behind. The agent follows outdated guidance and fails. The `ctxlint` server inspects these markdown guides and cross-checks every reference directly against your project files and scripts.

It runs as a zero-dependency bundle and supplies 7 tools over MCP. The engine detects conflicting directives across guides, measures context window token usage, and flags raw secrets pasted into configuration files. When paths break, it uses Git history to suggest the correct location.

For projects using GitHub Actions, it also verifies whether deployment steps and secrets are documented for your assistants.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ctxlint -- npx -y @yawlabs/ctxlint
```

### Codex

**Platform CLI**
```bash
codex mcp add ctxlint -- npx -y @yawlabs/ctxlint
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ctxlint npx -y @yawlabs/ctxlint
```

## When to use it
- find invalid file references inside `CLAUDE.md` and `.cursorrules`
- detect build or test commands missing from `package.json` and `Makefile`
- reduce wasted tokens by flagging redundant context directives
- spot hardcoded credentials and exposed secrets in agent configs
- resolve conflicting instructions across multiple context documents

## Example prompts
- Run ctxlint to check CLAUDE.md for broken file paths
- Audit all agent context files and calculate token consumption
- Verify that test commands in AGENTS.md match package.json scripts

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
