GTmetrix MCP
officialOfficial GTmetrix MCP: run real page performance tests, read reports, track history and manage monitoring from your AI tool. Guest access available; OAuth or API key for full features.
What can you do with GTmetrix MCP?
- Run performance tests — Ask the assistant to test a URL from a chosen location, browser, device, and throttling preset, then return the report.
- Analyze reports — Get GTmetrix grades, Core Web Vitals, and top Lighthouse issues, with HAR and Lighthouse JSON download links.
- Track history and regressions — List your pages with latest scores and pull every report for a page to compare trends over time.
- Manage monitoring and alerts — Turn monitoring on or off and set alert conditions on scores, timings, page size, requests, or CLS.
- Organize pages with tags — Create, rename, attach, or delete tags across up to 500 pages at once.
- Check account and catalogs — See remaining credits and look up available locations, browsers, devices, and throttle presets.
Hosted MCP Server
npx add-mcp 'https://gtmetrix.com/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
GTmetrix MCP
The official GTmetrix MCP server connects your AI tool to GTmetrix so it can run real page performance tests, read reports, track history and manage monitoring, all from a prompt.
No GTmetrix account needed to try it. Connect as a guest and start testing right away. Sign in to unlock more testing and features.
- Server URL:
https://gtmetrix.com/mcp - Transport: Streamable HTTP (remote, nothing to install)
- Auth: Guest (no login), OAuth, or API key via
Authorization: Bearerheader - Works with: Claude, ChatGPT, Codex, Cursor, GitHub Copilot CLI and any MCP-compatible client
Quick start
Option 1: OAuth (recommended)
- Add a new remote MCP server / custom connector in your AI tool.
- Name it
GTmetrixand set the URL tohttps://gtmetrix.com/mcp. - Click Connect / Authenticate.
No API key needed. You can also copy the MCP URL from the MCP Setup section of your GTmetrix Account page.
Using it as a guest
You don't need a GTmetrix account to get started. As a guest you can run tests, read reports and look up locations, browsers and devices, using a limited number of guest credits.
When you run out of guest credits, or want features tied to an account (page history, monitoring, alerts, tags), ask your AI to sign you in. It will call gtmetrix_reauthenticate, and you'll get a sign-in page where you can log in or create a free account.
Option 2: API key
Generate an API key on your GTmetrix Account page, then add it to your client's config.
Claude Code
claude mcp add gtmetrix https://gtmetrix.com/mcp --transport http --header "Authorization: Bearer YOUR_API_KEY"
Codex (config.toml)
[mcp_servers.gtmetrix]
url = "https://gtmetrix.com/mcp"
[mcp_servers.gtmetrix.http_headers]
Authorization = "Bearer YOUR_API_KEY"
JSON config (Cursor and other clients that support remote HTTP servers)
{
"mcpServers": {
"gtmetrix": {
"url": "https://gtmetrix.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
GitHub Copilot CLI (OAuth only)
/mcp add GTmetrix
Set Server Type to HTTP, URL to https://gtmetrix.com/mcp, Tools to *, save, then authenticate in the browser.
Step-by-step guides: Claude · ChatGPT · Codex · Cursor · Copilot CLI
Example prompts
- "Test example.com from London and Sydney on an iPhone over LTE and tell me if performance is comparable."
- "Analyze my latest report for example.com and explain the top 3 issues in plain terms."
- "Give me a health check of all my monitored pages tagged 'client'. Flag anything below a B grade or with LCP over 2s."
- "Compare this week's reports for my checkout page against last month. Did anything regress?"
- "Set up daily monitoring on my homepage and alert me if LCP goes above 2.5 seconds."
- "Fix render-blocking JavaScript on my site, then rerun GTmetrix and confirm the improvement."
Tools
Guests can use the Testing tools (except gtmetrix_get_report_har) and the Account and reference tools. The rest require a GTmetrix account.
Testing
| Tool | What it does |
|---|---|
gtmetrix_start_test | Start a test on a URL. Supports location, browser, simulated device, connection throttling, AdBlock, video, cookies, HTTP auth, URL allow/block lists, viewport size and report retention (1, 6, 12 or 24 months). |
gtmetrix_get_test | Check a running test. Long-polls server-side (up to 30s per call) and returns the report ID when done. |
gtmetrix_get_report | Get a finished report: GTmetrix grade, Performance and Structure scores, Core Web Vitals (LCP, TBT, CLS), top 5 Lighthouse issues ranked by impact, a resource summary, and download links for the HAR and full Lighthouse JSON. |
gtmetrix_get_report_har | Return the HAR waterfall inline, for clients that can't download the HAR URL directly. Size-limited by default. |
History and pages
| Tool | What it does |
|---|---|
gtmetrix_list_pages | List your pages (URL + test settings) with latest scores, Web Vitals, monitoring status and tags. Filter by URL, location, browser, device, throttle, monitoring frequency, tags and more. |
gtmetrix_get_report_history | Get every report for a page, newest first, for trend and regression analysis. |
Monitoring and alerts
| Tool | What it does |
|---|---|
gtmetrix_set_page_monitoring | Turn monitoring on (hourly, daily, weekly, monthly) or off for a page. |
gtmetrix_get_page_alert_conditions | Read a page's alert conditions. |
gtmetrix_set_page_alert_conditions | Set alert conditions on scores, timings (LCP, TTFB, TBT, etc.), page size, requests or CLS. |
gtmetrix_get_page_alert_events | List alerts a page has triggered, with links to the reports behind them. |
Tags
| Tool | What it does |
|---|---|
gtmetrix_list_page_tags | List your tags and how many pages use each. |
gtmetrix_save_page_tag | Create a tag or rename/recolor an existing one. |
gtmetrix_update_page_tags | Attach or detach a tag on up to 500 pages at once. |
gtmetrix_delete_page_tag | Permanently delete a tag. |
Account and reference
| Tool | What it does |
|---|---|
gtmetrix_get_account_status | Show your plan, remaining API credits and next refill date (guests see remaining guest credits). |
gtmetrix_get_catalog | Look up available browsers, locations, simulated devices, throttle presets and Lighthouse audits. |
gtmetrix_get_guide | Read built-in guides on test options, report analysis, HAR analysis and test errors. |
gtmetrix_reauthenticate | Sign in from a guest connection, or switch to a different GTmetrix account. |
Resources
The server also exposes its guides and catalogs as MCP resources:
gtmetrix://docs/test-options-guidegtmetrix://docs/report-analysis-guidegtmetrix://docs/har-analysis-guidegtmetrix://docs/general-test-error-guidegtmetrix://docs/lighthouse-error-guidegtmetrix://catalog/browsersgtmetrix://catalog/locationsgtmetrix://catalog/simulated-devicesgtmetrix://catalog/throttle-connectionsgtmetrix://catalog/lighthouse-audits
Credits and limits
- Anyone can use the MCP. Guests get a limited number of credits; a GTmetrix account gives you more.
- Tests and other actions use API credits at the same rate as the GTmetrix API. Video recording adds 0.9 credits per test.
- Credit allowances depend on your plan. Select PRO plans get daily credit refills. Ask your AI to run
gtmetrix_get_account_statusto see your balance. - Concurrent tests: 2 on Basic, 8 on PRO.
- Some features (more locations, hourly monitoring, video on alerts) depend on your plan.
FAQ
Is this a chatbot? No. It's a connection layer that gives the AI tool you already use access to GTmetrix.
Do I need a GTmetrix account? No. You can connect as a guest and run tests right away. Sign in to unlock more testing and features.
Do I need an API key? Only for manual config. OAuth connections don't need one.
Why aren't my results shown as charts? Rendering depends on your AI tool. Ask it to "visualize this data" after getting a report.
Can it fix issues for me? GTmetrix provides the data and diagnostics. If your AI tool can also edit your code or CMS, it can apply fixes and rerun a test to confirm the result.