Skip to main content

MCP-SEO

Open-source SEO analysis toolkit for AI agents.

MCP-SEO gives any LLM agent — or human — a complete suite of SEO auditing tools, accessible both as a CLI and as a Model Context Protocol (MCP) server. Point it at a URL and get structured, Markdown-formatted reports on meta tags, headings, links, images, performance, mobile-friendliness, structured data, and more.

Features

  • 21 CLI commands covering on-page SEO, technical SEO, performance, accessibility, and content analysis
  • 18 MCP tools exposing the same capabilities to any MCP-compatible client (Claude Desktop, Cursor, OpenCode, ...)
  • Headless browser rendering via Playwright/Chromium for JavaScript-heavy pages
  • Lighthouse-style scoring (0-100) with per-category breakdowns
  • Multi-page site crawler with duplicate detection and robots.txt respect
  • Structured output — every analyzer returns Pydantic models (JSON) and Markdown reports
  • Configurable — all timeouts and thresholds overridable via MCP_SEO_* env vars
  • pip-installable — pip install mcp-seo and you're ready to go

Installation

pip install mcp-seo

# Or with pipx for isolated CLI usage
pipx install mcp-seo

# Or directly from GitHub
pip install git+https://github.com/g-battaglia/mcp-seo.git

After installing, set up the headless browser (one-time):

mcp-seo setup

Quick Start

# Lighthouse-style audit with scoring
mcp-seo lighthouse https://example.com

# Full comprehensive report (all analyzers combined)
mcp-seo report https://example.com

# Individual analyzers
mcp-seo meta https://example.com           # Title, description, OG, Twitter, canonical
mcp-seo headings https://example.com       # Heading hierarchy (h1-h6)
mcp-seo links https://example.com          # Internal/external, nofollow, anchors
mcp-seo images https://example.com         # Alt text, lazy loading, dimensions, format
mcp-seo content https://example.com        # Word count, readability, keywords, n-grams
mcp-seo headers https://example.com        # Caching, security, compression, redirects
mcp-seo sitemap https://example.com        # XML sitemap discovery and validation
mcp-seo robots https://example.com         # robots.txt rules and directives
mcp-seo structured-data https://example.com # JSON-LD, Microdata, RDFa
mcp-seo performance https://example.com    # Core Web Vitals (TTFB, FCP, LCP)
mcp-seo mobile https://example.com         # Viewport, tap targets, font sizes
mcp-seo url-structure https://example.com   # URL length, depth, tracking params
mcp-seo accessibility https://example.com   # ARIA, landmarks, skip-nav, score

# Site crawler
mcp-seo crawl-site https://example.com     # Crawl site, find duplicates

# Page fetching
mcp-seo crawl https://example.com          # Rendered HTML (JS executed)
mcp-seo fetch https://example.com          # Raw HTTP response (JSON)

# Utilities
mcp-seo screenshot https://example.com
mcp-seo og-image -t "Title" -s "Subtitle" -o output.png

MCP Server

MCP-SEO includes a built-in Model Context Protocol server that exposes all SEO tools to any MCP-compatible AI client.

mcp-seo mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-seo": {
      "command": "mcp-seo",
      "args": ["mcp"]
    }
  }
}

OpenCode

Add to your opencode.json:

{
  "mcpServers": {
    "mcp-seo": {
      "command": "mcp-seo",
      "args": ["mcp"]
    }
  }
}

If you installed from source with uv instead of pip, use "command": "uv" with "args": ["run", "--directory", "/path/to/mcp-seo", "mcp-seo", "mcp"].

Available MCP Tools

Tool Description
crawl Render page with headless Chromium, return full HTML
fetch_page Fetch raw HTTP response as JSON
analyze_meta_tags Title, description, OG, Twitter, canonical, viewport
analyze_headings Heading hierarchy (h1-h6), single H1, skip checks
analyze_links Internal/external links, nofollow, anchor text
analyze_images Alt text, lazy loading, dimensions, modern formats
analyze_content Word count, readability, keywords, n-grams
analyze_headers Caching, security, compression, redirect chain
analyze_sitemap XML sitemap discovery and validation
analyze_robots robots.txt rules, crawl-delay, sitemap directives
analyze_structured_data JSON-LD, Microdata, RDFa extraction
analyze_performance TTFB, FCP, LCP, DOM nodes, requests, resource sizes
analyze_mobile Viewport, font sizes, tap targets, horizontal scroll
analyze_url_structure URL length, depth, separators, tracking params
analyze_accessibility ARIA landmarks, skip-nav, forms, images, score
lighthouse_audit Lighthouse-style scoring (0-100) per category
full_seo_report Comprehensive report combining all analyses
crawl_site Multi-page crawler with cross-page analysis

For LLM Agents

MCP-SEO is designed to be used autonomously by AI agents. All tools produce structured Markdown output that is easy to parse, quote, and reason about.

See AGENTS.md for recommended workflows: quick audits, comprehensive audits, competitive analysis, and technical audits.

Development

git clone https://github.com/g-battaglia/mcp-seo.git
cd mcp-seo
uv sync --group dev
uv run mcp-seo setup
uv run mcp-seo --help

Tech Stack

Component Library
CLI click
MCP server FastMCP (mcp SDK)
Browser Playwright (headless Chromium)
HTTP client httpx
HTML parsing BeautifulSoup4 + lxml
Data models Pydantic v2

License

GNU Affero General Public License v3.0

Metadata

Release files for mcp-seo 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-seo 0.3.0
File Size Uploaded Provenance
mcp_seo-0.3.0.tar.gz 156.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-seo 0.3.0
File Interpreter ABI Platform
mcp_seo-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 234.4 kB

Release files / mcp_seo-0.3.0.tar.gz

Download URL mcp_seo-0.3.0.tar.gz
Size 156.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6b42c0df097895864f909f21856933646132674c8634337337b4e27a4260a4d7
BLAKE2b-256 checksum
How to use checksums
8e9d3d07cfdc313c4d91c9b6bebcb95132a884111f6a598fbed312d90388f1ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcp_seo-0.3.0-py3-none-any.whl

Download URL mcp_seo-0.3.0-py3-none-any.whl
Size 78.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2777497383aa7bd70e06397c4f6fee9485e0a7c9755675cc7528d0701610132d
BLAKE2b-256 checksum
How to use checksums
0ed2822d6df5c76e5783e9deab780dfda1084cde7df57ba754f89a384fc20c26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcp-seo 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page