Skip to main content

Local MCP + CLI thin adapter for pdf_editor_api.

Project description

pdf-agent-kit

pdf-agent-kit is a local adapter package for the pdf-agent-kit cloud API.

  • MCP entrypoint: pdf-agent-kit (stdio, one tool: extract_pdf_to_json)
  • CLI entrypoint: pdf-edit
  • Python import: from pdf_agent_kit import extract

The package is thin by design: it reads a local PDF file, attaches PDF_EDITOR_API_KEY, and forwards to the cloud API.

Install

pip install pdf-agent-kit

or:

uvx pdf-agent-kit

Python Compatibility

  • CLI (pdf-edit) works on Python 3.9+.
  • MCP server (pdf-agent-kit) requires Python 3.10+ because fastmcp is only installed on 3.10+.
  • If your agent is pinned to older Python, use pdf-edit directly or use uvx pdf-agent-kit for MCP runtime.

Environment

export PDF_EDITOR_API_KEY="sk_live_..."

If missing, commands fail with:

PDF_EDITOR_API_KEY not set. Get your key at https://pdfagentkit.com/dashboard

MCP Tool

Tool name: extract_pdf_to_json

Parameters:

  • file_path (required)
  • pages (optional, default all)
  • filename (optional override)

Returns API JSON: metadata + per-page text + usage stats.

CLI

pdf-edit extract /path/to/file.pdf
pdf-edit extract /path/to/file.pdf --pages "1-5"
pdf-edit status
pdf-edit setup

CLI contract:

  • success JSON goes to stdout
  • errors go to stderr
  • exit code 0 success, 1 user error, 2 server/network error

Setup

pdf-edit setup:

  1. Reads PDF_EDITOR_API_KEY (or prompts once if missing)
  2. Verifies key with /v1/account/status
  3. Patches MCP config for:
    • Claude Desktop
    • Cursor
    • VS Code
  4. Tries to add Claude Code integration via claude mcp add-json

Injected server entry:

{
  "mcpServers": {
    "pdf-agent-kit": {
      "command": "uvx",
      "args": ["pdf-agent-kit"],
      "env": {
        "PDF_EDITOR_API_KEY": "sk_live_..."
      }
    }
  }
}

Development

pip install -e .[dev]
pytest -q

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_agent_kit-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_agent_kit-0.1.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pdf_agent_kit-0.1.1.tar.gz.

File metadata

  • Download URL: pdf_agent_kit-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pdf_agent_kit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cd7a1a7dbfe95d20324d94017d306b962e52a7768c6ff65511ac1391118ec0f6
MD5 e129a6bdc2194adac80e3cad862e020f
BLAKE2b-256 3f4fcf7e0f6dd5544e4ca96484f95b0c0428bbc269d0459f8611d1950dc65a5e

See more details on using hashes here.

File details

Details for the file pdf_agent_kit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pdf_agent_kit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pdf_agent_kit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a3ac9092218ede4b0dd4090edb33daff93a1e07457fa0a378380aa874c2e869
MD5 7083ebc433790aa6cdfb23e9f1c17339
BLAKE2b-256 ce11fe97e91507ce59cc2a894a5a6ac2c565a5bccad9b21c1f267455a6ac7506

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page