Skip to main content

Local MCP server that turns AI conversations into polished ebooks and delivers them to Kindle or email

Project description

stewreads

StewReads is a local MCP server that transforms AI conversations into clean, well-formatted ebooks. Everything runs on your machine, with no account and no cloud backend required. Generate EPUB files from your chats and send them directly to Kindle or any email address. Works with Claude Desktop and other MCP-compatible clients.

Current Scope

  • Local stdio MCP server (no backend calls)
  • EPUB generation from markdown
  • Save generated ebooks to a configured local directory
  • Send generated EPUB files by email (Claude Gmail connector preferred, SMTP fallback)
  • Reuse current StewReads ebook-generation prompt

Not In Scope (Current Iteration)

  • PDF generation

Requirements

  • Python 3.10+
  • uv

macOS install:

brew install uv

Install (Recommended)

Install as a local tool:

uv tool install stewreads-mcp

This includes pandoc via pypandoc-binary, so no separate pandoc install is required.

Install (Repo Development)

uv sync

Configuration

Create ~/.config/stewreads/config.toml:

[paths]
output_dir = "/Users/you/Projects/generated_books"

[email]
from_email = "you@gmail.com"
default_to_email = "kindle-or-reader@example.com"

Optional environment overrides:

  • STEWREADS_CONFIG_PATH (path to config file)
  • STEWREADS_OUTPUT_DIR (overrides configured output dir)
  • STEWREADS_FROM_EMAIL (overrides sender email)
  • STEWREADS_DEFAULT_TO_EMAIL (overrides default recipient email)

Fallback-only secret for built-in SMTP tool:

  • STEWREADS_GMAIL_APP_PASSWORD (Gmail App Password)

Run MCP Server (Tool Install)

stewreads-mcp

Run MCP Server (Repo Development)

uv run stewreads-mcp

Claude Desktop (Mac) Example

Add to Claude Desktop MCP config:

{
  "mcpServers": {
    "stewreads": {
      "command": "/Users/you/.local/bin/stewreads-mcp",
      "env": {
        "STEWREADS_CONFIG_PATH": "/Users/you/.config/stewreads/config.toml"
      }
    }
  }
}

If you want to use email_ebook (SMTP fallback tool), also set:

"STEWREADS_GMAIL_APP_PASSWORD": "your-16-char-app-password"

Exposed MCP Tools

  • get_stew_prompt()
  • get_stew_config()
  • get_email_status()
  • save_stew_config(output_dir)
  • save_ebook(markdown, title, filename?, original_prompt?)
  • email_ebook(to_email?, ebook_path?, subject?, body?) (SMTP fallback when connector is unavailable)

First-Time Claude Flow

  1. Call get_stew_config().
  2. If configured is false, ask the user for their preferred output directory and call save_stew_config(output_dir=...).
  3. Call save_ebook(...) after config is set.
  4. If Claude Gmail connector is available, ask Claude to send the saved EPUB using that connector.
  5. If no connector is configured, call get_email_status() and then email_ebook(...).

Dev Shell Safety

When running multi-step shell commands, you may see set -euo pipefail:

  • -e: stop on command failure.
  • -u: fail on unset variables.
  • -o pipefail: fail if any command in a pipeline fails.

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

stewreads_mcp-0.1.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

stewreads_mcp-0.1.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for stewreads_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2e43f54a7fd927be4db348cb46057552995b12f284d62ede5858a079fea3a8ca
MD5 d049d4e0f91ccdb2f572622a9b165c64
BLAKE2b-256 1e177e9b393b8a592a0d1d15a393a741d3a3e2fbf828691d6640483270d1ae3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for stewreads_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff98c37b86d9bfbb7c00e7f75f9b571fd2902329b87830f83824650563daff3a
MD5 d4acf4d713040a2cab1f3e861dc02f9d
BLAKE2b-256 4fd5e864c9dcad7336f7864f74c4909089fb89c9f7b8c781a48d9b291623335f

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