GTmetrix integration
GTmetrix tests how fast a web page loads. Start a performance test of any URL from a chosen location and browser, follow it until it completes, then read the report (GTmetrix grade, performance and structure scores, Web Vitals, load timings, page size) and download its screenshot, filmstrip, HAR file, Lighthouse JSON, video or PDF. Manage pages (a URL tested with one set of options): their report history, scheduled monitoring, performance alert conditions and tags, and list the test locations, browsers and simulated devices. Starting or re-running a test and downloading a PDF spend the account's API credits. Left out: the generic report resource route (its analysis options carry the tested page's HTTP auth password and cookies, and it serves tar archives) and the resource summary, whose path the vendor spec and docs give differently. Authentication is HTTP Basic with the API key as user name and an empty password, entered here as one header value: the Base64 of your API key followed by a colon.
Say what should happen.
The workflow builds itself.
What you can do with GTmetrix
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Page tag, 5 operations
create_page_tagCreate page tagPOSTCreates a page tag with a name (unique in the account, 45 characters at most), an optional description and a color. Returns the new tag.delete_page_tagDelete page tagDELETEPermanently deletes a page tag and removes it from every page that carried it. This cannot be undone.get_page_tagGet page tagGETReturns one page tag: name, description and color.list_page_tagsList page tagsGETLists the page tags of the account with their name, description and color.update_page_tagUpdate page tagPOSTChanges a page tag's name, description or color; attributes left out keep their value. Returns the updated tag.
Page, 3 operations
delete_pageDelete pageDELETEPermanently deletes a page with all of its reports and history. This cannot be undone.get_pageGet pageGETReturns one page: URL, browser and location of its analysis options, latest report id and time, report count, monitoring frequency and tag ids.list_pagesList pagesGETLists the account's pages (a page groups the reports of one URL tested with one set of analysis options): URL, browser, location, latest report, report count, monitoring frequency and tags.
Performance alert condition, 3 operations
delete_performance_alert_conditionsDelete performance alert conditionsDELETERemoves all of a page's performance alert conditions, so it no longer triggers alerts.get_performance_alert_conditionsGet performance alert conditionsGETReturns a page's performance alert setup: the conditions (metric, operator, threshold), whether a video is kept on alert, and for Team organizations the recipients' e-mail addresses (personal data).set_performance_alert_conditionsSet performance alert conditionsPOSTReplaces a page's performance alert conditions (at most 10; an empty list removes them) and, for Team organizations, the recipients GTmetrix e-mails when an alert triggers. Returns the new setup.
Report, 3 operations
delete_reportDelete reportDELETEPermanently deletes a report and all of its resources. This cannot be undone.get_reportGet reportGETReturns a report's results: GTmetrix grade and score, performance and structure scores, Web Vitals (LCP, TBT, CLS), load timings, page size and request count, and links to its downloadable resources.list_page_reportsList page reportsGETLists the reports of a page with their grade, scores, Web Vitals, timings and size, newest first by default. GTmetrix allows one filtered or sorted request at a time.
Test, 3 operations
get_testGet testGETReturns a test's state (queued, started, error, completed). Once completed GTmetrix redirects to the report, so this returns the report itself: data.type is report and data.id the report id. Poll every 3 seconds or so.list_testsList testsGETLists the account's tests, which GTmetrix keeps for 24 hours (API-started ones unless filter[source] says otherwise): state, URL, report id once completed, page, location, browser and timestamps.start_testStart testPOSTStarts a GTmetrix performance test of a URL and spends API credits (0.6 to 1.1 by report type, more with video or longer retention). Returns the queued test with its id and the credits used; poll it with get_test.
Browser, 2 operations
get_browserGet browserGETReturns one test browser: name, platform, device and the analysis options it supports.list_browsersList browsersGETLists the test browsers: id, name, platform, device, and which options each supports (Lighthouse, AdBlock, cookies, DNS, URL filtering, HTTP auth, resolution, throttling, user agent, video).
Location, 2 operations
get_locationGet locationGETReturns one test location: name, region, default flag, plan access, supported browser ids, server IPs, servers up and whether it is active.list_locationsList locationsGETLists the test locations: id, name, region, whether it is the default and whether the plan can use it, supported browser ids, server IPs and whether it is up.
Retest, 2 operations
retest_pageRetest pagePOSTStarts a new test of a page with its saved analysis options, spending API credits like start_test. Returns the queued test to poll with get_test.retest_reportRetest reportPOSTStarts a new test with the same settings as the test that produced this report, spending API credits like start_test. Returns the queued test to poll with get_test.
Simulated device, 2 operations
get_simulated_deviceGet simulated deviceGETReturns one simulated device: name, category, manufacturer, screen size, pixel ratio and user agent.list_simulated_devicesList simulated devicesGETLists the devices a test can simulate (simulate_device in start_test): id, name, category, manufacturer, screen size, pixel ratio and user agent.
Attach, 1 operation
attach_tag_pagesAttach tag pagesPOSTAttaches a tag to up to 500 pages at once (pages already carrying it are unaffected) and returns the tag.
Attach tag, 1 operation
attach_page_tagsAttach page tagsPOSTAttaches up to 500 tags to a page (tags already attached are unaffected) and returns the page with its updated tag ids.
Detach, 1 operation
detach_tag_pagesDetach tag pagesPOSTDetaches a tag from up to 500 pages at once and returns the tag.
Detach tag, 1 operation
detach_page_tagsDetach page tagsPOSTDetaches tags from a page and returns the page with its updated tag ids.
Filmstrip, 1 operation
get_report_filmstripGet report filmstripGETReturns the filmstrip of a Lighthouse report: frame count and size, and the screenshots taken during page load with their timing, frame id and download URL.
Filmstrip frame jpg, 1 operation
get_report_filmstrip_frameGet report filmstrip frameGETDownloads one filmstrip frame of a Lighthouse report as a JPEG file, by the frame_id listed by get_report_filmstrip.
Latest report, 1 operation
get_page_latest_reportGet page latest reportGETReturns the latest report of a page, in the same form as get_report: grade, scores, Web Vitals, timings, size and resource links.
Lighthouse, 1 operation
get_report_lighthouseGet report lighthouseGETReturns the report's full Lighthouse result as JSON (every audit with its score and details), extended by GTmetrix with _structureScore, _impactScore and _gtmetrixScore keys. Lighthouse reports only; the answer is large.
Net har, 1 operation
get_report_harGet report harGETReturns the report's HAR file as JSON: every request of the page load with timings and sizes. GTmetrix removes HTTP auth and cookies and trims file contents. The answer can be large.
Performance alert event, 1 operation
list_performance_alert_eventsList performance alert eventsGETLists the performance alerts a page triggered, newest first: time, report id, the conditions breached with their values, and the e-mail addresses notified (personal data).
Performance monitor, 1 operation
set_page_monitoringSet page monitoringPOSTTurns scheduled monitoring of a page on or off, or changes its frequency (hourly, daily, weekly, monthly; no or none turns it off). Needs a free monitoring slot on the plan. Returns the updated page.
Report pdf, 1 operation
get_report_pdfGet report pdfGETDownloads the report as a PDF file and spends API credits: 0.2, or 0.3 with full=1 (the full report with recommendation details). Plans without PDF access are refused.
Screenshot jpg, 1 operation
get_report_screenshotGet report screenshotGETDownloads the screenshot of the tested page from a report, as a JPEG file.
Status, 1 operation
get_statusGet statusGETReturns the API account's state: credit balance, next refill time and amount, plan type and access to PRO options, PRO locations and white-label PDFs. The API key itself is not returned.
Video mp4, 1 operation
get_report_videoGet report videoGETDownloads the MP4 video of the page load. Exists only when the test was started with video set to 1.
Use GTmetrix from Claude Code, Cursor or Codex
Connect GTmetrix in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its GTmetrix operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect GTmetrix
- Create your workspace
Sign up free. Nothing to install.
- Connect GTmetrix once
Add your GTmetrix connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
GTmetrix integration FAQ
What can you do with the GTmetrix integration?
LiveContext exposes 40 operations on GTmetrix, covering page tag, page, performance alert condition and report.
