mirror of
https://github.com/Dasemu/email-mcp.git
synced 2026-11-27 07:46:34 +00:00
chore: bootstrap Claude setup
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5920fec9ee
commit
07e55c6bab
11 files changed
+202
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## Overview
|
||||
A single-file MCP (Model Context Protocol) server exposing IMAP/SMTP email operations
|
||||
(list/read/move/delete emails, manage folders, send mail) as MCP tools over
|
||||
streamable-http, for one or more configured email accounts.
|
||||
|
||||
## Commands
|
||||
- Run locally: `python server.py` (requires env vars below; see `.env.example`).
|
||||
- Install dependencies: `pip install -r requirements.txt`.
|
||||
- Test: no test suite yet.
|
||||
- Lint/format: no linter/formatter configured yet.
|
||||
- Build: none (plain Python script, deployed via Nixpacks — see `nixpacks.toml`).
|
||||
|
||||
## Architecture
|
||||
Everything lives in `server.py`: env-based config, IMAP/SMTP helper functions, and
|
||||
`@mcp.tool()`-decorated functions exposed to MCP clients. See `docs/` for any deeper
|
||||
notes as they are added.
|
||||
|
||||
## Conventions
|
||||
- Python 3, stdlib `imaplib`/`smtplib`/`email` for all mail access — no mail client
|
||||
framework.
|
||||
- Tools return plain strings or JSON-serializable dicts/lists, never raw IMAP data.
|
||||
|
||||
## Workflow quirks
|
||||
- `EMAIL_ACCOUNTS` is a JSON object mapping account (email address) to password; it is
|
||||
read from the environment, never from a committed file.
|
||||
|
||||
## Deployment
|
||||
Deployed via Nixpacks (`nixpacks.toml`: `python server.py`) to a PaaS-style host, not
|
||||
the LXC/systemd pattern. The server binds to `BIND_HOST`/`BIND_PORT` and speaks MCP
|
||||
over streamable-http.
|
||||
|
||||
## Gotchas
|
||||
- `purge_email` permanently deletes a message; there is no undo.
|
||||
- Real credentials belong in `email-mcp.env` (gitignored), never in `.env.example` or
|
||||
in code.
|
||||
Reference in new issue
Block a user