mcp
v1.0.3Run web performance audits, get code-level fixes, crawl for SEO, and read real-user Core Web Vitals.
An MCP server that lets AI coding agents (Claude Code, Cursor, Windsurf, or any MCP client) run SpeedVault audits, fetch code-level fixes, crawl whole sites for SEO, and read real-user Core Web Vitals — while they code. It is a thin client over the SpeedVault REST API v2: every tool authenticates with your SPEEDVAULT_API_KEY and calls /api/v2, returning small, agent-friendly summaries (never the full multi-hundred-KB report JSON) so an agent can run an *audit → fix → re-audit* loop without blowing its context window. There are two ways to connect.
Summary extracted from the README.
@speedvault/mcp
An MCP server that lets AI coding agents (Claude Code, Cursor, Windsurf, or any MCP client) run SpeedVault audits, fetch code-level fixes, crawl whole sites for SEO, and read real-user Core Web Vitals — while they code.
It is a thin client over the SpeedVault REST API v2: every tool authenticates with your
SPEEDVAULT_API_KEY and calls /api/v2, returning small, agent-friendly summaries (never the
full multi-hundred-KB report JSON) so an agent can run an audit → fix → re-audit loop without
blowing its context window.
Install
There are two ways to connect. Both use the same sv_… API key and consume the same plan
credits identically — pick whichever fits your setup.
Local vs Remote — which to pick
| Local (stdio via npx) | Remote (hosted HTTP) | |
|---|---|---|
| Install | Pulls @speedvault/mcp via npx (needs Node.js 18+) |
None — just a URL |
| Best for | Full control, offline-capable, runs on your machine | Zero install, works anywhere incl. web-based clients |
| Transport | stdio subprocess | Hosted HTTP endpoint |
Method 1 — Local (stdio via npx)
The one canonical command (Claude Code CLI):
claude mcp add speedvault --env SPEEDVAULT_API_KEY=sv_xxx -- npx -y @speedvault/mcp
For any other MCP client (Cursor, Windsurf, custom hosts), add the server to your MCP config:
{
"mcpServers": {
"speedvault": {
"command": "npx",
"args": ["-y", "@speedvault/mcp"],
"env": {
"SPEEDVAULT_API_KEY": "sv_xxx",
"SPEEDVAULT_API_URL": "https://www.speedvault.io"
}
}
}
}
Restart your client after editing the config. Requires Node.js 18+.
Method 2 — Remote (hosted) — fastest, no install
The fastest path — no Node or npx needed, just connect with a URL. SpeedVault hosts the MCP
server over HTTP at https://www.speedvault.io/api/mcp, authenticated with an
Authorization: Bearer header.
{
"mcpServers": {
"speedvault": {
"url": "https://www.speedvault.io/api/mcp",
"headers": {
"Authorization": "Bearer sv_xxx"
}
}
}
}
In Claude Code, add it as a remote server: point it at the URL
https://www.speedvault.io/api/mcp with an Authorization: Bearer sv_xxx header. The remote
endpoint exposes the same tools and consumes the same plan credits as the local method — only the
transport differs.
Configuration (env)
| Var | Required | Default | Notes |
|---|---|---|---|
SPEEDVAULT_API_KEY |
yes | (unset) | Your sv_… key from Settings → API Keys. The same key powers the REST API and SDKs. |
SPEEDVAULT_API_URL |
no | https://www.speedvault.io |
Base URL of your SpeedVault instance. Override only if you are self-hosting. |
A missing API key does not crash startup — the server still lists its tools; individual tool calls return a friendly "set SPEEDVAULT_API_KEY" error.
Cloud setup: By default the MCP server connects to
https://www.speedvault.io. If you are self-hosting, overrideSPEEDVAULT_API_URLto your own instance. All tool calls go through the REST API v2 — the MCP server is a thin stateless client.
Auditing public URLs only. SpeedVault's audit/crawl path blocks
localhostand private/internal IPs (an SSRF guard on the API). Point your agent at a publicly reachable URL — a deployed app, a Vercel/preview deploy, or a tunnel (e.g. ngrok) — nothttp://localhost:….
Authentication & Credits
Every MCP tool call authenticates via the SPEEDVAULT_API_KEY header (X-API-Key). The key is
tied to a user account and its credit balance.
Credit costs per action
| Action | Tool | Credits |
|---|---|---|
| Run a Lighthouse audit | run_audit |
1 |
| Generate AI performance fixes | get_fix_suggestions (audit, uncached) |
5 |
| AI action plan | (REST API) | 10 |
| AI exec summary | (REST API) | 8 |
| AI chat turn | (REST API) | 1 |
| SEO article | (REST API) | 40 |
| Run a site crawl | crawl_site |
1 per 100 pages |
| Read an audit / crawl / RUM / monitors | get_audit, get_crawl, get_rum, etc. |
free |
| Account status | account_status |
free |
Monthly credits by plan
| Plan | Monthly Credits |
|---|---|
| Free | 25 |
| Solo | 1,000 |
| Starter | 3,000 |
| Growth | 10,000 |
| Enterprise | 50,000 |
Credit packs and per-credit top-ups are also available from Settings > Billing.
402 responses (two kinds)
When a metered tool call cannot proceed, the API returns HTTP 402 with one of two distinct error shapes:
Insufficient credits — the account's credit balance is too low:
{
"error": {
"title": "Insufficient API credits",
"status": 402,
"balance": 0,
"required": 5,
"buyCredits": "/api/billing/credits"
}
}
Spend cap reached — the user has set a daily or monthly spend budget and the call would exceed it:
{
"error": {
"title": "Spend cap reached",
"status": 402,
"cap": 100,
"period": "daily",
"used": 98,
"required": 5,
"raiseCapUrl": "/settings#api-keys"
}
}
Spend caps are set from Settings > Usage & Budgets in the web UI. They let you bound how much an autonomous agent loop can spend per day or per month, protecting against runaway automation. When a cap blocks a call, raise the cap (or wait for the next period) and retry.
Tools (18)
| Tool | When to use | Returns |
|---|---|---|
run_audit |
After changing a page/route, to measure it | Scores (performance/structure), Core Web Vitals (LCP/FCP/TBT/CLS/SI), page weight, top opportunities. Costs 1 credit. |
get_audit |
Re-read or wait on an audit by id | The same condensed audit summary |
list_audits |
See recent audits for the account | Compact list with state + perf score |
get_fix_suggestions |
Get concrete, code-level fixes | Performance fixes (pass auditId) or site-wide SEO/media fixes (pass crawlId), each with how-to + code snippets |
crawl_site |
Whole-site SEO + structure audit | A crawlId; poll get_crawl for grouped, per-template issues. Costs 1 credit. |
get_crawl |
Read a crawl's score + grouped issues | Site score, issue counts, by-template breakdown |
get_seo_issues |
See per-template SEO issues from a crawl | Per-template issue breakdown with prevalence + priority scores |
get_seo_fixes |
Get SEO fix recipes with before/after code | Per-issue fix with how_to_fix, code_snippet, before/after diff |
recheck_template |
Re-crawl after applying fixes | New crawlId for the re-crawl. Costs 1 credit. |
get_rum |
Read real-user field Core Web Vitals | p75 LCP/INP/CLS/FCP/TTFB with sample counts (omit siteKey to list RUM sites) |
get_rum_embed |
Wire RUM into an app you're building | The <script> beacon snippet to paste into <head> |
list_monitors |
See scheduled monitors | URLs under monitoring + latest score |
create_monitor |
Add a URL to scheduled monitoring | The created monitor + cadence |
compare_runs |
Diff two audits before/after | Per-metric delta with improved/regressed flags |
list_domains |
See your verified/pending domains | Domains with status, verification method, linked product counts |
add_domain |
Register a new domain | Verification token + meta-tag/DNS instructions |
verify_domain |
Verify domain ownership | Success/failure + method used (meta_tag or dns_txt) |
account_status |
Check plan, credits, rate limit | Plan, remaining API credits, rate limit, per-product entitlements |
Resources: speedvault://audits/recent, speedvault://status
Prompt: optimize-this-page
The optimize-this-page workflow
The bundled prompt (and the keep-fast skill in skill/) drive a self-correcting loop:
┌──────────────────────────────────┐
page change │ run_audit(url) │
───────►│ pass? ──► report ✅ │
│ fail? ──► get_fix_suggestions │
│ apply the top fixes │
│ (use the code snippets) │◄──┐
└──────────────┬─────────────────────┘ │
└─────────────────────────┘
re-run run_audit
- Audit the page you just built/changed with
run_audit({ url }). - Read the scores, Core Web Vitals, and top opportunities.
get_fix_suggestions({ auditId })for concrete, code-level fixes (with snippets).- Apply the highest-impact fixes to the codebase.
- Re-run
run_auditon the same URL to confirm the score improved. Repeat until it passes.
Use crawl_site → get_fix_suggestions({ crawlId, issue_type }) for whole-site SEO/media fixes,
get_rum for real-user field data, and get_rum_embed to install RUM in an app you're building.
Domain verification required. Before crawling, monitoring, or adding RUM to a domain, you must verify ownership. Use
add_domainto register the domain, add the meta tag or DNS TXT record it returns, then callverify_domain. Uselist_domainsto check status.
Develop
cd mcp-server
npm install
npm run build # tsc → dist/ (compiled, publishable)
npm start # node dist/index.js — waits on stdio
npm run dev # tsx src/index.ts — run from source, no build
npm test # unit tests (no network): verifies the canonical 18-tool surface
Notes
- Node ESM package. Published artifact is compiled JS in
dist/(built viaprepublishOnly). - Output is condensed per call to stay context-friendly for the agent.
- Long-poll audits/crawls respect a
timeout(max 180s); passwait=falseto fire-and-poll.