# GTmetrix — how to use (mcp.ai)

Connect your GTmetrix account and use 20 tools for developer tools straight from your AI agent. Connect with your own API key. GTmetrix is a performance testing and monitoring tool that analyzes website speed, provides detailed performance reports, and helps optimize web applications for better user experience.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_gtmetrix?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `gtmetrix_delete_page`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/gtmetrix`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/gtmetrix/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/gtmetrix/delete/page` — Tool to delete a specific page in GTmetrix. Use when you need to permanently remove a page resource.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/delete/report` — Tool to delete a GTmetrix report. Use when you need to remove an existing performance report from GTmetrix.
  - body: { report_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/browser` — Tool to retrieve browser details from GTmetrix. Use when you need to get information about a specific browser including name, platform, supported features, and testing capabilities.
  - body: { browser_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/browsers` — Tool to retrieve the list of available browsers for GTmetrix performance tests. Use when you need to see which browsers are available and their testing capabilities.
- `POST https://api.mcp.ai/api/gtmetrix/get/location` — Tool to retrieve location details from GTmetrix. Use when you need to get information about a specific GTmetrix test location including name, region, browser support, IP addresses, and access permissi
  - body: { location_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/locations` — Tool to retrieve the list of available GTmetrix test locations. Use when you need to see which locations are available for testing and their details including supported browsers and access status.
- `POST https://api.mcp.ai/api/gtmetrix/get/page` — Tool to retrieve page details from the user's GTmetrix account. Use when you need to get comprehensive page information including URL, testing configuration, and monitoring frequency.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/page/latest/report` — Tool to retrieve the most recent test report for a monitored page in GTmetrix. Use when you need to get the latest performance metrics and timing data for a specific page.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/page/reports` — Tool to retrieve the report list associated with a monitored page in GTmetrix. Use when you need to access historical performance data for a specific page. Supports pagination, sorting, and filtering.
  - body: { sort?: string, filter?: string, page_id: string, page_size?: integer, page_number?: integer }
- `POST https://api.mcp.ai/api/gtmetrix/get/pages` — Tool to retrieve the page list from your GTmetrix account. Returns a paginated collection of monitored pages with their configurations and latest report information. Use when you need to view all moni
  - body: { sort?: string, filter?: string, page_size?: integer, page_number?: integer }
- `POST https://api.mcp.ai/api/gtmetrix/get/report` — Tool to retrieve a GTmetrix test report by its identifier. Use when you need to get comprehensive performance metrics, timing data, and links to resources for a specific report.
  - body: { report_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/report/resource` — Tool to get a report resource such as screenshot, HAR file, video, PDF, or Lighthouse JSON. Use when you need to download specific report artifacts that require API authentication.
  - body: { report_id: string, resource_name: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/simulated/device` — Tool to retrieve simulated device details. Use when you need information about a specific simulated device including its name, category, manufacturer, user agent, screen dimensions, and pixel ratio.
  - body: { simulated_device_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/simulated/devices` — Tool to retrieve the list of simulated devices available in GTmetrix. Use when you need to see available device profiles for testing.
- `POST https://api.mcp.ai/api/gtmetrix/get/status` — Tool to retrieve the current API account state and remaining credits. Use to check available API credits, refill schedule, and account features.
- `POST https://api.mcp.ai/api/gtmetrix/get/test` — Tool to retrieve test details for a specific GTMetrix test. Use when you need to check the status, configuration, or results of a previously initiated test.
  - body: { test_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/get/tests` — Tool to retrieve the test list from your GTmetrix account with pagination and filtering support. Use when you need to view tests with their state, timestamps, and configuration details.
  - body: { sort?: string, page_size?: integer, page_number?: integer, filter_state?: string, filter_browser?: string, filter_created?: string, filter_started?: string, filter_finished?: string, filter_location?: string }
- `POST https://api.mcp.ai/api/gtmetrix/retest/page` — Tool to initiate a retest of a GTmetrix page with same parameters. Use when you need to create a new test using the same parameters as the most recent report for this page.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/retest/report` — Tool to initiate a retest of a completed GTmetrix report with same parameters. Use when you need to rerun a test using the exact same analysis parameters as the original test.
  - body: { report_id: string }
- `POST https://api.mcp.ai/api/gtmetrix/start/test` — Tool to start a new GTmetrix test for a specified URL. Use when you need to analyze website performance with configurable options like location, browser, and throttling.
  - body: { dns?: string[], url: string, video?: integer, report?: string, adblock?: integer, browser?: string, cookies?: string[], location?: string, throttle?: string, allow_url?: string[], block_url?: string[], retention?: integer, user_agent?: string, stop_onload?: integer, browser_dppx?: number, browser_width?: integer, browser_height?: integer, browser_rotate?: integer, simulate_device?: string, httpauth_password?: string, httpauth_username?: string }

## Example prompts
- "What can I do in GTmetrix?"
- "Show me a summary of my GTmetrix account"

## More
- Page: https://mcp.ai/gtmetrix
- Agent spec (llms.txt): https://mcp.ai/gtmetrix/llms.txt
- Postman collection: https://mcp.ai/gtmetrix/postman.json
