Skip to main content
Glama

spa-reader-mcp

CI npm version

MCP server that renders JavaScript SPA pages and extracts Markdown via headless Chromium.

Traditional scrapers fail on SPAs because content is rendered client-side. This tool launches Playwright, waits for JS to finish, then extracts clean Markdown using Readability + Turndown.

Install

npx playwright install chromium

Claude Desktop

{
  "mcpServers": {
    "spa-reader": {
      "command": "npx",
      "args": ["-y", "spa-reader-mcp"]
    }
  }
}

Claude Code

claude mcp add spa-reader -- npx -y spa-reader-mcp

Related MCP server: crawl-mcp-server

Tools

spa_read

Render a page and extract content as Markdown.

Parameter

Type

Default

Description

url

string

URL to read (required)

waitForSelector

string

CSS selector to wait for

waitTimeout

number

30000

Timeout in ms

includeMetadata

boolean

true

Add YAML frontmatter

cookies

array

Cookies for auth

headers

object

Custom HTTP headers

spa_screenshot

Capture a PNG screenshot after JS rendering.

Parameter

Type

Default

Description

url

string

URL to capture (required)

waitForSelector

string

CSS selector to wait for

waitTimeout

number

30000

Timeout in ms

width

number

1280

Viewport width

height

number

720

Viewport height

fullPage

boolean

false

Full page capture

cookies

array

Cookies for auth

headers

object

Custom HTTP headers

Security

  • SSRF protection: blocks private/loopback IPs

  • Only http: and https: schemes allowed

  • Selector injection prevention

  • Content capped at 100KB

Dev

pnpm install && pnpm build
pnpm test

License

MIT

Available Tools

2 tools
spa_readB

Render a JavaScript SPA page and extract its content as LLM-ready Markdown. Uses a headless browser to execute JavaScript, then extracts the main article content.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the SPA page to read
waitForSelectorNoCSS selector to wait for before extraction
waitTimeoutNoNavigation timeout in ms (default: 30000)
includeMetadataNoInclude title/author/excerpt as YAML frontmatter (default: true)
cookiesNoCookies to inject before page load (e.g., session tokens)
headersNoCustom HTTP headers (e.g., Authorization)

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions using a headless browser and extracting main article content, but lacks critical details such as whether this is a read-only operation, potential performance impacts (e.g., timeouts, resource usage), error handling, or authentication requirements (though headers/cookies parameters hint at this). The description is insufficient for a tool with complex behavior involving browser automation.

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?

The description is front-loaded with the core purpose in the first sentence and adds implementation detail in the second. Both sentences are relevant and non-redundant, though it could be slightly more structured (e.g., explicitly separating purpose from method). No wasted words, making it efficient for an agent to parse.

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

Completeness2/5

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

Given the tool's complexity (headless browser execution, 6 parameters, no output schema, and no annotations), the description is incomplete. It lacks information on return values (e.g., format of extracted Markdown, error responses), behavioral constraints (e.g., rate limits, side effects), and does not compensate for the absence of annotations. This leaves significant gaps for an agent to use the tool effectively.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what the schema provides, such as explaining how 'waitForSelector' relates to content extraction or typical use cases for cookies/headers. The baseline score of 3 reflects adequate but minimal value added over the schema.

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?

The description clearly states the specific action ('Render a JavaScript SPA page and extract its content as LLM-ready Markdown') and distinguishes it from the sibling tool spa_screenshot by focusing on content extraction rather than visual capture. It specifies the method ('Uses a headless browser to execute JavaScript') and the target resource ('SPA page').

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

Usage Guidelines3/5

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

The description implies usage for SPA pages with JavaScript-rendered content, but does not explicitly state when to use this tool versus alternatives like spa_screenshot or other non-SPA reading tools. No exclusions or prerequisites are mentioned, leaving the agent to infer the context from the tool name and description alone.

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

spa_screenshotB

Take a screenshot of a JavaScript SPA page after rendering. Uses a headless browser to execute JavaScript and capture the visual output as PNG.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to screenshot
waitForSelectorNoCSS selector to wait for before capturing
waitTimeoutNoNavigation timeout in ms (default: 30000)
widthNoViewport width in pixels (default: 1280)
heightNoViewport height in pixels (default: 720)
fullPageNoCapture full scrollable page (default: false)
cookiesNoCookies to inject before screenshot
headersNoCustom HTTP headers

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the headless browser method and PNG output format, but lacks critical details like authentication requirements, rate limits, error conditions, or whether the operation is idempotent. For a complex tool with 8 parameters, this is insufficient.

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

Conciseness5/5

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

The description is perfectly concise with two sentences that directly communicate the tool's purpose and method. Every word earns its place with zero redundancy or unnecessary elaboration.

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

Completeness2/5

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

For a complex tool with 8 parameters, no annotations, and no output schema, the description is incomplete. It lacks information about return values, error handling, performance characteristics, and operational constraints that would help an agent use it effectively.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

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?

The description clearly states the specific action ('Take a screenshot'), target resource ('JavaScript SPA page'), and method ('Uses a headless browser to execute JavaScript and capture the visual output as PNG'). It distinguishes from the sibling tool 'spa_read' by focusing on visual capture rather than content reading.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. It simply states what the tool does without contextual usage information.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedspa_read
    • First observedspa_screenshot

TDQS

A3.5/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: spa_read extracts textual content as Markdown for LLM processing, while spa_screenshot captures visual output as PNG for screenshots. There is no overlap in functionality or ambiguity about which tool to use for a given task.

Naming Consistency5/5

Both tools follow a consistent 'spa_' prefix pattern with descriptive suffixes (read, screenshot), indicating they belong to the same domain and operate on SPA pages. The naming is uniform, predictable, and clearly communicates each tool's function.

Tool Count3/5

With only 2 tools, the server feels thin for a general-purpose SPA reader domain, as it lacks operations like navigation, interaction simulation, or performance monitoring. However, it covers the core tasks of content extraction and screenshot capture adequately for basic use.

Completeness3/5

The tools provide essential read-only capabilities for SPAs (extracting content and screenshots), but there are notable gaps: no ability to interact with pages (e.g., click buttons, fill forms), navigate beyond initial URLs, or handle dynamic content beyond rendering. This limits advanced agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

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
    B
    quality
    F
    maintenance
    An MCP server that retrieves web page content using Playwright headless browser, capable of extracting main content and converting to Markdown format.
    3
    4,976
    1,079
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server for web content extraction that converts HTML pages into clean, LLM-optimized Markdown using Mozilla's Readability. It supports batch processing, intelligent multi-page crawling, and configurable caching while respecting robots.txt standards.
    15
    -
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that fetches web pages and extracts clean, AI-friendly Markdown content using Mozilla Readability. It provides secure web access for LLMs with built-in SSRF protection and automated content cleaning for improved context retrieval and summarization.
    1
    284
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that scrapes content from web pages, including JavaScript-heavy sites, and converts it into high-quality Markdown. It leverages Playwright for headless browser automation and Pypandoc for clean content conversion.
    Apache 2.0

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/XXO47OXX/spa-reader-mcp'

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