CLI and MCP server
Run audits from a terminal, or let Claude Code and Cursor run them for you through the Model Context Protocol server.
The seofixagent package ships a command-line tool and an MCP server. Both talk to the same API with an API key from Account → API keys.
Install
npm install -g seofixagent
export SEOFIXAGENT_API_KEY=sfa_…
CLI
seofixagent audit https://example.com/ # score, failures, fixes
seofixagent audit https://example.com/ --json # the full result
seofixagent prompt 123 # the fix prompt for audit 123
seofixagent crawl https://example.com/ --limit 50 # start a crawl and wait for it
seofixagent issues <crawl-id> # issue groups with affected URLs
seofixagent me # workspace and balance
Exit code is 1 when the audited page has any failing check, so it works as a CI gate:
- run: npx seofixagent audit https://staging.example.com/ --fail-on warn
MCP server
Add it to your agent's MCP configuration. For Claude Code:
claude mcp add seofixagent -e SEOFIXAGENT_API_KEY=sfa_… -- npx -y seofixagent mcp
For Cursor or any MCP client, the equivalent mcpServers entry:
{
"mcpServers": {
"seofixagent": {
"command": "npx",
"args": ["-y", "seofixagent", "mcp"],
"env": { "SEOFIXAGENT_API_KEY": "sfa_…" }
}
}
}
The server exposes five tools:
| Tool | Does |
|---|---|
audit_page |
Runs a full audit and returns the findings with fixes |
get_fix_prompt |
The compiled fix prompt for an audit id |
start_crawl / get_crawl |
Starts a crawl; polls it and returns issues grouped by fix |
audit_history |
Recent audits in the workspace, with scores |
A typical loop: the agent audits the page, applies fixes in the repository, redeploys, audits again, and reads the regressed / improved badges. Credits are charged as in the dashboard.