Gemini CLI + pdfmcp: setup guide

Add pdfmcp to Gemini CLI via settings.json.

What you need: a free pdfmcp API key — sign in with your email (no password) and copy the key shown at first login. Then replace pdfmcp_live_YOUR_KEY in the config below.

Where it goes: ~/.gemini/settings.json

{
  "mcpServers": {
    "pdfmcp": {
      "httpUrl": "https://mcp.pdfmcp.org/mcp",
      "headers": {
        "X-API-Key": "pdfmcp_live_YOUR_KEY"
      }
    }
  }
}

Steps

  1. Get a free API key from the pdfmcp dashboard and replace pdfmcp_live_YOUR_KEY in the config.
  2. Save the config and restart Gemini CLI.
  3. Run /mcp inside Gemini CLI to confirm pdfmcp connected and see its tools.
  4. Try: “Use pdfmcp to extract the tables from this PDF as CSV”.

Gemini CLI uses “httpUrl” for Streamable HTTP servers (plain “url” means SSE) — the config above is correct.

Troubleshooting

Try it with

API · MCPOCR — searchable PDFMake a scanned PDF searchable: pages without a text layer are OCR'd with Tesseract and gain an invisible text layer; pages that already have text are passed through and reported as skipped.API · MCPPDF to Word (DOCX)Convert a PDF to an editable Word document. Text-based conversion: paragraphs and headings are reconstructed from the text layer; exact layout, tables and images are not preserved.On-devicePDF info & metadataPage count, page sizes, metadata, encryption status as JSON.

More clients: Claude Desktop MCP setup · Claude Code MCP setup · ChatGPT MCP setup · All MCP setup guides · REST API quickstart