惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
V
V2EX
B
Blog RSS Feed
有赞技术团队
有赞技术团队
博客园 - Franky
美团技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
云风的 BLOG
云风的 BLOG
L
LangChain Blog
GbyAI
GbyAI
The Cloudflare Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
博客园 - 【当耐特】
The Register - Security
The Register - Security
大猫的无限游戏
大猫的无限游戏
D
Docker
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
N
Netflix TechBlog - Medium
博客园_首页
A
About on SuperTechFans
J
Java Code Geeks
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Recent Announcements
Recent Announcements
G
Google Developers Blog
小众软件
小众软件
博客园 - 叶小钗
WordPress大学
WordPress大学
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
F
Full Disclosure
Jina AI
Jina AI
H
Help Net Security

How to Guides Archives - GTmetrix

How to Connect the GTmetrix MCP With Codex - GTmetrix How to Connect the GTmetrix MCP With GitHub Copilot CLI - GTmetrix How to Connect the GTmetrix MCP With ChatGPT - GTmetrix How to Connect the GTmetrix MCP With Cursor - GTmetrix Introducing GTmetrix MCP: What It Is, How It Works, and Why It Matters - GTmetrix Image Optimization With Imagify Using GTmetrix History Exports in Google Sheets WordPress Optimization Using WP Rocket WordPress Optimization Guide How to properly size images How to avoid multiple page redirects
How to Connect the GTmetrix MCP With Claude - GTmetrix
Varun · 2026-06-17 · via How to Guides Archives - GTmetrix

We show you how to connect the GTmetrix MCP with Claude.


Overview

The GTmetrix MCP can be connected to Claude in order to integrate GTmetrix workflow directly into Claude.

In this guide, we’ll show you how to connect the GTmetrix MCP to Claude with step-by-step instructions.


Connecting GTmetrix MCP to Claude

There are 3 primary ways to connect the GTmetrix MCP to Claude:

  • Using OAuth on Claude Desktop/Browser
  • Using JSON on Claude Desktop
  • Command line for Claude CLI

Note for Organizational/Company Accounts

If you are using an organization-managed Claude account, your administrator may restrict the adding of Custom Connectors.

Reach out to your IT team add the GTmetrix MCP to the Organization Settings, or install the MCP via JSON on your local machine.

We provide step-by-step guidance for each method below:
 


 

Using OAuth on Claude Desktop/Browser

The simplest and quickest method to connect to the GTmetrix MCP is by using OAuth – you can connect with just a few clicks.

Note that the connection procedure is the same on both the desktop app and the browser version.
 

1) Click Customize on the Sidebar

 

 

2) Click Connectors, then the “+” button on the top right

 

 

3) Click “Add custom connector”

 

 

4) Enter MCP details

Name: GTmetrix
Remote MCP server URL: https://gtmetrix.com/mcp

No Advanced settings needed, so they leave those as-is. Click Add once you’ve entered the required details.
 

 

5) Click the Connect button

Link your GTmetrix Account by clicking the Connect button. This will launch a new browser window asking you to log into GTmetrix.
 

 

6) Authorize your Connection

  • Log into your GTmetrix account
  • Click Allow to authorize your connection

 

 
A success screen should appear when the connection is successfully established.
 

 

7) Restart/Open Claude

You’ll see the GTmetrix MCP now active with various tools.
 

 

8) Confirm Connection

To confirm, start a new chat and ask Claude if it can see the GTmetrix MCP tools.
 

 
If Claude responds with a list of GTmetrix tools, you know that the connection was successful and you can now start interacting with Claude and get it to use GTmetrix.
 


 

Using JSON on Claude Desktop

If you prefer to manually configure the GTmetrix MCP server in your Claude Desktop configuration files, you can do so with the instructions below.

Note: These instructions are for Windows devices only – For Mac/Linux, please use our General Instructions prompt.
 

1) Generate a GTmetrix API key

Using a JSON config to connect to the GTmetrix MCP requires an API Key. Go to your GTmetrix Account page and click Generate API Key if you don’t already have one.
 

 
Copy your API key and keep it aside safely as you’ll need it to set up the MCP connection.
 

 
For security reasons, the screenshot above says YOUR_API_KEY but your Account page will display your actual API key.
 

2) Install Node.js

