agnix

Checks AI agent config files such as SKILL.md, CLAUDE.md, hooks and MCP configs against agnix's lint rules

By agent-sh Rust Local · stdio Developer tools

75 popularity score ★ 472 ↓ 30k/wk

Connect your client

Local (from source)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

FirstTerminal
cargo install agnix-mcp
Claude CodeTerminal
claude mcp add agnix -- agnix-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "agnix": {
      "command": "agnix-mcp",
      "args": []
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "agnix": {
      "command": "agnix-mcp",
      "args": []
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "agnix": {
      "type": "stdio",
      "command": "agnix-mcp",
      "args": []
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.agnix]
command = "agnix-mcp"
args = []
Gemini CLITerminal
gemini mcp add --scope user agnix agnix-mcp

Settings 1

RUST_LOG Optional: Optional log filter for the stderr logs; warnings are shown by default.

What it does

agnix is a linter for the files that configure AI coding agents: Agent Skills (SKILL.md), Claude Code (CLAUDE.md, hooks, agents, plugins), AGENTS.md, Cursor rules, GitHub Copilot instructions, Kiro, Cline, Gemini CLI and *.mcp.json files. The project ships a CLI, a language server, editor plugins and a GitHub Action. agnix-mcp is a separate Rust binary from the same repository. It puts the same validation engine behind four MCP tools, so an assistant can check the config files it is editing and get errors, warnings and hints back as JSON.

The server runs on your machine over stdio. validate_project walks a directory and returns combined diagnostics for every agent config file it finds. validate_file checks a single file. Both accept a `tools` list (for example ["claude-code", "cursor"]) that limits which rule sets apply. They also accept a deprecated `target` value, which defaults to 'generic' and is only used when `tools` is empty. get_rules lists every rule ID with its name. The README counts 455 rules.

Two things the README does not say, both checked in crates/agnix-mcp/src/main.rs. First, the server resolves every path against the directory it was started in and refuses any path that resolves outside it. Second, get_rule_docs returns only the rule's ID and name, not the explanation and evidence that the CLI's `agnix explain` prints. The server also reports whether each issue is fixable, but none of its tools apply fixes: auto-fix is a CLI feature (`agnix --fix`).

What it needs

RuntimeRust

A Rust toolchain with cargo to build and install the agnix-mcp binary (`cargo install agnix-mcp`). The npm, pip and Homebrew packages install the `agnix` CLI, not agnix-mcp. The client must start the server from the project directory you want checked, because the server reads only files inside its working directory. No account or key is needed.

Limits

It only reads and reports. No tool applies fixes; run the CLI with --fix for that. get_rule_docs returns a rule's name only, not its full explanation. File and project paths must resolve inside the server's working directory, and paths outside it are refused. The `target` parameter is deprecated in favour of `tools`. The server speaks stdio only and reports MCP protocol version 2024-11-05.

Who it suits

It suits developers who keep Claude Code, Cursor, Copilot, Kiro or other agent configs in a repository and want the assistant to check its own edits to those files before committing. It reads local files, needs no account and changes nothing, so there is little to set up beyond building one Rust binary. If you want fixes applied, rule explanations, CI annotations or SARIF output, use the agnix CLI or the GitHub Action instead. If you have no Rust toolchain, the CLI via npx or uvx is easier to get running.

Tools 4

validate_file
Lints one agent config file inside the working directory and returns its diagnostics
validate_project
Finds and lints every agent config file under a directory and returns combined diagnostics
get_rules
Lists every agnix rule ID with its name
get_rule_docs
Returns the name of one rule, given its ID (for example MCP-001)

Similar servers