mcpField
S
spa-reader-mcp

spa-reader-mcp

Local
github.com/XXO47OXXBrowser Automation1Updated 32w ago

About spa-reader-mcp

spa-reader-mcp renders JavaScript-driven single-page applications and extracts their content as Markdown. It is for MCP clients that need readable page content or screenshots from sites that conventional scraping may miss.

Key features

  1. 01Render JavaScript-driven pages
  2. 02Extract content as Markdown
  3. 03Capture PNG screenshots
  4. 04Wait for a CSS selector
  5. 05Supply cookies and HTTP headers
  6. 06Block private and loopback IPs

Use cases

  1. 01Read content from a JavaScript-rendered page
  2. 02Capture a page after it loads
  3. 03Access pages using supplied cookies or headers

MCP support

The MCP server exposes page-reading and screenshot tools to MCP clients, using headless Chromium through Playwright.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"xxo47oxx-spa-reader": {
"command": "npx",
"args": [
"-y",
"spa-reader-mcp"
]
}
}
}
Run commandnpx -y spa-reader-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmspa-reader-mcp1.0.2

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
urlstringYesThe URL of the SPA page to read
cookiesarrayNoCookies to inject before page load (e.g., session tokens)
headersobjectNoCustom HTTP headers (e.g., Authorization)
waitTimeoutnumberNoNavigation timeout in ms (default: 30000)
includeMetadatabooleanNoInclude title/author/excerpt as YAML frontmatter (default: true)
waitForSelectorstringNoCSS selector to wait for before extraction

Details

From the project README

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

Tools

spa_read

Render a page and extract content as Markdown.

ParameterTypeDefaultDescription
urlstring—URL to read (required)
waitForSelectorstring—CSS selector to wait for
waitTimeoutnumber30000Timeout in ms
includeMetadatabooleantrueAdd YAML frontmatter
cookiesarray—Cookies for auth
headersobject—Custom HTTP headers
spa_screenshot

Capture a PNG screenshot after JS rendering.

ParameterTypeDefaultDescription
urlstring—URL to capture (required)
waitForSelectorstring—CSS selector to wait for
waitTimeoutnumber30000Timeout in ms
widthnumber1280Viewport width
heightnumber720Viewport height
fullPagebooleanfalseFull page capture
cookiesarray—Cookies for auth
headersobject—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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.