Claude Desktop requires Node.js to be installed to execute npx and mcp-remote commands.
Download Node.js and install it for your appropriate OS.

3) Open Claude Desktop and go to Settings → Developer

 

 

4) Click Edit Config and locate the claude_desktop_config.json file

 

 
Windows Explorer will pop up and display the location of the claude_desktop_config.json file
 

 

5) Edit the claude_desktop_config.json file

Open the claude_desktop_config.json file with a text editor.

Note that this config file may already contain other code – so be mindful of brackets.

Add the below code inside the global {}. The main JSON code should be within the "mcpservers":{}.


 "mcpServers": {
    "gtmetrix": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "[email protected]",
        "https://gtmetrix.com/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }

where YOUR_API_KEY is the API key you copied from your Account page.

Read our troubleshooting guide for JSON formatting if you’re having issues.

6) Save the config file and restart Claude Desktop

Save the config file, then quit the Claude Desktop app entirely and restart it to apply the changes (for browser, close the tab and open a new Claude session).

 

 

7) Confirm Connection

Start a new chat and ask Claude if it can see the GTmetrix MCP tools.
 

 
If Claude responds with a list of GTmetrix tools, that is confirmation that the connection was successful, and you can now start interacting with Claude and get it to use GTmetrix.
 


 

Command line for Claude CLI

Use this command in your terminal to install the GTmetrix MCP server with Claude CLI:


claude mcp add gtmetrix https://gtmetrix.com/mcp --transport http --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with the API Key generated from your Account page.


Troubleshooting

Try these tips if you’re encountering issues connecting with the GTmetrix MCP.

1) Ensure you restart Claude Desktop properly

After connecting to the GTmetrix MCP (or editing the config file), make sure to quit the App entirely (close the window, quit the app from your taskbar, etc.) and restart to apply the changes.

For Claude Browser, close and reopen the tab to start a new session.
 

2) JSON editing tips/caveats

If you’re editing your JSON config file to connect to the GTmetrix MCP, note some caveats:

a) You may need to flush your npx cache

You can use command npm cache clean --force to do so
Verify with command npm cache verify that the cache is empty

b) Mind the curly brackets } and commas

You must ensure that the mcpServer block adheres to the structure/content already in place of your config file

  1. Ensure your code is within the first bracket of the JSON file
  2. If you do not have an "mcpServers": {...} section, you can add the entire block to the top (in pink)
    • Ensure a comma is added in the last bracket },
  3. The GTmetrix MCP code (in blue) should be inside the "mcpServers" : {...} section
  4. Save and restart Claude

c) The provided JSON code is specific to Claude Desktop on Windows

If you’re on a Mac or Linux machine, or if you’re facing general issues with the JSON config setup, we’d suggest copying the General Instructions Prompt on the Account page:

  • Visit your Account page and locate the MCP Setup dropdown
  • Select “JSON with API key” from the dropdown, then copy the prompt and paste it in Claude to get setup instructions
  • Note that as a security measure, the screenshot below shows YOUR_API_KEY, in place of the actual API key shown on your Account page
  • When pasting the prompt in Claude, make sure not to paste your actual API key – your API key should only be used in the code that you insert in the JSON file

Select “JSON with API key” from the dropdown and copy the prompt to use in Claude or your preferred AI tool.


 

Follow the instructions your AI tool provides to get up and running with the GTmetrix MCP.


Summary

Connecting the GTmetrix MCP to Claude is quick, simple, and can be done in multiple ways:

  • Oauth authentication
  • Editing the JSON config
  • Command Line Interface (CLI)

Use the GTmetrix MCP connection to bring your GTmetrix workflows directly into Claude.

Get Claude to start GTmetrix tests, test in different scenarios (locations/devices/connection speeds, etc.), compare results, and help you understand what’s slowing down your page and how to fix them.

Give this a try and let us know if you run into any bugs or issues.


Unlock More API Credits for Claude Powered Performance Testing

Basic GTmetrix Splash

Run more tests with additional API credits. Use GTmetrix MCP inside Claude to automate testing, compare results, access history, and surface actionable insights.

Available with select PRO plans (excluding Lite plan).

Other features include: Priority access for tests, More Monitored Slots, Access to more locations, Remote Location Monitoring, Complete Mobile testing suite, and more!


Upgrade to PRO today