← Back to directory
C

Ctxlint

Community
Lint your AI agent context files (CLAUDE.md, AGENTS.md, etc.) against your actual codebase.
Category
Dev Tools #158 of 438
Stars
★ 11 Popular
Transport
stdio (local process)
Runtime
Node.js
Credentials
No credential needed
License
MIT
Last commit
Tools
7
57FMRS · C

Ctxlint provides comprehensive auditing of context files, MCP configs, sessions, and skills as an MCP server. The tool set is balanced, and read-only tools declare annotations for auto-approval to streamline workflows. It requires access to the target project files and is valuable for teams leveraging its CLI and MCP server capabilities. Not official but MIT-licensed and well documented.

Strongest · Documentation 15/20 Weakest · Reliability 9/20

Reliability
9/20
Security and permissions
11/20
Maintenance
9/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 9/20
README claims 7 MCP tools (ctxlint_audit etc.) with read-only annotations, stdio transport, zero runtime dependencies, and a clean single-package startup; manifest matches the npm identifier and version. The happy path is plausible. However, this static review sees no server source, tests, or CI workflows verifying that declared tool behavior matches reality (parameters, error outputs), so edge cases and error handling are unverifiable; scores cannot exceed 12.
Security and permissions 11/20
No red-line risk: no network calls claimed, read-only posture, detected secrets shown only as a 6-char redacted prefix, the mutating --fix requires interactive confirmation, and out-of-scope scanning (session/skills/global/home directory) is opt-in with disclosed boundaries — good least-privilege awareness. But all security claims are README self-descriptions; secret-redaction logic, --fix write-path constraints, and actual home-dir scan boundaries are not verifiable from source, so only a middle score.
Maintenance 9/20
Version 0.24.1 indicates active iteration, MIT license is explicit, npm/GitHub badges present. But 7 stars, and no evidence of issue response, release cadence, security-response channel, or contributor governance; still 0.x, short of demonstrated sustained maintenance.
Documentation 15/20
README is exceptionally thorough: install paths, full CLI option list, config field reference, all 7 MCP tools, multi-client config examples, exit codes, four output formats, and four companion specs — good layering. Deductions: no MCP tool parameter schemas, no troubleshooting section, no token/cost details; README examples show v0.9.10 while the manifest says 0.24.1, and many claims (rule counts, client support) cannot be verified from the supplied material.
Setup experience 13/20
Clear install path: one-line npx, complete config examples for Claude Code, .mcp., VS Code, and Claude Desktop (including the Windows cmd /c wrapper), and package identifier consistent with the manifest — low complexity. Deductions: no debugging/stderr-log guidance, the Windows npx path is somewhat fragile, and no verification step for confirming a successful handshake.

Static review · not runListed 2026-09-08

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local files

Best for

  • Developers and teams using AI coding assistants (e.g., Claude Code, Cursor).
  • Projects with multiple context files and complex structure.
  • Teams that need to maintain accurate agent context.
  • Environments with strict security requirements for MCP configs (e.g., no hardcoded API keys).

Not for

  • Projects that don't use AI context files.
  • Simple, solo projects where files change infrequently (may be overkill).
  • Non-critical projects that don't require strict context maintenance.

Required permissions

  • Reads context and config files in the project directory (e.g., CLAUDE.md, .mcp.json).
  • Optionally reads user-level config files (e.g., ~/.claude/settings.json) and global MCP configs (with --mcp-global).
  • Optionally reads agent history and memory files in the user's home directory (e.g., ~/.claude/history.jsonl) when session or skill audits are enabled.
  • Optionally writes context files to fix broken paths when --fix is enabled.

Risks and side effects

  • Auto-fix (--fix) may modify files unexpectedly; preview with --fix-dry-run and review changes.
  • Session audit accesses sensitive history files in the home directory; enable only in trusted environments.
  • The tool reads config and context files that may contain secrets (e.g., API keys); ensure access is controlled.
  • Redundancy checks may produce false positives as inferred content may vary by context.

Setup

