Add AI agent setup prompt, start.sh launcher, and container resource limits

Adds a copy-pasteable prompt for non-technical users to set up poke-mail
via their AI coding agent, a start.sh script that loads .env, activates
the virtualenv, starts the server, and tunnels to Poke, and recommended
container resource limits for orchestrators.
This commit is contained in:
Kacper Kwapisz
2026-03-23 19:08:31 +01:00
parent b3a5cd4c5b
commit 2950e5d82c
3 changed files with 51 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
MCP_API_KEY=your-secret-key-here
+21
View File
@@ -75,6 +75,18 @@ npx @modelcontextprotocol/inspector
Open http://localhost:3000 and connect to `http://localhost:3000/mcp` using "Streamable HTTP" transport. Pass `Authorization: Bearer your-secret-key` header. Open http://localhost:3000 and connect to `http://localhost:3000/mcp` using "Streamable HTTP" transport. Pass `Authorization: Bearer your-secret-key` header.
## Install with your AI Agent
Copy this prompt into your AI coding agent (Claude Code, Cursor, etc.):
`Set up poke-mail (https://github.com/kacperkwapisz/poke-mail) for me — clone the repo, create a Python virtualenv named .venv, install requirements.txt, copy config.example.yml to config.yml, then help me configure config.yml — you can guide me on which IMAP/SMTP host and port to use for my email provider (iCloud, Gmail, Outlook, etc.) and what username format to use, but do NOT type or suggest passwords or API keys, tell me to enter those myself outside of this terminal and confirm when done — then generate a random 32+ character MCP_API_KEY, save it to a .env file as MCP_API_KEY=<the-key>, install the poke npm package globally, run poke login so I can authenticate, and run start.sh to start the server and tunnel it to Poke.`
To start the server again later:
```bash
./start.sh
```
## Authentication ## Authentication
Set `MCP_API_KEY` to secure the server. All requests must include `Authorization: Bearer <MCP_API_KEY>`. Set `MCP_API_KEY` to secure the server. All requests must include `Authorization: Bearer <MCP_API_KEY>`.
@@ -105,6 +117,15 @@ docker run -d \
ghcr.io/kacperkwapisz/poke-mail:main ghcr.io/kacperkwapisz/poke-mail:main
``` ```
### Resource Limits
The server is mostly idle (IMAP IDLE + lightweight HTTP). Recommended limits for container orchestrators:
| Resource | Reservation | Limit |
|----------|-------------|-------|
| Memory | 128 MB | 256 MB |
| CPU | 0.25 | 0.5 |
## MCP Tools ## MCP Tools
| Tool | Description | | Tool | Description |
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# Load .env if present
if [ -f .env ]; then
set -a
source .env
set +a
fi
# Activate virtualenv
source .venv/bin/activate
: "${MCP_API_KEY:?MCP_API_KEY is not set — add it to .env or export it}"
# Start poke-mail server in background
echo "Starting poke-mail server..."
python src/server.py &
SERVER_PID=$!
trap "kill $SERVER_PID 2>/dev/null" EXIT
# Wait for server to be ready
sleep 2
# Tunnel to Poke
echo "Starting tunnel to Poke..."
poke tunnel http://localhost:3000/mcp --name "poke-mail"