promptleads-mcp
v0.2.0
Published
MCP server for Promptleads — pull a managed client's AI-visibility report and approved answer-first page fixes into Claude Code, Cursor, Codex, or Claude Desktop over stdio.
Maintainers
Readme
promptleads-mcp
The official Promptleads MCP server. Pull a managed client's AI-visibility report and approved answer-first page fixes straight into Claude Code, Cursor, Codex, or Claude Desktop.
Dependency-free, spec-compliant JSON-RPC over stdio. Scope is the client's white-label share token — no database credentials or API keys live in this process, and only human-approved fixes are ever returned.
npx promptleads-mcpTools
get_page_fixes({ shareToken })— for a code-built site (Claude Code / Cursor / Codex / v0 / Astro / Next.js / Hugo — anything in a Git repo, no CMS): the client's APPROVED answer-first page fixes, ready to apply in the repo. Each returns a title, slug, answer-first sections, the target buyer prompt, and schema.org JSON-LD. Your coding agent writes each page into the repo in the site's own format and opens a PR.get_client_report({ shareToken })— the full report JSON: AI presence with 95% confidence intervals, Maps Share-of-Local-Voice, citation audit, reviews, GBP drafts, AI-readability.summarize_client_report({ shareToken })— a concise human-readable summary.get_competitors({ shareToken })— who the AI engines name instead of the client (share-of-voice leaderboard).get_fix_targets({ shareToken })— missing directory citations, off-site mention targets, AI-readability flags.get_attribution({ shareToken })— AI-referral visitors, conversions, and revenue from the client's own GA4 + Search Console.
The shareToken is the token from a client's white-label report link (/report/<token>), found in
Promptleads under Settings → API & MCP or on the client's report page.
Operator tools (with a workspace API key)
Set a workspace API key (pk_live_…, from Settings → API & MCP) as PROMPTLEADS_API_KEY and four
workspace-scoped tools unlock — run your whole workspace from your AI tool:
list_clients()— your managed clients (id, name, city, vertical, report link).get_client_visibility({ clientId })— a client's AI-visibility summary with 95% CIs.stage_fix({ clientId, topic?, area? })— draft an answer-first page fix and stage it for approval.list_pending_approvals()— the staged actions awaiting a human decision.
The seatbelt: stage_fix only stages a draft — it never approves, publishes, or sends. A human
approves in Promptleads (then it can go live, or be pulled into a repo via get_page_fixes).
Connect
Claude Code
claude mcp add promptleads -- npx -y promptleads-mcpCursor / Codex / Claude Desktop
Add to your MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, or the equivalent):
{
"mcpServers": {
"promptleads": {
"command": "npx",
"args": ["-y", "promptleads-mcp"]
}
}
}Then ask your agent: "Using the promptleads MCP, get the page fixes for share token <token> and apply them to this repo."
To unlock the operator tools, add your workspace API key to env:
{
"mcpServers": {
"promptleads": {
"command": "npx",
"args": ["-y", "promptleads-mcp"],
"env": { "PROMPTLEADS_API_KEY": "pk_live_…" }
}
}
}PROMPTLEADS_API_URL defaults to https://promptleads.vercel.app; set it in env only if you self-host.
How it works
It speaks newline-delimited JSON-RPC on stdio (initialize, tools/list, tools/call, ping), thin over
the public Promptleads report API. The share token is the only scope — treat it like a link-secret.