Before you start

Runtime:Node.js

### Run via npx (no install needed)

npx -y @yawlabs/ctxlint@latest serve

### Add to MCP clients
For clients that support a project-level MCP config (e.g., Claude Code, Cursor, Windsurf), create a .mcp.json in the project root:

{
  "mcpServers": {
    "ctxlint": {
      "command": "npx",
      "args": ["-y", "@yawlabs/ctxlint@latest", "serve"]
    }
  }
}

For Claude Desktop, add the same config to claude_desktop_config.json.

For VS Code / GitHub Copilot, use the same server config in .vscode/mcp.json (but with "servers" as the root key).

claude_desktop_config.json
{
  "mcpServers": {
    "ctxlint": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ctxlint@latest",
        "serve"
      ]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "ctxlint": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ctxlint@latest",
        "serve"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add ctxlint -- npx -y @yawlabs/ctxlint@latest serve

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Run npx -y @yawlabs/ctxlint@latest serve, then confirm the 7 ctxlint_* tools (ctxlint_audit, ctxlint_fix, etc.) appear in the client's tool list.

Troubleshooting

  1. Ensure your project contains context files to audit (e.g., CLAUDE.md). If none, the MCP server may report no files to audit.
  2. If using session or skill audits, check that the appropriate flags (--session, --skills) are passed and that the corresponding files exist.
  3. On Windows, add a `cmd /c` wrapper when using npx: `"command": "cmd", "args": ["/c", "npx", "-y", "@yawlabs/ctxlint@latest", "serve"]`.
  4. If the server fails to start, confirm Node.js and npx are installed and the npm registry is reachable.
  5. For path errors, see suggested paths in the output, or enable --fix to auto-correct (review changes in version control).

Things to try

Once connected, you can ask your AI assistant things like:

  • Audit my CLAUDE.md and AGENTS.md for broken paths and stale commands
  • Check my .mcp. for hardcoded secrets or deprecated SSE transports
  • Report how many tokens each of my context files consumes and flag redundant content
  • Auto-fix broken paths in my context files using git history

Tools 7

ctxlint_audit read-only
Audit a project's context files (CLAUDE.md, AGENTS.md, etc.) for paths, commands, staleness, redundancy, and more.
ctxlint_mcp_audit read-only
Audit MCP config files (.mcp.json, .cursor/mcp.json, etc.) for schema, security, commands, deprecated transports, etc.
ctxlint_session_audit read-only
Audit AI agent session data (history, memory) for cross-project secrets, config drift, stale memory, and loop detection.
ctxlint_skill_audit read-only
Audit Claude Code skill and agent definitions (~/.claude/skills, ~/.claude/agents) for frontmatter, broken refs, trigger collisions, etc.
ctxlint_validate_path read-only
Validate whether a path exists in the project and suggest the correct path based on git history.
ctxlint_token_report read-only
Report token consumption of context files and redundant content.
ctxlint_fix writes
Automatically fix broken paths in context files using git history.

Use cases

Automatically audit context files before AI coding sessions to ensure agents follow the latest code structure.
Run as a CI step to prevent context files from drifting from the actual codebase.
Enforce consistent rules across multiple context files in a team to avoid conflicting instructions.
Integrate with IDEs or coding assistants via MCP server for real-time linting.

Supported clients

Claude Desktop
Claude Code
Cursor
Windsurf
VS Code
GitHub Copilot

Listed from the project's documentation, not tested by this site.

Overview

Ctxlint is a linter purpose-built for AI tool context files. It reads files like CLAUDE.md, AGENTS.md, .cursorrules, .mcp.json and cross-references them against your actual codebase to catch stale paths, wrong commands, redundant content, contradictions across files, and more. It supports 16 AI tools and 8 MCP clients, and works as a CLI, CI step, pre-commit hook, or MCP server. The MCP server exposes 7 tools for auditing context files, MCP configs, session data, and skill definitions.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision b6c92fc859cd Data synced 2026-10-19 Read the FMRS scoring method