Skip to main content

kindlemcp

Send any document straight to your Kindle, via Amazon's Send-to-Kindle email service. Ships as both a command-line tool and an MCP server, so you can send from a shell or straight from an AI assistant (Claude Desktop, Claude Code, etc.).

Markdown is converted to EPUB with pandoc; PDF and EPUB files are sent as-is.

No secrets live in the code — the Gmail SMTP credential and your Kindle address are read from the environment or from local config files that are gitignored.

Requirements

  • Python 3.10+
  • pandoc (only needed for Markdown input) — brew install pandoc. pandoc is an external binary, not a Python dependency.
  • A Gmail account with an App Password (for SMTP).
  • Your Send-to-Kindle email address, and the Gmail sender added to your Amazon approved senders list (Amazon → Preferences → Personal Document Settings → Approved Personal Document E-mail List). This is a one-time step; documents from any other sender are silently dropped by Amazon.

Install

pipx install kindlemcp          # installs `kindlemcp` (MCP) and `kindlemcp-send` (CLI)
# or run without installing:
uvx --from kindlemcp kindlemcp-send --title "Note" report.md

For local development from a checkout:

python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"

Configuration

Both values can come from the environment or a config file. Copy the examples:

cp .env.example .env                 # fill in SMTP_URL
cp kindle.conf.example kindle.conf   # fill in KINDLE_ADDR  (or use ~/.kindle.conf)

.env:

SMTP_URL=smtp://you%40gmail.com:your_app_password@smtp.gmail.com:587

kindle.conf (or ~/.kindle.conf):

KINDLE_ADDR=you_xxxxxx@kindle.com

Both files are gitignored and never committed.

Config resolution order

Setting Looked up in order
SMTP_URL env var → ./.env → ~/.kindle.env → ~/code/aicourse/.env (legacy)
KINDLE_ADDR env var → ./kindle.conf → ~/.kindle.conf

CLI usage

# Markdown -> EPUB -> Kindle
kindlemcp-send --title "My Report" report.md

# PDF or EPUB, sent as-is
kindlemcp-send --title "My Report" report.pdf

# Markdown from stdin
echo "# Hello" | kindlemcp-send --title "Quick Note"

--title becomes the email subject, which Amazon uses as the document name on the Kindle.

The old ./kindle_send.py script still works — it is now a thin shim that calls the package.

MCP server

The kindlemcp command runs an MCP server over stdio exposing a single tool:

  • send_to_kindle(title, content?, file_path?) — provide exactly one of content (Markdown text, converted to EPUB) or file_path (an existing .md / .pdf / .epub file). Returns a human-readable status string.

Claude Desktop / .mcp.json

Add this to your MCP client config (Claude Desktop claude_desktop_config.json, or a project .mcp.json for Claude Code):

{
  "mcpServers": {
    "kindlemcp": {
      "command": "uvx",
      "args": ["--from", "kindlemcp", "kindlemcp"],
      "env": {
        "SMTP_URL": "smtp://you%40gmail.com:your_app_password@smtp.gmail.com:587",
        "KINDLE_ADDR": "you_xxxxxx@kindle.com"
      }
    }
  }
}

If you installed with pipx, use the installed command directly instead:

{
  "mcpServers": {
    "kindlemcp": {
      "command": "kindlemcp",
      "env": {
        "SMTP_URL": "smtp://you%40gmail.com:your_app_password@smtp.gmail.com:587",
        "KINDLE_ADDR": "you_xxxxxx@kindle.com"
      }
    }
  }
}

You can omit the env block and rely on the config files above instead. Either way, the Gmail sender in SMTP_URL must be on your Amazon approved-senders list, and pandoc must be on PATH for Markdown conversion.

Development

pip install -e ".[dev]"
python -m pytest      # tests mock SMTP — they never send a real email
ruff check .

License

MIT

Metadata

Release files for kindlemcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kindlemcp 0.1.0
File Size Uploaded Provenance Actions
kindlemcp-0.1.0.tar.gz 10.2 kB Without provenance Details for kindlemcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kindlemcp 0.1.0
File Interpreter ABI Platform Actions
kindlemcp-0.1.0-py3-none-any.whl Python 3 none any Details for kindlemcp-0.1.0-py3-none-any.whl

Total release size: 19.7 kB

Release files / kindlemcp-0.1.0.tar.gz

Download URL kindlemcp-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
db336faab536cd867c8d50486a0d21882f25d9fb5d9b3f8f8924bd85253ea20b
BLAKE2b-256 checksum
How to use checksums
c9748c6f3cdc20aab99642b79627f6ae6d574514fee3d38801a5fa4aae3526ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / kindlemcp-0.1.0-py3-none-any.whl

Download URL kindlemcp-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8475bb69f9eaabc89b9ec0022467680bf00e54a9331420cc2f8a0ce4aa1582f0
BLAKE2b-256 checksum
How to use checksums
5978e3b42b25bd1758bef738608e224c56099a580c91e2e13fb807f097004bcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for kindlemcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page