sitespeed-mcp-server

myanees284/sitespeed-mcp-server

3.2

If you are the rightful owner of sitespeed-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Sitespeed-MCP Server is a plug-and-play Model Context Protocol (MCP) server built using FastMCP, designed to facilitate performance testing and analysis of Chrome traces from MCP-compatible clients.

Sitespeed-MCP Server

A plug-and-play Sitespeed.io Model Context Protocol (MCP) server built using FastMCP.
It allows you to run performance tests and analyze Chrome traces directly from MCP-compatible clients such as
VS Code (GitHub Copilot MCP), Cline, or Claude Desktop.


Features

ToolDescription
run_sitespeedRun a Sitespeed.io performance test for a given URL
read_sitespeed_dataRead and parse JSON metrics from a test run
analyze_traceExtract long tasks (>50 ms) from Chrome traces
analyze_networkSummarize all network requests (total + unique)
analyze_renderingAnalyze paint/layout/compositing events
analyze_memoryExtract GC and memory events from trace data

Project Structure

.
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py
β”‚   └── services
β”‚       └── runner.py
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
└── sitespeed-results

Build and Run with Docker

Build the image

docker build -t sitespeed-mcp-server .

Run the container

docker run --rm -i \
  -v $(pwd)/sitespeed-results:/app/sitespeed-results \
  sitespeed-mcp-server

All output will be stored under ./sitespeed-results on your host.


Environment Variables

VariableDefaultPurpose
SITESPEED_OUTPUT/app/sitespeed-resultsOutput directory for test results
PYTHONPATH/appPython module path for FastMCP imports

Integration with MCP Clients

GitHub Copilot (MCP Agent Mode in VS Code)

  1. Open Command Palette β†’ β€œMCP: Add Server”
  2. Use this configuration:
{
  "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-v",
                "./sitespeed-results:/app/sitespeed-results",
                "sitespeed-mcp-server"
            ],
            "env": {}
}
  1. Save and reload VS Code.
    Copilot Agent will detect and list all tools.

Claude Desktop / Cline

Edit your MCP config (for example ~/.config/Cline/config.json):

{
  "servers": {
        "sitespeed-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/<your local path>/sitespeed-results:/app/sitespeed-results",
        "sitespeed-mcp-server"
      ]
    }
}

Example Usage

Run a test:

/run_sitespeed https://www.amazon.com/

Read results:

/read_sitespeed_data run-20251007-163744

Analyze trace:

/analyze_trace run-20251007-163744

Development Notes

  • Base image β†’ sitespeedio/sitespeed.io:38.3.0
  • Python runtime β†’ includes fastmcp
  • Entrypoint β†’ fastmcp run ./app/main.py
  • Communication β†’ STDIO (no ports needed)
  • Logs β†’ Sitespeed output streamed via MCP client

Troubleshooting

IssueCauseFix
File not found: /app/app.mainWrong ENTRYPOINTUse ./app/main.py
Data folder not found: /app/sitespeed-results/sitespeed-results/...Duplicate path joinUse os.path.join(BASE_DIR, run_id, "data")
Mounts denied (macOS)Docker path not sharedAdd the path in Docker Desktop β†’ Resources β†’ File Sharing

Publish to Docker Hub

Tag and push

docker tag sitespeed-mcp-server <your repository name>/sitespeed-mcp-server:<your tag>
docker push <your repository name>/sitespeed-mcp-server:<your tag>

Pull and run

docker run --rm -i \
  -v $(pwd)/sitespeed-results:/app/sitespeed-results \
  <your repository name>/sitespeed-mcp-server

License

MIT License Β© 2025 β€” Anees Mohammed