Guide

AGENTS.md and MCP Config Security: What to Check

Short answer: AGENTS.md security starts with trust, because files such as AGENTS.md, CLAUDE.md and MCP server configs are instructions that an AI coding agent reads and follows. If you clone a repository you do not control, those files are text written by someone else that steers your agent. Paste them into the Agent Config Linter to look for hidden characters, injection-style phrases, commands that send data out and risky settings before you let an agent run.

Why these files matter

AGENTS.md is an open format that acts like a README for coding agents: build commands, test steps and style rules in plain Markdown. That is helpful, and it is also a trust boundary. OWASP lists prompt injection as the top risk for LLM applications, and instructions hidden inside content the model reads are one way it happens.

What the linter looks for

  • Hidden characters: invisible Unicode that makes a line read differently to a model than to you. See how to detect hidden Unicode characters.
  • Injection phrases: wording that tries to override the agent's instructions.
  • Data-sending commands: instructions that would send files or secrets elsewhere.
  • Risky settings: options in an MCP or agent configuration that widen what the agent may do.

How to check AGENTS.md security before running an agent

  1. Open the instruction files (AGENTS.md, CLAUDE.md) and the MCP JSON config.
  2. Paste each into the Agent Config Linter (up to 100,000 characters each).
  3. Read every finding, not only the count. The tool reports up to 500.
  4. Check commands by hand: see Is this shell command safe?.
  5. Decide what the agent may and may not do before it starts. For the code an agent writes, see insecure patterns in AI-generated code.

Using the results in a pipeline

The tool can export SARIF 2.1.0, the common format for code-scanning results, so findings can be viewed in tools that read it. It also accepts files up to 1 MB when you load them.

Limits to know

  • The checks are heuristics. A clean report is not proof of safety, and a finding is not proof of an attack.
  • It does not run anything and does not call a model.
  • Everything runs in your browser.

Frequently asked questions

What is AGENTS.md? A Markdown file with instructions for coding agents, placed at the root of a repository.

Can a repository file inject instructions into my agent? Yes, if the agent reads and follows it. That is why you review such files first.

Does a clean result mean the file is safe? No. It means the heuristics found nothing.

What is SARIF? A standard format for static analysis results.

Does it check secrets? No. Use the Secret Scanner and see Leaked API key: what to do.

Related tools and guides

Sources and further reading