Skip to main content
Glama
Sindhura30

Performance Analysis MCP Server

by Sindhura30

Performance Analysis MCP Server

Lightweight MCP server for collecting page performance metrics (Playwright + CDP + Lighthouse) and returning a normalized PerformanceReport.

Prerequisites

  • Node.js (16+ recommended)

  • npm

  • Optional: network access to target URLs

Related MCP server: LightScout MCP

Install

npm install
# Install Playwright browsers (required for collectors)
npx playwright install

Build / Type-check / Test

npm run build
npm run lint
npm test

Run as MCP Server

The default command starts an MCP stdio server with an analyze_page tool.

npm start

The MCP tool accepts:

{ "url": "https://example.com" }

It returns a human-readable summary plus structured PerformanceReport content.

Run HTTP Compatibility Server

The HTTP server is available for local testing and non-MCP clients. You can provide a default URL via DEFAULT_URL or pass a URL in each request.

npm run start:http

With a default URL:

DEFAULT_URL=https://example.com npx ts-node src/index.ts http --no-prompt

Server API

  • GET /health → returns { ok: true }

  • POST /analyze with JSON { "url": "https://..." } → returns analysis JSON plus summary string.

Example using curl (returns JSON file):

curl -s -X POST http://localhost:3333/analyze \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.lowes.com"}' -o report.json

One-off analyze (CLI)

npx ts-node src/index.ts analyze https://www.lowes.com > report.json

The CLI prints JSON followed by a human-readable summary.

Files of interest

  • src/schema/performance-report.ts — canonical schema and validator

  • src/collectors/playwright.ts — Playwright collector

  • src/collectors/cdp.ts — CDP network capture helper

  • src/tools/analyze-page.ts — orchestrates collectors and adapts results

  • src/tools/lighthouse.ts — Lighthouse runner (Phase 2)

  • src/tools/format-report.ts — text formatter for human-friendly output

  • src/server/mcp.ts — MCP stdio server and analyze_page tool

  • src/server/http.ts — HTTP compatibility server

Troubleshooting

  • If Playwright complains about missing browsers, run npx playwright install.

  • If tsc not found, run npm install to install devDependencies.

Next steps

  • Add automated recommendations, persistence, or LLM analysis integration.

Available Tools

1 tool
analyze_pageAnalyze Page PerformanceA
Read-only

Collect page performance metrics for a public http(s) URL using Playwright and CDP.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute public http(s) URL to analyze

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and openWorldHint=true. Description adds that it uses Playwright and CDP, implying a browser launch and network dependency, which is useful context. It does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One concise sentence, front-loaded with action and resource. No extraneous information. Score slightly reduced because it could be grammatically tighter ('Collect' vs 'Collects').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of one parameter, no output schema, and good annotations, the description is fairly complete. It explains what the tool does and its input. Could mention what metrics are collected or typical output format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter 'url' has full schema coverage (100%) with clear description. The tool description does not add new semantics beyond what the schema provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Collect' and resource 'page performance metrics', clearly indicating the tool's function. It specifies the scope 'public http(s) URL' and mentions technology 'Playwright and CDP', leaving no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description explicitly states the tool works with 'public http(s) URL', guiding when to use. No alternatives given, but with no sibling tools, this is sufficient. Could be slightly enhanced with explicit scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion between tools; the purpose is singular and clear.

Naming Consistency5/5

The single tool follows a consistent verb_noun pattern (analyze_page), which is clear and predictable.

Tool Count2/5

The server claims to be a Performance Analysis MCP Server but provides only one tool, which is too few for the implied broader scope. A single tool feels thin and under-scoped.

Completeness2/5

The server covers only basic page performance metrics. Missing tools for audits, comparisons, history, or reporting create significant gaps for a performance analysis server.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI models to perform Google Lighthouse website performance analysis, including Core Web Vitals, accessibility, SEO audits, and actionable optimization recommendations. Provides comprehensive web performance insights through natural language interactions.
    1,354
    3
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Core Web Vitals analysis powered by Lighthouse. Four tools: analyze a URL, compare two URLs, check against thresholds, or crawl an entire site. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible AI tool.
    4
    20
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables web performance analysis using Google PageSpeed Insights and Chrome UX Report APIs, providing compact metrics and diagnostics without local browser automation.
    5
    14
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sindhura30/pageperformance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server