Mailpiece with Gemini CLI
Ask Gemini for the draft, read it in your inbox.
Write your newsletter from Gemini CLI: give it your notes and it writes the draft straight into Mailpiece.
With Mailpiece
What you get
- Turn these notes into a draft post
- Send me a test of the draft
- Schedule it for Monday at 8
- Who subscribed since the last issue?
- Which addresses bounced?
Sign in
Build the CLI as the agents guide shows and make a read and write token under Profile › Personal access tokens, so Gemini can draft, test and schedule. The account number is the one in the app's address.
mailpiece auth login TOKEN --account 834206594 --api-url https://app.example.com
mailpiece doctor
Connect
Install the skill, which Gemini CLI reads from ~/.agents/skills, then add the server to ~/.gemini/settings.json for every project, or .gemini/settings.json for one.
mailpiece skill install
{
"mcpServers": {
"mailpiece": {
"command": "mailpiece",
"args": ["mcp", "--writes"]
}
}
}
Ask
"Turn these notes into a draft and send me a test."
Sending to the whole list can't be undone, so read what Gemini is about to do before you let it.
Set it up this afternoon
Install Mailpiece on a server, connect Gemini CLI, and send your next issue.