PhpStorm

How to check AI code changes in PhpStorm before you commit.

Add Veridu to Junie or GitHub Copilot as an MCP server and add one line to your project guidelines asking the agent to send each change to Veridu, fix the findings that hold up and check again. For PHP, Veridu also traces callers and overrides within the files it is sent, so a caller the change missed can show up before anything is committed.

1a · Add Veridu to Junie

In PhpStorm, open Settings | Tools | Junie | MCP Settings and add a remote server with just the URL. It is stored in .junie/mcp/mcp.json in your project, or ~/.junie/mcp/mcp.json for all projects:

{
  "mcpServers": {
    "veridu": { "url": "https://api.veridu.io/mcp" }
  }
}

If Junie shows the server as needing authorization, authorize it and sign in to Veridu in the browser. If the sign-in fails, create a token with the MCP only scope on the Tokens page and send it as a Bearer header. Full-access tokens are not accepted by the MCP server.

{
  "mcpServers": {
    "veridu": {
      "url": "https://api.veridu.io/mcp",
      "headers": { "Authorization": "Bearer <MCP-ONLY TOKEN>" }
    }
  }
}
1b · Or add it to GitHub Copilot

Open Copilot Chat in Agent mode, click the tools icon, then Add MCP Tools, and add Veridu to the mcp.json that opens. Copilot's file uses servers, and the token goes in requestInit. Create the token with the MCP only scope on the Tokens page:

{
  "servers": {
    "veridu": {
      "url": "https://api.veridu.io/mcp",
      "requestInit": {
        "headers": { "Authorization": "Bearer <MCP-ONLY TOKEN>" }
      }
    }
  }
}

In a Copilot Business or Enterprise organization, an admin must allow MCP servers in Copilot.

2 · Tell the agent when to use it

Add this line to Junie's guidelines (.junie/guidelines.md) or Copilot's instructions (.github/copilot-instructions.md):

Before committing, call Veridu's verify_change. Review and fix valid findings, then run it again to check what is still open.

Or ask for a check when you want one: "verify this change with Veridu". No repository to connect.

3 · Send the PHP files around the change

Veridu traces callers and overrides only within the files it is sent. When a change alters a method's signature or what it returns, ask the agent to include the classes that call it, and any interface or parent class it implements, alongside the changed files. In the worked example, the caller the agent missed was in a file it sent, which is why Veridu could find it. How Veridu looks for callers.

4 · What happens on each change
  1. 1
    The agent sends the change. When it follows the rule (or you ask it to), it calls verify_change with the diff, the full content of the files it changed and a sentence on what the change is for. Independent reviewers check it in an isolated sandbox with no internet access; the check may take a few minutes.
  2. 2
    It gets findings it can act on. An outcome (pass, review or block) and findings with the file, line, severity and evidence. Veridu tries to keep each finding's id the same across follow-ups, matching on the file, the code and the nearby lines.
  3. 3
    It fixes what holds up and checks again. When it checks the fixed change, Veridu links the follow-up to the first check automatically. The follow-up reports which findings persist, which are new (possibly introduced by the fix) and which are no longer reported, which is not proof of a fix. The first two linked follow-ups are free.
What it doesn't do

It sees only the files the agent sends, not your whole repository. For the code a change affects elsewhere, review the pull request too: how to review AI-generated pull requests.

Questions
Which assistant in PhpStorm should I use?

Any that can call a remote MCP server. This page covers Junie and GitHub Copilot. Claude Code also runs in PhpStorm through its JetBrains plugin; set it up as in the Claude Code guide.

Does browser sign-in work in Junie or Copilot?

Veridu supports MCP sign-in through a local (127.0.0.1 or localhost) redirect, and it is tested with Claude Code, Codex and ChatGPT, but not yet with Junie or Copilot. If it fails, use a token with the MCP only scope instead, as shown above.

What does Veridu do differently for PHP?

When a change alters a method or class, Veridu also looks for its callers and overrides within the files it was sent, so a missed caller can show up as a finding. It does not search the rest of your repository, so the agent should send the related files too.

Does Veridu read my whole repository?

No. The agent sends the diff and the full content of the files it changed (plus any related files it chooses), and Veridu reviews only those, in an isolated sandbox with no internet access. Results are advisory for that reason.

Do I need an OpenAI or Anthropic API key?

No. Only a Veridu sign-in, or an MCP-only token from the Tokens page.

Does it use my JetBrains AI or Copilot quota?

Only for the ordinary tool calls that send the change and read the result. Veridu's reviewers run on Veridu's own OpenAI and Anthropic API access, which Veridu pays for, and a new change counts against your Veridu reviews.

Does a finding that disappears mean it was fixed?

No. A follow-up says whether the flagged line changed, but a reviewer can also simply not mention it again, so "no longer reported" is not proof of a fix. Read the diff before you commit.

What does it cost?

Each new change uses one review. The first two follow-ups linked to it are free, and resending the exact same request within seven days returns the earlier result at no cost. The free tier includes up to 20 reviews a month with no card. A change linked to a private repository needs a paid plan.

What are the limits?

Text files only (no binaries, renames, mode changes or symlinks). The diff can touch up to 60 files and be up to 256 KB. The files sent with it can be up to 120, at most 256 KB each and 512 KB in total.

Using another agent?

The same loop works in Claude Code (including its JetBrains plugin), Codex and Cursor. For Laravel projects, see Laravel code review.