Skip to content

MCP

The AutoRanq MCP (Model Context Protocol) server lets your AI assistant drive the platform directly — list articles, fire generations, tweak prompts, check costs. No REST plumbing, no SDK install, no auth boilerplate. Your AI client and AutoRanq talk to each other.

What you can do

“Hey Claude, generate an article for the keyword ‘best CRM for startups’ in my Marketing project.” → done.

Prerequisites

  • An AutoRanq API key (create one in app.autoranq.aiSettings → API). See Authentication for the full key flow.
  • Node.js 20+ on your machine (the MCP server runs locally as a child process of your AI client)
  • An MCP-compatible client: Claude Code, Cursor, Claude Desktop, or VS Code with the MCP extension

Install

Pick your AI client below. Each tab has copy-paste install steps.

The fastest way:

Terminal window
claude mcp add autoranq -- npx -y @autorank/mcp-server \
-e AUTORANK_API_KEY=ar_live_your_key \
-e AUTORANK_API_URL=https://api.autoranq.ai

That writes the config to ~/.claude.json. Restart Claude Code and you’re done.

To verify:

Terminal window
claude mcp list
# Expect: autoranq (running)

Verify it works

Open your AI client and ask:

“List my AutoRanq projects.”

If everything’s wired up, the assistant calls the list_projects tool and shows your projects. If you see an error like “tool not found” or “MCP server not connected”, check the Troubleshooting section.

Tool reference

22 tools across 6 categories — a one-to-one mapping of the public REST API into MCP tool calls. Your AI client decides when to call each.

Projects (2 tools)

ToolWhat it does
list_projectsList all projects in your organization
get_projectGet a single project by ID

Articles (6 tools)

ToolWhat it does
list_articlesList articles with optional filters (project, status, format)
get_articleGet a single article with full content + metadata
create_articleCreate a draft article manually (title + content)
update_articleUpdate title, content, status, or metadata of an existing article
publish_articleTransition a DRAFT/APPROVED article to PUBLISHED
delete_articleDelete an article

Generations (3 tools)

ToolWhat it does
list_generationsList recent AI generation jobs with optional filters
get_generationGet detailed status, phase, and result of a generation
generate_articleTrigger a new AI article generation for a keyword

Keywords (3 tools)

ToolWhat it does
list_keywordsList keywords for a project with optional filters
get_keywordGet a single keyword with SERP data
research_keywordsTrigger a keyword research job (seed keywords + location)

Webhooks (6 tools)

ToolWhat it does
list_webhooksList webhook subscriptions for your organization
get_webhookGet a single webhook subscription
create_webhookCreate a new webhook subscription (URL + event types)
delete_webhookRevoke an existing webhook
test_webhookFire a test delivery to verify your endpoint
list_webhook_eventsList all available event types you can subscribe to

System (2 tools)

ToolWhat it does
get_system_healthPublic API health status
get_rate_limitCurrent rate-limit usage for your API key

Example prompts

Things your AI client can now do:

  • “List my last 10 published articles for the webgroeiers.nl project.”
  • “Trigger a generation for the keyword ‘best CRM for B2B startups’ in my Marketing project.”
  • “My last generation is FAILED — fetch it and tell me why.”
  • “Create a webhook on https://my-app.com/hooks/autoranq that listens to article.published and generation.completed.”
  • “How many requests do I have left on my rate limit this hour?”

The MCP server gives you the entire public API surface as tools — your AI client combines them into multi-step workflows automatically.

Troubleshooting

”MCP server not connected” or tools don’t appear

  1. Check the API key prefix. Must start with ar_live_ or ar_test_. See Authentication.
  2. Check AUTORANK_API_URL. Without it, the server hits http://localhost:3001 — production calls fail silently.
  3. Try the npm package manually:
    Terminal window
    AUTORANK_API_KEY=ar_live_your_key \
    AUTORANK_API_URL=https://api.autoranq.ai \
    npx -y @autorank/mcp-server
    You should see a startup log line on stderr (the server uses stdio so it waits for MCP protocol input — that’s normal, just Ctrl+C to exit).

”Unauthorized” on every tool call

The key was rejected. Common causes:

  • The key was revoked or rotated in the dashboard
  • You’re using a test-mode key (ar_test_) but pointing at the live API URL — they work together, so this is fine; just double-check
  • The key lacks the required scope. MCP tools that write (e.g. update_recipe_step, create_prompt) need write scope; read-only keys get 403. See Authentication → Scopes.

Timeouts on long-running operations

Default tool-call timeout is 30 seconds. Heavy operations like test_recipe (which fires a real generation) can take longer. If you hit timeouts:

  • Use test_single_step instead for faster iteration
  • Or fire POST /generate via the REST API and use list_generations to poll status separately

Server crashes on startup with “AUTORANK_API_KEY environment variable is required”

You forgot the env block in your client config. Re-check the install steps above — the API key MUST be passed via env, not as a tool argument.

Next steps

  • Authentication — manage API keys, rotate compromised ones, understand scopes
  • Webhooks — get notified when long-running tools complete (no polling needed)
  • Quickstart — same workflow via REST if you prefer code over chat
  • CLI — terminal-native version of the same surface (coming in Phase 3)