MCP server
Connect Claude Code, Cursor or any MCP client to run audits and read results.
Overview
SEO Agent has a built-in [Model Context Protocol](https://modelcontextprotocol.io) server at /api/mcp (streamable HTTP). Any MCP client can connect with a personal API token and use 24 tools to list sites, start audits, wait for them, and read scores, issues, findings and recommendations.
Connect Claude Code
- 1
Create a token
In Settings → API & MCP, first pick the organization with the org switcher (a token only works there), then create a token. Choose Read + start jobs to let the agent run audits, or Read only. Copy it now; it isn't shown again.
- 2
Add the server
Run the command shown with the token:
claude mcp add --transport http ai-seo https://ai-seo.vdev.web.id/api/mcp \
--header "Authorization: Bearer seo_pat_…"Then ask Claude Code something like:
Audit example.com, wait for it to finish, and summarise the top 5 issues with fixes.
Then fix the missing canonicals in this codebase.Other clients
Any client that supports streamable HTTP with a custom header works. For clients that only support local (stdio) servers, such as some versions of Claude Desktop, bridge with mcp-remote:
{
"mcpServers": {
"ai-seo": {
"command": "npx",
"args": ["mcp-remote", "https://ai-seo.vdev.web.id/api/mcp",
"--header", "Authorization: Bearer seo_pat_…"]
}
}
}Tools
| Area | Tools |
|---|---|
| Context | whoami, list_sites, get_site, list_checks |
| Audits | start_audit, wait_for_audit, get_audit, list_audits |
| Results | get_audit_score, list_findings, get_audit_changes, compare_audits, list_issues, get_issue, list_recommendations, get_recommendation, site_report |
| Research and data | start_keyword_research, get_keyword_research, get_ai_visibility, run_ai_visibility, gsc_summary, rankings_summary, rankings_opportunities |
start_auditreturns the running audit instead of failing if one is already in progress.wait_for_auditwaits up to 4 minutes and reports progress; if the audit is still running it returnsstill_running: true, and the agent calls it again.- List tools take a
limitand filters, and saytruncated: truewhen there is more.
Activity log
Every tool call an agent makes is recorded with the tool, its arguments, whether it worked (and the error if not) and how long it took. Open Settings → API & MCP and choose Activity on a token to see its calls; each token also shows how many calls it made today.
Audits started by an agent through MCP show MCP as their trigger; audits started by other scripts with a token show API.
Troubleshooting
| Symptom | Cause |
|---|---|
| 401 when connecting | Missing, mistyped, expired or revoked token. Check the header is exactly Authorization: Bearer seo_pat_…. |
| "read-only API token" | The token was created as Read only; create a Read + start jobs token to start audits. |
| "404: site not found" | The site belongs to a different organization than the token. |
| "409 … active audit" | Only one audit per site runs at a time; start_audit returns the running one. |