---
title: "How I Connected PageSpeed Insights to Claude with MCP"
description: "Hands-on: connecting PageSpeed Insights to Claude through an MCP server. Google API key, install, the potholes and what the first test found on a live site."
url: "https://it-deweloper.pl/en/blog/pagespeed-insights-mcp"
date: "2026-09-22T15:48:06+00:00"
language: "en-GB"
---

[Skip to main content](#tm-main)

- [ Home](https://it-deweloper.pl/en "IT Deweloper web studio home page")
- [Contact](https://it-deweloper.pl/en/contact "Contact the IT Deweloper web studio")
    - [ +48 731 190 041](tel:+48731190041 "Phone")
    - [ office@it-deweloper.pl](mailto:office@it-deweloper.pl "E-mail")
    - [ Nowogródzka 4A, Białystok, Poland](https://maps.app.goo.gl/BNjvryytwRyv4omA7 "Address")
    - [ WhatsApp](https://wa.me/48731190041 "WhatsApp")
    - [ Telegram](https://t.me/+48731190041 "Telegram")
- [Solutions](https://it-deweloper.pl/en/web "IT Deweloper's web development solutions")
    - [How we workStages of work](https://it-deweloper.pl/en/web/process "Website development stages and timelines")
    - [SEOSearch engine optimization](https://it-deweloper.pl/en/web/seo "SEO promotion: optimization, links, positions in Google")
    - [GEOWebsite promotion in AI](https://it-deweloper.pl/en/web/geo "GEO optimization: website promotion in ChatGPT, Gemini and Perplexity answers")
    - [AIArtificial Intelligence on the website](https://it-deweloper.pl/en/web/ai)
    - [JoomlaWebsite Management System](https://it-deweloper.pl/en/web/joomla "Joomla website development")
- [Cost](https://it-deweloper.pl/en/cost "Rates and cost of services")
    - [PricingIndicative website development prices](https://it-deweloper.pl/en/cost/pricing "Website development prices")
    - [CalculatorSelf-service online estimate](https://it-deweloper.pl/en/cost/calculator "Calculate your website cost online")
    - [BriefGet an accurate project quote](https://it-deweloper.pl/en/cost/brief "Fill out the website development brief")
- [Portfolio](https://it-deweloper.pl/en/portfolio "Portfolio and examples of our work")
- [About us](https://it-deweloper.pl/en/about "About the founder — Victor Parhimchik")
- [FAQ](https://it-deweloper.pl/en/faq "Frequently asked questions about website development")
- [Blog](https://it-deweloper.pl/en/blog "Articles on website development and promotion")
- [ Русский ](https://it-deweloper.pl/ru/blog/pagespeed-insights-mcp)
- [ Polski ](https://it-deweloper.pl/pl/blog/pagespeed-insights-mcp)
- [ Беларуская ](https://it-deweloper.pl/be/blog/pagespeed-insights-mcp)
- [ English ](https://it-deweloper.pl/en/blog/pagespeed-insights-mcp)

  <a class="uk-search-toggle uk-display-block" href="/" uk-search-icon=""></a>

- <a href="/"> ![](https://it-deweloper.pl/templates/yootheme/assets/images/language.svg)  English  </a>
    - [ Русский ](https://it-deweloper.pl/ru/blog/pagespeed-insights-mcp)
    - [ Polski ](https://it-deweloper.pl/pl/blog/pagespeed-insights-mcp)
    - [ Беларуская ](https://it-deweloper.pl/be/blog/pagespeed-insights-mcp)
    - [ English ](https://it-deweloper.pl/en/blog/pagespeed-insights-mcp)

 [ ![IT-Deweloper](https://it-deweloper.pl/images/Faviocon.svg)![IT-Deweloper](https://it-deweloper.pl/images/Logo-light.svg)](https://it-deweloper.pl/en) [ Menu

 ](#tm-dialog)

- [ Home](https://it-deweloper.pl/en "IT Deweloper web studio home page")
- [Contact](https://it-deweloper.pl/en/contact "Contact the IT Deweloper web studio")
    - [ +48 731 190 041](tel:+48731190041 "Phone")
    - [ office@it-deweloper.pl](mailto:office@it-deweloper.pl "E-mail")
    - [ Nowogródzka 4A, Białystok, Poland](https://maps.app.goo.gl/BNjvryytwRyv4omA7 "Address")
    - [ WhatsApp](https://wa.me/48731190041 "WhatsApp")
    - [ Telegram](https://t.me/+48731190041 "Telegram")
- [Solutions](https://it-deweloper.pl/en/web "IT Deweloper's web development solutions")
    - [How we workStages of work](https://it-deweloper.pl/en/web/process "Website development stages and timelines")
    - [SEOSearch engine optimization](https://it-deweloper.pl/en/web/seo "SEO promotion: optimization, links, positions in Google")
    - [GEOWebsite promotion in AI](https://it-deweloper.pl/en/web/geo "GEO optimization: website promotion in ChatGPT, Gemini and Perplexity answers")
    - [AIArtificial Intelligence on the website](https://it-deweloper.pl/en/web/ai)
    - [JoomlaWebsite Management System](https://it-deweloper.pl/en/web/joomla "Joomla website development")
- [Cost](https://it-deweloper.pl/en/cost "Rates and cost of services")
    - [PricingIndicative website development prices](https://it-deweloper.pl/en/cost/pricing "Website development prices")
    - [CalculatorSelf-service online estimate](https://it-deweloper.pl/en/cost/calculator "Calculate your website cost online")
    - [BriefGet an accurate project quote](https://it-deweloper.pl/en/cost/brief "Fill out the website development brief")
- [Portfolio](https://it-deweloper.pl/en/portfolio "Portfolio and examples of our work")
- [About us](https://it-deweloper.pl/en/about "About the founder — Victor Parhimchik")
- [FAQ](https://it-deweloper.pl/en/faq "Frequently asked questions about website development")
- [Blog](https://it-deweloper.pl/en/blog "Articles on website development and promotion")

  [ IT Deweloper Blog ](https://it-deweloper.pl/index.php?option=com_content&view=category&id=29&lang=en-GB "IT Deweloper Blog")

#  How I Connected PageSpeed Insights to Claude with MCP

In September 2026 I connected PageSpeed Insights to Claude through an MCP server. Checking website speed by hand always goes the same way: open the report, wait for the test, wade through a dozen metrics, and a week later forget what the numbers were. I wanted to hand that job to an assistant: let it run the test, compare pages and explain what is slowing the site down. Below is the whole path: the Google key, the installation, registering the server in Claude Code, the first results on our own site and the potholes I hit.

---

![A terminal window and the PageSpeed Insights logo with a speedometer: connecting website speed testing to an AI assistant](https://it-deweloper.pl/images/blog/pagespeed-insights-mcp-cover-2x.webp#joomlaImage://local-images/blog/pagespeed-insights-mcp-cover-2x.webp?width=2400&height=2400)

## What this server is and why bother

MCP (Model Context Protocol) is an open protocol that lets an AI assistant call external tools; I covered it in more detail in the post about [connecting Search Console](https://it-deweloper.pl/en/blog/google-search-console-mcp). What matters here is simple: an MCP server is a go-between program on your computer. On one side it talks to the assistant, on the other it queries the Google PageSpeed Insights API, the same Lighthouse engine that powers the report on the PageSpeed website. Claude asks for a test on its own, gets the numbers and interprets them, and all I have to do is ask questions in plain words.

The server also does things the web version does not: it compares two pages, tests up to ten addresses at once, and stores a baseline measurement to check new results against.

## Which server I chose and what I checked before installing

I picked **pagespeed-insights-mcp**, an npm package written in TypeScript, version 2.1.0. Three things decided it:

- **Six clear tools instead of a sprawl.** Page analysis, diagnosis through a single “lens”, real-user data, comparison, batch testing and a cache reset. Nothing extra.
- **Ready-made reports for the task.** Instead of Google’s raw 850 KB response you get a summary, a fix list sorted by importance or a breakdown of render-blocking resources. That is easier for the model and uses fewer tokens.
- **Short, readable code.** You can review it in an evening instead of guessing what someone else’s program does.

I read all of the code before installing, which is my habit with any MCP server. It is licensed under Apache-2.0. The network footprint is two Google addresses only: the PageSpeed Insights service and Chrome UX Report. The API key is stripped from logs and error messages, retries back off with growing pauses, no more than three requests run in parallel, and responses are cached for an hour. Why this kind of review is not a formality is covered in the post [on AI tool security](https://it-deweloper.pl/en/blog/ai-tool-security-check).

## Step 1. The Google key: separate and restricted

The service is free but will not run without a key: the shared anonymous quota is used up, and my very first request returned error 429, meaning the request limit was exceeded. You need an API key from a Google Cloud project.

1. In your Google Cloud project, enable the **PageSpeed Insights API**. I already had a project, the same one used for Google Analytics and Search Console, and this API was already enabled in it.
2. Under “Credentials”, create an **API key** and give it a clear name.
3. In the key restrictions, choose “Restrict key” and tick the interfaces you need, instead of leaving “Don’t restrict key”.

I did not extend any of the project’s existing keys: each has its own job, and the key for indexing should not be able to reach speed tests. A separate key is also a separate revocation: if something goes wrong you switch off one key instead of working out which services depend on it. I set no restriction by IP address or website, since the server runs on my computer with a changing address.

One pitfall cost me an extra round: the **Chrome UX Report API**, which provides real-visitor data, is switched off in the project by default, even when PageSpeed already works. Until you enable it and add it to the key restrictions, the real-user tool answers with a 403 and the reason `API_KEY_SERVICE_BLOCKED`. Checking this with a direct request to the API is more reliable than guessing from the server’s message.

## Step 2. Installation

You need Node.js version 20.19 or newer. Check it:

```
node --version
```

Install the package globally:

```
npm install -g pagespeed-insights-mcp
```

The installation took about 20 seconds and pulled in 127 dependency packages. A program called `pagespeed-insights-mcp` appeared on the command line, and that is the server. You do not need to start it by hand: Claude launches it.

## Step 3. Registering it in Claude Code

The key is passed through an environment variable. In PowerShell:

```
$k = "your_google_key"
claude mcp add `
  pagespeed-insights -s user `
  -e "GOOGLE_API_KEY=$k" `
  -e NODE_ENV=production `
  -- pagespeed-insights-mcp
```

The `-s user` flag writes the entry to the user configuration rather than the project file: the project folder syncs to the cloud, and the key has no business being there. `NODE_ENV=production` switches the logs from coloured text to compact JSON, which is easier to analyse if something goes wrong. Now check it:

```
claude mcp list
```

“Connected” appeared next to `pagespeed-insights`. Then came the story familiar from Search Console: an already open session has no new tools, because the list is loaded at start. Also, “Connected” only means the process started and answered the handshake, not that the key works and the API is enabled. So I first tested the key with an ordinary request to the PageSpeed API: a 200 response and a full report for the home page. Only then did I open a new session.

## The six tools in plain words

- **Page analysis.** A full Lighthouse test: scores for speed, accessibility, SEO and best practices. You can ask for a summary, a full breakdown or a fix list by priority.
- **Diagnosis.** One “lens” of your choice: render-blocking resources, images, scripts, third-party code, network, visual loading, page elements.
- **Real-user data.** Metrics from the Chrome UX Report: what live visitors experience, not a lab measurement.
- **Comparison.** Two pages against each other, or a page against its own earlier measurement; the baseline is stored in a file in the user’s home folder.
- **Batch testing.** Up to ten addresses in one call, with a summary for each.
- **Cache reset.** The server keeps responses for an hour; after you change the site, reset the cache or you will get an old measurement.

## What the first run showed on my own site

I tested the studio’s home page with the mobile profile. Scores: performance 66–71 out of 100 (varying between runs), accessibility 90, best practices 100, SEO 100. The weakest spots among Google’s main metrics (Core Web Vitals) were the time until the main block appears (LCP), 5.0–5.3 s against a target of 2.5 s or less, and the layout shift during loading (CLS), around 0.13 against a target of 0.1 or less.

The render-blocking diagnosis named ten files: template styles and scripts the browser must download before it can show the page. Together they delayed rendering by about 1.9 s. The heaviest were the theme’s main stylesheet (about 81 KB) and the UIkit script (about 50 KB). On top of that came unused code, roughly 101 KB of styles and 49 KB of scripts, and, as a separate line, needless redirects costing about 0.75 s. This is the page builder’s template, not my own code, so the fix lies in build and cache settings rather than in editing files.

Testing two pages at once showed a spread that is easy to miss by hand: the home page scored 69 and the SEO page 85 (LCP 3.2 s, no layout shifts). Comparing the Russian and English home pages gave 66 versus 71. The Chrome report returned no real-user data for the domain, only “insufficient traffic”. For a small site that is normal, not a fault: only addresses with enough Chrome visits make it into the report.

## The potholes I hit

- **429 without a key.** Google’s anonymous quota is shared and almost always used up, so “trying it without a key” is not an option.
- **403 on real-user data.** A key restricted to one interface will not let another through: enable the Chrome UX Report API separately and add it to the key restrictions.
- **No new tools in the old session.** After `claude mcp add`, open a fresh session.
- **Scores wander.** The measurement is a lab test on a reference phone, and a few points of difference between runs is normal: I got 66 and 71 on the same page. One run proves nothing. The tools have a “number of runs” parameter (up to five), and the server itself waits about a minute between runs, otherwise Google would return the same result.
- **A one-hour cache.** Fixed the site? Reset the server’s cache before measuring, or you will be comparing yourself with yourself.
- **The “changes data” flag on comparison is about a local file.** It refers only to the baseline file in your home folder. The tool does not touch your site or any Google service.

## What proved useful and what did not

- **Works right away:** finding the causes of slowness, a fix list by importance, comparing pages of one site, batch testing. The assistant picks the right tool for the question and translates the report out of jargon.
- **Needs preparation:** real-user data means enabling one more API and having enough traffic.
- **With caveats:** this is measuring, not treating. The server changes nothing on the site. It shows what slows it down, and fixing it is still up to you or a developer. What you gain is a fix list in a minute instead of half an hour in a report.
- **Always remember:** only public pages are tested. A customer account or anything behind a password is invisible to the service.

## Quick checklist

1. Make sure Node.js 20.19 or newer is installed.
2. Enable the PageSpeed Insights API (and the Chrome UX Report API if you want real-user data).
3. Create a separate API key and restrict it to the interfaces you need.
4. Install the `pagespeed-insights-mcp` package with npm.
5. Register the server with `claude mcp add` in the user scope.
6. Test the key with an ordinary request and open a new Claude session.
7. For a before-and-after comparison, ask for three to five runs instead of one.

If you would rather not walk this path yourself, we can [connect PageSpeed Insights to an AI assistant for you](https://it-deweloper.pl/en/web/ai/pagespeed-ai) — on your computer or in your company cloud.

21 September 2026 | [Victor Parhimchik](https://it-deweloper.pl/index.php?option=com_contact&view=contact&id=1&catid=4) | [IT Deweloper Blog](https://it-deweloper.pl/index.php?option=com_content&view=category&id=29)

 [ ![A terminal window and the PageSpeed Insights logo with a speedometer: connecting website speed testing to an AI assistant](https://it-deweloper.pl/images/blog/pagespeed-insights-mcp-cover.webp#joomlaImage://local-images/blog/pagespeed-insights-mcp-cover.webp?width=1200&height=1200)

### How I Connected PageSpeed Insights to Claude with MCP

In September 2026 I connected PageSpeed Insights to Claude through an MCP server. Checking website speed by hand always goes the same way: open the r…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=167:pagespeed-insights-mcp&catid=29&lang=en-GB)

 [ ![Email logo with an AI check mark — an AI agent sorting a company's incoming mail](https://it-deweloper.pl/images/AI/ai-email-agent-cover-v2.webp#joomlaImage://local-images/AI/ai-email-agent-cover-v2.webp?width=1200&height=1200)

### An AI Agent on a Company Inbox: How I Set It Up

Our studio's inbox drowns in adverts and cold offers just as thoroughly as anyone else's. I wanted to find out in practice whether an AI agent plugge…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=159:ai-email-agent-setup&catid=29&lang=en-GB)

 [ ![A keyword planner card with search volumes, a terminal window and an AI mark: wiring Google Keyword Planner into an assistant](https://it-deweloper.pl/images/blog/keyword-planner-mcp-setup-cover.webp#joomlaImage://local-images/blog/keyword-planner-mcp-setup-cover.webp?width=1200&height=1200)

### Google Keyword Planner via MCP: how I wired it into Claude

In September 2026 I wired Google Keyword Planner into Claude over MCP: choosing a server, OAuth, registering the tool — and a 403 caused by Google's…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=142:keyword-planner-mcp-setup&catid=29&lang=en-GB)

 [ ![Search Console, an MCP server and an AI assistant linked in a chain on a workstation screen](https://it-deweloper.pl/images/blog/google-search-console-mcp-cover.webp#joomlaImage://local-images/blog/google-search-console-mcp-cover.webp?width=1200&height=1200)

### How I Connected Google Search Console to Claude with MCP

In September 2026 I connected my site’s Google Search Console to Claude through an MCP server. The trigger was mundane: junk URLs were sitting in the…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=135:google-search-console-mcp&catid=29&lang=en-GB)

 [ ![An anonymous installer and a profile with no track record lead either to a safe tool or to a threat](https://it-deweloper.pl/images/blog/ai-tool-security-check.webp#joomlaImage://local-images/blog/ai-tool-security-check.webp?width=1200&height=1200)

### AI Access to Your Site and Computer: Tool or Threat?

In autumn 2026, dozens of modules are appearing at once that give AI assistants direct access to a computer, website and inbox — they're called MCP s…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=124:ai-tool-security-check&catid=29&lang=en-GB)

 [ ![Two website windows and a forking path with arrows: choosing between two content management systems](https://it-deweloper.pl/images/blog/joomla-vs-wordpress-cover.webp#joomlaImage://local-images/blog/joomla-vs-wordpress-cover.webp?width=1200&height=1200)

### Joomla vs WordPress in 2026: an honest comparison

WordPress runs 40.7 % of all websites in the world. Joomla runs 1.1 %. A fortyfold difference. And yet the site you are reading right now is built on…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=119:joomla-vs-wordpress&catid=29&lang=en-GB)

 [ ![Five access channels to a website: CMS, files, database, browser and project memory](https://it-deweloper.pl/images/blog/claude-joomla-integration-cover.webp#joomlaImage://local-images/blog/claude-joomla-integration-cover.webp?width=1200&height=1200)

### Connecting Claude to a production Joomla site

On 8 September 2026 our website gained nineteen new articles in four languages — with structured data, language links and meta tags. In a single work…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=115:claude-joomla-integration&catid=29&lang=en-GB)

 [ ![A checklist of website requirements, a consent banner with two buttons and a data protection shield](https://it-deweloper.pl/images/blog/company-website-legal-requirements-cover.webp#joomlaImage://local-images/blog/company-website-legal-requirements-cover.webp?width=1200&height=1200)

### A company website in Poland: what the law requires

A company website in Poland is not just design and copy. There is a set of things that must be on it: company details in a defined scope, a privacy p…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=111:company-website-legal-requirements&catid=29&lang=en-GB)

 [ ![Facts from a company website feed into an AI assistant answer listing firms](https://it-deweloper.pl/images/blog/ai-answers-about-your-company-cover.webp#joomlaImage://local-images/blog/ai-answers-about-your-company-cover.webp?width=1200&height=1200)

### What AI says about your company: a half-hour check

Customers scroll through ten blue links less and less. They ask ChatGPT "who builds websites in Warsaw", or they see Google's ready-made answer above…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=107:ai-answers-about-your-company&catid=29&lang=en-GB)

 [ ![An invoice with the NIP field highlighted passes into the state system with a QR code](https://it-deweloper.pl/images/blog/ksef-sklep-strona-cover.webp#joomlaImage://local-images/blog/ksef-sklep-strona-cover.webp?width=1200&height=1200)

### KSeF: what your website and shop must handle

KSeF is discussed as an accounting topic, but most of the work lands on the website. It is the shop that has to recognise whether a business or a con…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=103:ksef-sklep-strona&catid=29&lang=en-GB)

 [](#)

 [](#)

   ##  Build your website

Find out what your website will cost

 [ Pricing ](https://it-deweloper.pl/index.php?Itemid=262&lang=en-GB)

 ![](https://it-deweloper.pl/media/yootheme/cache/3c/background-square-01-3c44c74f.png?src=images/yootheme/demo/background-square-01.png&thumbnail=900,900,&hash=72c31958)

 ![](https://it-deweloper.pl/media/yootheme/cache/cb/background-square-03-cbb341a0.png?src=images/yootheme/demo/background-square-03.png&thumbnail=600,600,&hash=6e9dde93)

###  [ Contact ](https://it-deweloper.pl/index.php?Itemid=277&lang=en-GB)

Web studio IT Deweloper website development, Poland. 5423493188

 SEOAIAdsWebSMM

### Address

Nowogródzka 4A
 Białystok, 15-490, PL

 [

### Phone

+48 731 190 041

 ](tel:+48731190041)

 [

### Email

This email address is being protected from spambots. You need JavaScript enabled to view it.

 ](mailto:office@it-deweloper.pl)

 [

### WhatsApp

 ](https://wa.me/48731190041)

 [

### Telegram

 ](https://t.me/+48731190041)

 Opening hours:

- Monday

    0900–1800
- Tuesday

    0900–1800
- Wednesday

    0900–1800
- Thursday

    0900–1800
- Friday

    0900–1800
- Saturday

    0900–1600
- Sunday

    closed

 ![IT Deweloper](https://it-deweloper.pl/images/Logo.webp)

Web development can be interesting! Our social media, with content about building websites.

- [](https://www.facebook.com/ITdeweloper)
- [](https://www.linkedin.com/company/it-deweloper)
- [Portfolio](https://it-deweloper.pl/index.php?Itemid=264&lang=en-GB)
- [Contact](https://it-deweloper.pl/index.php?Itemid=277&lang=en-GB)
- [About us](https://it-deweloper.pl/index.php?Itemid=261&lang=en-GB)

**it-deweloper** — a web development studio.
We design and build modern websites and online stores.

© [it-deweloper](https://it-deweloper.pl/).
All rights reserved.

[Privacy Policy](https://it-deweloper.pl/index.php?Itemid=313&lang=en)
