Skip to main content
Glama
README.md
# PageSpeed Ultra MCP (WordPress, Elementor & Technical SEO)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org)
[![MCP](https://img.shields.io/badge/Protocol-MCP-purple)](https://modelcontextprotocol.io)
[![Release](https://img.shields.io/github/v/release/ndrean-id/pagespeed-ultra-mcp?color=brightgreen)](https://github.com/ndrean-id/pagespeed-ultra-mcp/releases)

> **High-Performance Model Context Protocol (MCP) server engineered for WordPress, Elementor & Modern Web Technical SEO. Enforces zero Cumulative Layout Shift (CLS), zero Total Blocking Time (TBT), and 100/100 Google Core Web Vitals.**

Inspired by the speed and architectural benchmarks of **SastraPro** (by Mas Sugeng), this MCP server equips AI coding agents (**Claude Code, Cursor, Antigravity IDE, Cline, Claude Desktop**) with tools to audit, generate, and optimize web layouts for extreme Google PageSpeed scores.

---

## šŸ“¦ Free Starter Templates (.json) for Beginners

Don't want to use AI terminal commands? You can directly download our pre-optimized, ready-to-import Elementor Flexbox templates:

| Template | File Path | Use Case |
| :--- | :--- | :--- |
| **SastraPro Clean Article** | [`templates/sastra-article-starter.json`](templates/sastra-article-starter.json) | Clean editorial blog layout with 16:9 anti-CLS hero container and semantic typography. |
| **SastraPro High-Speed Landing Page** | [`templates/sastra-landing-starter.json`](templates/sastra-landing-starter.json) | High-converting 1-column sales hero layout with zero render-blocking animations. |

### How to Import to WordPress (No Coding Required):
1. Download the `.json` file from the `templates/` folder above.
2. In your WordPress Admin, go to **Templates** -> **Saved Templates**.
3. Click **Import Templates** at the top, upload the `.json` file.
4. Insert it onto any Elementor page with 1 click!

---

## šŸ’” 1-Line Shortcut Prompts for Beginners

For quick vibe coding in Cline, Claude Code, or Cursor without memorizing long instructions:

- **Create a New Fast Blog Post:**
  > *"Build a new blog post layout about [Your Topic] using `generate_sastra_layout` from PageSpeed Ultra. Ensure 16:9 image aspect-ratio (0 CLS) and generate a valid Article JSON-LD schema."*

- **Audit an Existing Page:**
  > *"Audit this HTML code using `audit_pagespeed_rules` from PageSpeed Ultra: [Paste HTML]. List the top 3 issues causing layout shift or high TBT."*

- **Clean Up an Elementor Template:**
  > *"Optimize this Elementor JSON using `optimize_elementor_json` from PageSpeed Ultra: [Paste JSON]. Strip out any heavy motion JavaScript effects."*

---

## 🌐 Universal Builder Support (Beyond Elementor)

`pagespeed-ultra-mcp` is **platform-agnostic** and works across the entire web ecosystem:

- **Elementor & Elementor Pro:** Cleans motion effects, flattens container div-soup, enforces aspect ratios on image widgets.
- **Gutenberg (WordPress Core Block Editor):** Audits HTML comments (`<!-- wp:... -->`), enforces mobile-first semantics.
- **Bricks Builder & Breakdance:** Audits output HTML and optimizes CSS payload delivery.
- **Headless & Jamstack (Astro, Next.js, HTML5):** Universal Core Web Vitals audit, JSON-LD Schema generation, and sub-14KB Critical CSS inlining.

---

## šŸ¤ The Dream Team: Synergy with Elementor & Novamira

`pagespeed-ultra-mcp` works in synergy with the WordPress AI MCP ecosystem:

```
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                   AI AGENT WORKFLOW                    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                           │
       ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
       ā–¼                   ā–¼                   ā–¼
 [ Novamira MCP ]  [ Elementor Ultra ]  [ PageSpeed Ultra ]
  Infrastructure     Page & Widgets       Performance & SEO
  - WP-CLI           - Layout building    - Zero-CLS image rules
  - PHP runtime      - Pro widgets        - Zero-TBT JS optimizer
  - Database         - Visual editing     - Inline Critical CSS
  - MU-Plugin writer - Rollback/backups   - Rich Results Schemas
```

1. **Novamira MCP (Infrastructure Engine):** Prepares WordPress multisite, executes WP-CLI, and writes MU-plugins directly to `wp-content/mu-plugins/` for server-level optimization.
2. **Elementor MCP / Elementor Ultra MCP (Visual Builders):** Constructs pages, containers, widgets, and templates.
3. **PageSpeed Ultra MCP (The Gatekeeper):** Sanitizes JSON payloads, guarantees 0 CLS, injects `<14KB` Critical CSS, and embeds Google Rich Results JSON-LD Schemas.

---

## 🧠 Master Prompt for AI Coding Agents

```markdown
You are a World-Class Full-Stack WordPress & Technical SEO Architect.

Your objective is to build a high-converting, accessible WordPress page achieving 95-100 on Mobile Google PageSpeed Insights (0ms TBT, 0 CLS, FCP < 0.8s, LCP < 1.2s) following SastraPro speed standards.

Execute the 3-Phase Workflow in order:

### PHASE 1: LAYOUT & BUILDER DRAFTING
1. If using Elementor: Use Elementor MCP / Elementor Ultra MCP to build modern Flexbox Containers (max 2 levels deep).
2. If using Gutenberg / HTML: Use semantic milestone elements (<header>, <main>, <article>, <footer>).
3. Explicit Image Dimensions: Every <img> element MUST include explicit width, height, and CSS aspect-ratio.
4. LCP Priority: The primary above-the-fold hero image MUST have fetchpriority="high" and loading="eager".

### PHASE 2: QUALITY & PERFORMANCE GATEWAY (PAGESPEED ULTRA MCP)
Before publishing, invoke tools from `pagespeed-ultra-mcp`:
1. Call `audit_pagespeed_rules` on the generated HTML. Fix any flagged CLS risks or render-blocking scripts.
2. If using Elementor, call `optimize_elementor_json` to strip heavy JavaScript motion animations.
3. Call `generate_critical_css` to produce sub-14KB inline styles and embed them inside <head>.
4. Call `generate_seo_schema` to generate valid Google Rich Results JSON-LD (Article, Breadcrumbs, FAQ).

### PHASE 3: SERVER ENGINE OPTIMIZATION (NOVAMIRA)
1. Use `generate_novamira_wp_optimizer` to generate a lightweight MU-Plugin (wp-content/mu-plugins/pagespeed-ultra.php).
2. Defer non-critical JavaScript and dequeue unneeded block stylesheets or emoji scripts.
```

---

## ⚔ 1-Click Easy Installation (Multi-Client)

### 1. Claude Code CLI (1 Single Terminal Command)

```bash
claude mcp add pagespeed-ultra -- npx -y github:ndrean-id/pagespeed-ultra-mcp
```

### 2. Cursor Editor

Add to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "pagespeed-ultra": {
      "command": "npx",
      "args": ["-y", "github:ndrean-id/pagespeed-ultra-mcp"]
    }
  }
}
```

### 3. Cline & Antigravity IDE

Add to `cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "pagespeed-ultra": {
      "command": "npx",
      "args": ["-y", "github:ndrean-id/pagespeed-ultra-mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

### 4. Claude Desktop

Add to `%APPDATA%\Claude\claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "pagespeed-ultra": {
      "command": "npx",
      "args": ["-y", "github:ndrean-id/pagespeed-ultra-mcp"]
    }
  }
}
```

---

## šŸ› ļø Included Tools

| Tool Name | Purpose | Interoperability |
| :--- | :--- | :--- |
| `audit_pagespeed_rules` | Audits HTML layout against Core Web Vitals (TBT, CLS, LCP) with 0-100 score. | Universal (Any Builder/Framework) |
| `generate_sastra_layout` | Generates semantic HTML5 and Elementor Flexbox Container JSON. | **Elementor / Gutenberg / HTML** |
| `optimize_elementor_json` | Strips heavy JS animation triggers and enforces image aspect ratios. | **Elementor MCP / Ultra** |
| `generate_novamira_wp_optimizer` | Generates WordPress MU-Plugin PHP and WP-CLI commands. | **Novamira MCP / WordPress** |
| `generate_critical_css` | Produces sub-14KB inline Critical CSS for the initial mobile viewport. | Universal / Novamira |
| `generate_seo_schema` | Generates 100% valid Google Rich Results JSON-LD schema scripts. | Universal (Any Site) |

---

## šŸ“„ License

MIT Ā© [Andre Wahyu Hermawan (ndrean-id)](https://github.com/ndrean-id)

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation4/5

The tools mostly target distinct actions: auditing, layout generation, critical CSS, SEO schema, Elementor JSON optimization, and WordPress MU-plugin generation. There is minor overlap between generate_sastra_layout and optimize_elementor_json, and between generate_critical_css and generate_novamira_wp_optimizer, but descriptions clarify their different scopes.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: audit_*, generate_*, and optimize_*. The convention is predictable throughout the set.

Tool Count5/5

Six tools is well-scoped for a PageSpeed/performance optimization server. Each tool has a clear role and none appear redundant or excessive.

Completeness4/5

The surface covers auditing, layout generation, critical CSS, schema, Elementor optimization, and WordPress injection, which are core for this domain. Minor gaps exist, such as live URL performance testing or image/JS optimization, but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues