AI agents (MCP).
Connect your coding agent to Vericto over the Model Context Protocol so it checks every migration and query against your workspace rules while it writes them, before there is a commit.
Overview
Vericto runs a remote MCP server at https://mcp.vericto.com/mcp. A connected agent (Claude Code or another compatible MCP client) calls check_sql while it generates SQL and gets the same verdict as the CLI or the API: BLOCKED, FLAGGED, MONITORED or ALLOWED, with the rule that fired and a suggested fix.
It is the earliest point in the cycle: the CLI checks before merge and the TCP proxy blocks in production; MCP checks while the code is still being written. All three use the same deterministic AST engine and your workspace rules.
Nothing to install. The server is remote (Streamable HTTP) and authenticates with an API key from your workspace in the Authorization header.
Setup
1. Create an API key
In Dashboard → API Keys → New API key, create a key with only the ci_dryrun:execute scope (the one the CLI uses) and, optionally, an expiry date. Copy it: it is shown only once. Keep it in an environment variable, not in a file in your repository:
# ~/.zshrc or ~/.bashrc
export VERICTO_API_KEY="vtro_..."
2. Connect your client
claude mcp add --scope user --transport http vericto https://mcp.vericto.com/mcp \
--header 'Authorization: Bearer ${VERICTO_API_KEY}'
The single quotes keep ${VERICTO_API_KEY} unexpanded: the config stores the reference and Claude Code resolves it at startup, so the key is never written to ~/.claude.json. Open a new session and run /mcp: vericto should show as connected with 6 tools.
Tested with Claude Code.
Do not paste the API key into files that get committed, such as a project .mcp.json. Use the environment-variable reference your client offers.
Tools
| Tool | What it does | Quota |
|---|---|---|
check_sql | Evaluates SQL against the workspace rules and returns a verdict per statement. | 1 check per call with sql; 1 per query with queries |
whoami | Plan, checks left this month, ruleset version, and the workspace's databases with their dialect. | Free |
list_rules | The effective rule catalogue (standard and custom) with the resolved action. | Free |
show_rule | One rule in detail by code, including the AST condition it matches. | Free |
list_reports | The workspace's check history, newest first. | Free |
show_report | The full result of an earlier check, query by query. | Free |
On connect the server sends usage instructions, so the agent knows when to call each tool without you having to explain it.
How check_sql works
It takes one of two inputs:
sql: the whole script, such as a migration file. Vericto splits it into statements and reports each one with the line it starts on. It costs one check, the same as that file through the CLI.queries: statements already split, each with an optionalline. It costs one check per query.
Always pass the dialect of the database the SQL targets: postgres (the default), mysql, oracle or mssql. whoami lists the workspace's databases with their dialect.
The answer is compact: a summary and, for every statement that is not ALLOWED, its line, status, rule, severity and suggested fix. With verbose: true it returns the full CLI result.
BLOCKED: 1 of 3 statements must not ship as written.
- line 4 BLOCKED VERICTO-001 (critical): DELETE FROM users Fix: DELETE FROM users WHERE id = $1
Ruleset v1.0.0-3f2a9c1b7d4e · 999 checks left this month
If the script has procedural bodies (CREATE PROCEDURE … BEGIN … END, BEGIN ATOMIC or MySQL DELIMITER), Vericto does not split it: it evaluates it as one unit, as the CLI does with a file, and reports its most severe finding.
The ruleset_version in the answer changes only when a workspace rule changes. While it matches the one from whoami, an earlier verdict still holds.
Every call is recorded in the workspace's check history (Dashboard → SQL checks, or list_reports), with an excerpt of up to 100 characters of each statement.
Quota and limits
| Plan | Checks per month (CLI and MCP) |
|---|---|
| Free | 1,000 |
| Builder | 10,000 |
| Team | Unlimited |
| Enterprise | Unlimited |
The monthly quota is shared between the CLI and MCP. The read-only tools do not use it.
There is also a per-API-key rate limit on every plan: 30 check_sql calls per minute and 300 per hour, and 60 per minute for the read-only tools. When exceeded, the tool answers with how many seconds to wait.
Security
- The API key determines the workspace. The agent cannot pick or see another one.
- A key with only
ci_dryrun:executecannot read the audit trail or change rules: whoever gets it can, at most, spend your check quota. - Vericto only analyzes the SQL text. It does not connect to your database or run anything.
- Revoke the key in Dashboard → API Keys and the agent loses access immediately.
Troubleshooting
| Symptom | Cause | What to do |
|---|---|---|
401 | The Authorization header is missing, or the environment variable is empty. | Check that VERICTO_API_KEY is exported in the shell you start the client from, and open a new session. |
403 | The key lacks the ci_dryrun:execute scope. | Create a key with that scope. |
Rate limited | Too many calls in a short time. | Wait the number of seconds the message gives. |
Monthly CI-check allowance used up | This month's quota is used up. | Wait for next month or upgrade. The read-only tools keep working. |
PARSE_ERROR | Almost always, the wrong dialect. | Pass the right dialect; whoami shows it per database. |