transport
Streamable HTTP MCP
A stateless Model Context Protocol server at https://api.refd.ai/mcp.
refd exposes AI search monitoring for your workspaces through a remote MCP server. Connect Claude, ChatGPT, or any MCP client and query visibility, competitors, citations, and the raw answers behind them, across the workspaces you approve. Reading is the default; an optional bounded setup scope lets an agent onboard a workspace. OAuth for browser clients; personal access tokens for headless ones.
01 / the connector
At consent you pick the workspaces the connection may target: check the ones you want, use Allow all to cover every workspace on the account (including ones you create later), or provision a new workspace for the agent to onboard (the create_workspace tool needs an Allow all connection, since only those can target workspaces created after approval). Every tool takes an optional workspace selector, and the credential, never the tool arguments, defines what it may target. Personal access tokens always cover exactly one workspace. Web prompt-injection can, at worst, act inside the workspaces the human authorized: a setup-scoped agent can edit configuration, start the one onboarding report, and manage tracked prompts row by row; no grant can delete run history or manage billing, and only an administrator's connection can trigger an extra paid run (run_now). The owner can revoke the connection anytime from Settings.
transport
A stateless Model Context Protocol server at https://api.refd.ai/mcp.
auth
Authorization-code flow with revocable grants. Single-workspace personal access tokens cover clients that have no browser.
scopes
data:read: Twelve analytics tools plus a metric-glossary resource. Read-only.
data:write: Adds twelve setup tools plus revoke_connection covering the whole lifecycle: verify domains, provision a workspace, configure it, start one provider-backed onboarding report, finish onboarding, and revoke the connection when it is no longer needed. Onboarded workspaces also get row-scoped prompt management, competitor CRUD, and surface toggles (eleven tools) plus run_now, an immediate paid run limited to administrator accounts.
02 / the tools
Call tools/list after connecting. Every tool resolves the granted workspaces from the credential; an optional workspace argument only picks among them, and get_workspace_info lists the choices.
get_workspace_infoThe connected workspaces and, for the selected one: brand, tracked competitors, prompts, and enabled AI surfaces.
get_visibility_overviewMention rate, citation rate, position, and share of voice across surfaces, with a byCohort breakdown beside the blended figure.
get_competitor_landscapeHow the brand ranks against the competitors it tracks.
get_prompt_performancePer-prompt visibility, broken down by AI surface. Each prompt carries its cohort.
get_citation_sourcesWhich domains AI answers cite for the workspace.
get_recent_changesMaterial moves between the two most recent completed runs.
find_prompt_resultsSearch tracked prompts and their scored results.
read_answerThe raw AI answer behind a result, with entity mentions highlighted.
get_digestA 30-day rollup of the workspace, the same one that grounds the dashboard chat, carrying the prompt-cohort split.
get_run_historyRecent run cycles with status, answer counts, dispatch state, and the frozen prompt count.
get_prompt_changesA per-prompt diff of the two most recent completed runs, including zero-visibility transitions.
get_prompt_set_timelineEvery distinct prompt population the workspace has run against, and what changed between them.
get_attribute_performancePer-capability visibility, flagging an attribute measured by a single prompt as unmeasured.
get_intent_performanceVisibility by declared funnel stage and question type. Both are declared on the prompt, never inferred, so a prompt with neither is counted as undeclared.
get_prompt_citationsThe URLs cited for one prompt, with counts and an isOurs flag, in a single call.
prompt cohorts
A prompt that names the brand is scored near 1.0 by construction, so a headline that pools every prompt flatters the brand. get_visibility_overview, get_competitor_landscape, get_citation_sources, and get_prompt_performance take a kind filter, comma-separated: brand_defining (the prompt names your brand), alternative (it names only a tracked competitor), or discovery (it names neither, so the rate is unprompted visibility). Two further cohorts, problem and market_perception, are declared rather than inferred, so they appear only if someone set them. Omitting kind does not hand back a blend: get_visibility_overview, get_competitor_landscape, and get_citation_sources head their figures with the discovery cohort, because asking nothing should not return a brand-inflated number. get_visibility_overview returns headline, which names its population, beside byCohort with every cohort at once. get_digest is the exception and takes no filter: it always pools every cohort, so read sections.prompts.cohorts for one cohort on its own. list_prompts reports each prompt cohort and the counts.
setup tools · data:write
With the data:write scope, the setup tools onboard a
workspace end to end: get_setup_state, check_domain on every candidate domain, set_brand, draft_description, suggest or update competitors and prompts (prompt generation is steerable by count and theme), preview_setup, explicit user approval, confirm_setup, then get_setup_report until the runs land, then complete_setup to finish. When the connection is no longer wanted, revoke_connection ends the access it had. The workflow is
budgeted, and confirm_setup starts exactly one
provider-backed onboarding report. Past onboarding, prompt changes
stay operational; only an administrator's connection can trigger an
extra paid run. No grant can delete run history or manage billing.
create_workspaceProvisions a new workspace for the connection. Needs an Allow all connection: a checked grant could never target a workspace created after approval.
check_domainVerifies a domain resolves and where its redirect chain lands. Run it before saving any brand or competitor domain: a wrong domain silently breaks citation matching forever.
get_setup_stateThe setup wizard state: phase, editable draft, version, regeneration allowances, plus the effective limits and the generation budget of the last 24h.
set_brandSets or updates the tracked brand: name, domains, aliases.
draft_descriptionFetches the brand website and drafts description, summary, and target market.
suggest_competitorsGenerates editable competitor candidates from indexed company search; failures carry the cause and the raw candidate domains they saw.
suggest_promptsGenerates categorized, editable buyer-question candidates, steerable by count and theme.
update_setupApplies explicit edits to any draft field, including enabled surfaces.
preview_setupReturns the exact canonical configuration, its hash, and a per-surface expected-check breakdown.
confirm_setupCommits the approved configuration and starts the one provider-backed onboarding report.
get_setup_reportLive progress and the pinned setup report for the run group.
complete_setupMarks the workspace onboarded after the commit, the same gate the dashboard "enter dashboard" click passes.
revoke_connectionRevokes this connection: the grant, every token under it, and access to every approved workspace die together, after an explicit confirm argument. Only ever touches the connection the credential belongs to.
prompt tools · data:write
Row-scoped prompt management: a single prompt changes without rewriting the setup draft. list_prompts to resolve ids, add_prompt / update_prompt / toggle_prompt / remove_prompt for row-scoped changes (no setup draft, no list rewrite; in-flight runs keep their frozen prompt set), then run_now when the next scheduled run is too far away and get_prompt_performance with range 1d to check the results. A new prompt is classified into a cohort from its text; add_prompt and update_prompt take an optional kind to override that, and the resolved cohort comes back in the response.
list_promptsEvery tracked prompt with id, text, category, tags, active status, and answer counts, plus the active-prompt limit and the valid categories.
add_promptAdds one prompt (optional category becomes its single tag) and returns the assigned id; a repeated text converges to the existing prompt.
update_promptRewords the text and/or changes the category of one prompt; text is unique per workspace.
toggle_promptEnables or disables a prompt while keeping its history; activation respects the active-prompt ceiling.
remove_promptRetires a prompt that has results (history preserved, re-activatable) and deletes one that has none.
run_nowTriggers an immediate paid collection run over the current active prompt set; administrator accounts only, at most 5 per hour per workspace.
tracking tools · data:write
Brand edits stay in set_brand, which applies immediately to the live brand entity.
add_competitorAdds one tracked competitor: unique name, verified domains, and optional aliases; returns the assigned id.
remove_competitorRemoves a competitor by name; refused when scored results would be destroyed.
list_competitorsThe tracked competitors with id, name, domains, and aliases.
enable_surfaceTurns on one AI surface for the next run; respects the surface ceiling.
disable_surfaceTurns one AI surface off; the last surface cannot be disabled.
03 / connect
The endpoint is always https://api.refd.ai/mcp. Discovery and sign-in are automatic; you approve the workspaces a connection covers.
Add a custom connector (or `claude mcp add --transport http refd https://api.refd.ai/mcp`) and complete the OAuth sign-in.
Settings → Connectors → add a custom MCP server, enter the endpoint, and authorize.
Point a Streamable HTTP MCP client at the endpoint; it discovers auth via the protected-resource metadata. opencode-style configs take `{ "mcp": { "refd": { "type": "remote", "url": "...", "headers": { "Authorization": "Bearer refd_..." } } } }`.
one-click install
claude mcp add-json refd '{"type":"http","url":"https://api.refd.ai/mcp"}' Then run `claude mcp login refd` to complete the OAuth sign-in.
code --add-mcp '{"name":"refd","type":"http","url":"https://api.refd.ai/mcp"}' Adds the server to the user profile; approve the sign-in when prompted.
04 / headless and CI agents
OAuth needs a browser. For CI, cron, servers, and sandboxed agents, Settings → Personal access tokens issues a workspace-scoped, read-only bearer token. It is shown once and stored only as a hash.
create
Generate the token in Settings, scoped to the current workspace. The prefix shown in the dashboard tells tokens apart.
authenticate
The token authenticates exactly like an OAuth grant, rate-limited per token, and revoking it in Settings takes effect on the next request.
smoke test
curl -X POST https://api.refd.ai/mcp \
-H "Authorization: Bearer refd_..." \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"ci","version":"1"}}}' 05 / discovery
MCP endpoint
https://api.refd.ai/mcpStreamable HTTP, OAuth-protected
Protected-resource metadata
https://api.refd.ai/.well-known/oauth-protected-resource/mcpRFC 9728
Authorization-server metadata
https://api.refd.ai/.well-known/oauth-authorization-serverRFC 8414
OpenAPI catalog
https://refd.ai/openapi.jsonPublic HTTP surface
Agent manifest
https://refd.ai/.well-known/agentDiscovery pointers
MCP Registry
ai.refd/refdregistry.modelcontextprotocol.io
Agent skill
https://refd.ai/skills/refd/SKILL.mdInstallable SKILL.md
Prompt set design skill
https://refd.ai/skills/ai-prompt-set-design/SKILL.mdInstallable SKILL.md, tool-neutral
llms.txt
https://refd.ai/llms.txtPlain-text summary
06 / trust and source
refd is MIT licensed and runs on Cloudflare Workers. The open-source guide explains the architecture and self-hosted boundary. Hosted access is covered by the security overview, privacy policy, and terms of service. Connection help lives on the support page.