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 and start the one onboarding report, and no grant can delete data, manage billing, or start further runs. 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: Nine 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.
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.
get_competitor_landscapeHow the brand ranks against the competitors it tracks.
get_prompt_performancePer-prompt visibility, broken down by AI surface.
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.
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; no grant can delete data,
manage billing, or start further runs.
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.
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
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.