---
title: "Mail letters from Gemini CLI"
description: "Add SendForMe to Gemini CLI as a remote MCP server with one command. Gemini CLI can write letters, mail PDFs from your disk, and track them."
url: https://sendforme.co/agents/gemini-cli
updated: 2026-11-29
---

# Mail letters from Gemini CLI

> Run gemini mcp add --transport http sendforme https://sendforme.co/mcp, then /mcp auth sendforme inside a session if it asks you to sign in. Nothing to fill in. Gemini CLI can then preview and mail letters and upload PDFs with curl.

**Say to your agent:** "Mail ./letters/resignation.pdf to my manager at 500 Main St, Springfield, IL 62701, First-Class."

Gemini CLI supports remote MCP servers over streamable HTTP, so adding SendForMe is one command.

## Install in Gemini CLI

### One command

```bash
gemini mcp add --transport http sendforme https://sendforme.co/mcp
```

Add `--scope user` to make it global. Check with `gemini mcp list`, or `/mcp` inside a session.

### Or edit settings.json

In `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "sendforme": {
      "httpUrl": "https://sendforme.co/mcp"
    }
  }
}
```

The field is `httpUrl` for streamable HTTP. Restart Gemini CLI after editing.

## Signing in

Start Gemini CLI. If it asks you to sign in, run `/mcp auth sendforme`. A browser tab opens and closes by itself. There's no email, no form and no card. That creates your SendForMe account.

## Using an API key

On a server, in CI, or when `/mcp auth` can't open a browser:

1. Make a key on the [account page](/account). It starts with `sfm_`.
2. Add the server with the key as a header:

```bash
gemini mcp add --transport http --header "Authorization: Bearer sfm_..." sendforme https://sendforme.co/mcp
```

Or in `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "sendforme": {
      "httpUrl": "https://sendforme.co/mcp",
      "headers": { "Authorization": "Bearer sfm_..." }
    }
  }
}
```

Letters then go straight to your account while there's credit. For unattended runs, see [approvals and limits](/docs/approvals-and-limits).

If neither works in your setup, `https://sendforme.co/mcp/open` needs no auth; Gemini CLI gets a setup link per session unless it keeps the `account_key` it receives.

## Your first letter

The first time Gemini CLI sends a real letter, SendForMe returns a setup link like `https://sendforme.co/go/QF6S-2U4Z`. Open it, check the proof, and add credit once. The letter goes out by itself. After that, letters go straight out with a 10-minute undo window. More in [setup links](/docs/setup-links).

## Things to try

> Write a FOIA request to the EPA for inspection records on the plant at 1200 River Rd, Toledo, and mail it. Show me the proof first.

> Mail ./scans/claim.pdf and the two photos in ./scans/damage/ to my insurer's claims office, certified with a return receipt. Put the photos after the letter.

> Did my letter to the EPA arrive?

## Tips for Gemini CLI

- **Trust settings:** Gemini CLI asks before running MCP tools. Allow the read-only ones (`preview_letter`, `get_letter`, `check_address`, `letter_guide`) and confirm `send_letter` yourself.
- **Shell access for uploads:** uploading a local PDF runs `curl -T`. If shell commands are restricted, pass a public https URL to the file instead.
- **Photos as exhibits:** PNG and JPEG files become one page each after the letter. Ask for `color: true` if the photos matter.
- **Proof first:** add "always show me the proof link before sending" to your `GEMINI.md` so it's the habit in every session.

## The skill

The skill at [https://sendforme.co/skill.md](https://sendforme.co/skill.md) explains the whole flow. Paste it into your `GEMINI.md` (or point to it from there) and Gemini CLI follows it in every session.

## What it costs

Previews, address checks and letter guides are free. A one-page First-Class letter is $2.49, printing and postage included; Certified Mail is $10.99, and certified with an electronic return receipt is $13.99. Each extra page is $0.25. Credit is prepaid and never expires, and a letter cancelled in the undo window puts its credit back on your balance. Full details on [pricing](/pricing).

## Related

- [Claude Code](/agents/claude-code)
- [Any other agent](/agents/any-agent)
- [MCP reference](/docs/mcp)

## FAQ

### Which field does settings.json use?

httpUrl, for streamable HTTP servers. url is for the older SSE transport.

### Can Gemini CLI run headless with SendForMe?

Yes, with an API key header, since nobody is there to finish the sign-in. Set a price limit for unattended use.

### How does it send a PDF from my disk?

It calls upload_file, runs curl -T on the file, and previews the letter with the upload id.
