Speed Up This Summer - 30% off GTmetrix PRO

Deal ends Sept 1, 2026 - get 30% off the first 12 months on all GTmetrix PRO Plans!

GET 30% OFF NOW

GTmetrix Performance Blog

News, updates and guides on GTmetrix and general web performance

How to Connect the GTmetrix MCP to Lovable

We show you how to connect the GTmetrix MCP with Lovable to automate your performance testing workflow.


 

Overview

The GTmetrix MCP can be connected to Lovable to bring real-world testing and performance data straight into your Lovable AI workflow.
 

 
This allows Lovable to analyze live GTmetrix test data, identify bottlenecks, recommend improvements, and even refactor its own generated code based on actual performance results.

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

 


 

How to Connect Lovable to the GTmetrix MCP

Here’s how to get GTmetrix connected to Lovable quickly:
 

Step 1) Add a Custom Connector

From your Lovable Dashboard, expand the left sidebar navigation panel.

Go to Connectors, scroll down and click on Custom MCP.
 

Bring up the “Connectors” menu, then click on “Custom MCP”.

 

Step 2) Input the GTmetrix MCP configuration

Enter the required connection values into the server setup modal:

  • Name: GTmetrix MCP
  • URL: https://gtmetrix.com/mcp
  • Authentication: OAuth (default)

Then, click on Add & Authorize.
 

Enter the required connection values into the server setup modal, and click on “Add & Authorize”.

 

Step 3) Authorize Lovable to Access GTmetrix

A new popup will display asking you to authorize Lovable to connect to GTmetrix.

Log into your GTmetrix account, and click on Allow.
 

Log into your GTmetrix account and click on “Allow” to authorize the connection.

 
If you don’t have a GTmetrix account, you can continue as a Guest, or create one (It’s free!), then click Allow.

You should see the GTmetrix MCP tools once completed.
 

Once connected, you should see the list of GTmetrix MCP tools in your Connectors settings.

 

Guest testing with the GTmetrix MCP

You can still connect the GTmetrix MCP without creating an account, but guest testing is highly limited and requires reauthentication to continue once your API credits are used up.

 

Step 4) Confirm the Connection

You can confirm that the integration is active by typing a confirmation prompt into the Lovable chat interface.

For example:


"Can you see the GTmetrix MCP?"

 

Test the GTmetrix MCP connection with a prompt.

 
Now that Lovable has access to GTmetrix – you can start testing your Lovable website and get results/data and recommendations all within your Lovable chat.

 


 

What Can You Do With GTmetrix in Lovable?

You have access to all GTmetrix MCP tools that allow you to do things like:

  • Start tests and get results
  • Set Analysis Options like location, device, connection speed, etc.
  • Comparing results with different devices (e.g., mobile phones, tablets), connections (e.g., 4G, Broadband), etc.
  • Look up past tests and historical data
  • Get your current account status
  • More here

 

Connecting the GTmetrix MCP to Lovable helps bring robust performance testing directly into the Lovable chat window, allowing Lovable to analyze performance, implement fixes, code changes, and improvements.

 
Because Lovable can inspect both your codebase and the resulting performance reports, it can identify and fix issues throughout the entire application stack, from front-end rendering to backend data delivery.

For example:

  • Image and Video Optimization
  • Code Refactoring for Delivery
  • Script Optimization
  • Database & Query Efficiency
  • Font and Icon Optimizations

This transforms the workflow from simple performance testing into a continuous optimization loop where GTmetrix identifies bottlenecks and Lovable implements the fixes.

And you can make all of this happen conversationally, within your Lovable chat.

Real World Lovable Optimization Example

To show you the possibilities of the GTmetrix MCP-Lovable integration, we created an example website, then tested its performance and optimized it, all from within the chat window. Check out our case study here.

 


 

Summary

The GTmetrix MCP gives Lovable the ability to test, analyze, and improve website performance using real-world data.

Once connected, you can move seamlessly from building to testing and optimization, all without leaving the chat window.

Use this guide to quickly connect the GTmetrix MCP and start optimizing your Lovable project immediately.

 


 

Unlock More API Credits for Lovable Powered Performance Testing

Basic GTmetrix Splash

Run more tests with additional API credits. Use GTmetrix MCP inside Lovable to automate testing, compare results, access history, and apply fixes.

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