Building a PDF MCP server for agents exposed an SSRF hole and pricing trap
NahFurReeaal · reddit · 2026-07-29
A builder shared lessons from creating a PDF read/write MCP server for agents, with a focus on what went wrong and what mattered most.
- A URL-to-PDF tool can become an SSRF vulnerability if it fetches user-supplied URLs without strict egress and redirect checks.
- Tool responses matter as much as tool calls: returning page count, OCR hints, and normalized errors made the agent chain work better.
- Per-page pricing was a bad fit for agents, so the server moved to per-document pricing.
- The project is open source as docweave/mcp on the MCP registry and npm.
More from coding & agent
- Sanity announces an AI builders event in Brooklyn on September 9 — davidcrawshaw · 2026-07-29
- Databricks and OpenAI speakers headline San Francisco meetup on agent observability — matei_zaharia · 2026-07-29
- FastMCP name clash hides two separate projects, with Python as the canonical one — tristanbob · 2026-07-29
- A modular AI agent adds toggles, diagnostics and browser automation to cut costs — Ill-Process-7232 · 2026-07-29
- Claude Code issue proposes a live input hook to edit prompts while typing — DimaZeniuk · 2026-07-29
- Codex plugs into Roblox Studio to build, test, and publish a game end to end — majidmanzarpour · 2026-07-29