
How to add PDF Reader MCP to Windsurf
Extract text, images, and metadata from local or URL PDFs as structured output, dir-confined. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 15, 2026 · 200★ · stdio · no auth
Windsurf config for PDF Reader MCP
npx -y @sylphx/pdf-reader-mcp{
"mcpServers": {
"pdf-reader-mcp": {
"command": "npx",
"args": [
"-y",
"@sylphx/pdf-reader-mcp"
]
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the PDF Reader MCP config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5PDF Reader MCP's tools become available to Cascade.
Before you start
- Node.js 22.13.0 or higher (required by pdfjs-dist v6)
- npx (bundled with Node.js) to run @sylphx/pdf-reader-mcp without a global install
- No credentials or API key needed — auth is none
- Optional: a directory to confine reads to (passed via --allow-dir), and network access if reading PDFs from URLs
What PDF Reader MCP can do in Windsurf
read_pdfUnified tool to extract text, images, metadata, and page count from one or more PDF sources (local paths or URLs), with optional per-source page-range selection.
Security
File access is confined to the working directory the host sets, so run it with the cwd scoped to the intended project folder. Parsing untrusted PDFs always carries some parser-exploitation risk; only process documents you trust. Note: use the current @sylphx/ package, not the older @sylphlab/ name.
PDF Reader MCP + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the PDF Reader MCP config there under the "mcpServers" key and restart the client.
Is PDF Reader MCP safe to use with Windsurf?
File access is confined to the working directory the host sets, so run it with the cwd scoped to the intended project folder. Parsing untrusted PDFs always carries some parser-exploitation risk; only process documents you trust. Note: use the current @sylphx/ package, not the older @sylphlab/ name.
Does it need an API key or authentication?
No. It runs locally over stdio with no auth, reading PDFs from the filesystem or from HTTP/HTTPS URLs you allow.
Can it read PDFs from a URL, not just local files?
Yes. Each source can specify a `url` field for HTTP/HTTPS PDFs. You can disable this with `--no-http` or restrict it to specific domains with `--allow-host`.
How do I restrict which directories it can read?
Pass `--allow-dir=/path` (repeatable) or set the `MCP_PDF_ALLOWED_DIRS` environment variable. Reads outside allowed directories fail fast with an Access denied error.