@sendforai/claude-plugin 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "sendforai",
3
+ "version": "0.1.1",
4
+ "description": "Transactional and broadcast email at cost. Adds the SendForAI skill and the hosted MCP server.",
5
+ "author": {
6
+ "name": "SendForAI",
7
+ "email": "hello@sendforai.com",
8
+ "url": "https://sendforai.com"
9
+ },
10
+ "homepage": "https://sendforai.com/agents",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "email",
14
+ "transactional",
15
+ "broadcast",
16
+ "mcp"
17
+ ]
18
+ }
package/.mcp.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "sendforai": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@sendforai/mcp"
8
+ ]
9
+ }
10
+ }
11
+ }
package/README.md CHANGED
@@ -1,3 +1,12 @@
1
- # Temporary Holding Version
1
+ # SendForAI plugin for Claude Code
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Adds the `sendforai` skill (set up and send transactional or broadcast email) and the local SendForAI MCP server.
4
+
5
+ ```
6
+ /plugin marketplace add https://sendforai.com/marketplace.json
7
+ /plugin install sendforai@sendforai
8
+ ```
9
+
10
+ The MCP server runs `npx -y @sendforai/mcp`. With no identity configured, ask Claude to call `generate_identity` (omit the domain for a no-DNS sandbox). To use the hosted server instead, add `{ "type": "http", "url": "https://sendforai.com/mcp", "headers": { "Authorization": "Bearer <connection token>" } }`; mint the token with `npx sendforai token`.
11
+
12
+ Docs: https://sendforai.com/docs.md
package/package.json CHANGED
@@ -1,6 +1,29 @@
1
1
  {
2
2
  "name": "@sendforai/claude-plugin",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "Claude Code plugin for SendForAI: the set-up-and-send email skill plus the SendForAI MCP server.",
5
+ "keywords": [
6
+ "claude-code",
7
+ "claude-plugin",
8
+ "email",
9
+ "mcp",
10
+ "sendforai"
11
+ ],
12
+ "homepage": "https://sendforai.com/agents",
13
+ "bugs": {
14
+ "email": "hello@sendforai.com"
15
+ },
16
+ "author": "SendForAI <hello@sendforai.com>",
17
+ "license": "MIT",
18
+ "files": [
19
+ ".claude-plugin",
20
+ ".mcp.json",
21
+ "skills",
22
+ "README.md"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/sendforai/sendforai.git",
27
+ "directory": "packages/claude-plugin"
28
+ }
6
29
  }
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: sendforai
3
+ description: Set up and send transactional or broadcast email with SendForAI (sendforai.com), an email API an agent can sign up for and run without a dashboard or API key. Use when a project needs to send email (sign-in links, receipts, password resets, notifications, newsletters), when asked to add or replace an email provider such as Resend, SendGrid, Postmark or Mailgun with a cheaper one, or when the user mentions SendForAI.
4
+ ---
5
+
6
+ # SendForAI
7
+
8
+ Email at cost for agents: $0 to build, $5 in months that send to the outside world (10,000 emails included), then $0.11 per 1,000. Send-only (no inbound). Full reference: https://sendforai.com/docs.md. Short reference: https://sendforai.com/llms.txt.
9
+
10
+ Use the CLI (`npx sendforai`, prints JSON, never prompts), the Node SDK (`@sendforai/sdk`), the MCP tools if a `sendforai` MCP server is connected, or plain HTTP with a connection token. All of them return the same JSON.
11
+
12
+ ## Workflow
13
+
14
+ 1. **Get an identity.** No API key exists; the identity is a local Ed25519 key.
15
+ - No domain decided yet: `npx sendforai sandbox`. Works immediately, reaches only the simulator.
16
+ - Domain known: `npx sendforai init example.com`. It prints the DNS TXT record that binds the key to the domain.
17
+ - Keys are saved under `~/.sendforai/` with mode 0600. Never print, commit or paste a private key. In an app, load it from an environment variable or secret store (`SENDFORAI_PRIVATE_KEY`).
18
+ 2. **Prove it works against the simulator** before touching DNS or money:
19
+ `npx sendforai send --from agent@<identity> --to delivered@simulator.sendforai.com --subject Test --markdown "Hello"`.
20
+ `bounced@` and `complained@simulator.sendforai.com` simulate those outcomes; check them with `npx sendforai events`.
21
+ 3. **Set up the real domain.**
22
+ - If `VERCEL_TOKEN` or `CLOUDFLARE_API_TOKEN` is in the environment: `npx sendforai dns setup --domain example.com --wait`. It publishes every record and waits. The token stays local.
23
+ - Otherwise run `npx sendforai domains status example.com` (after `init` or `domains add`) and give the user the exact records to add at their DNS host. Do not guess records.
24
+ - From a sandbox identity, the real domain is added by delegation; `dns setup --domain` and `domains add` both handle it and keep the same account.
25
+ 4. **Check cost before sending for real.** `--dry-run` (API: `"dry_run": true`) returns cost, capacity and lint warnings without sending. Always pass `--max-cost` (API: `max_cost_usd`) on real sends so a mistake cannot overspend.
26
+ 5. **Hand money to the human.** Sending to anyone outside the account's own domains needs prepaid credit. On `402 balance_required`, run `npx sendforai topup --amount 10` and give the user the `checkout_url`. Do not try to pay it yourself. Raising the monthly budget works the same way (`approval_url`).
27
+ 6. **Send.** Use `idempotency_key` on anything that might be retried. Read `cost` and `capacity` from the response instead of assuming.
28
+ 7. **Broadcasts need a person.** `npx sendforai broadcasts create ...` returns an `approval_url`; give it to the user and wait. Only pass `require_approval: false` when the user has explicitly said they approve sends themselves.
29
+ 8. **Watch results** with `npx sendforai events` (keep the cursor). No webhook endpoint is needed.
30
+
31
+ ## Integrating into an app (Node)
32
+
33
+ ```ts
34
+ import { SendForAI } from "@sendforai/sdk";
35
+
36
+ const sfa = new SendForAI({ domain: process.env.SENDFORAI_DOMAIN!, privateKey: process.env.SENDFORAI_PRIVATE_KEY! });
37
+
38
+ const res = await sfa.emails.send({
39
+ from: "login@example.com",
40
+ to: user.email,
41
+ subject: "Your sign-in link",
42
+ markdown: `Click to sign in: ${url}`,
43
+ idempotency_key: `signin-${tokenId}`,
44
+ max_cost_usd: 0.01,
45
+ });
46
+ ```
47
+
48
+ Other languages: mint a connection token (`npx sendforai token --days 90`), store it as a secret, and `POST https://api.sendforai.com/v1/emails` with `Authorization: Bearer <token>`. Tokens expire (90 days at most), so tell the user a renewal is needed, or sign each request instead (recipe in docs.md, "Signing").
49
+
50
+ ## Rules
51
+
52
+ - Every error has a `fix` field. Read it and do what it says before trying anything else.
53
+ - Never send to purchased, scraped or guessed lists. Transactional mail goes to people who triggered it; broadcasts go to contacts who opted in. Policy: https://sendforai.com/acceptable-use.
54
+ - Keep transactional and broadcast mail on their own streams (`stream: "broadcast"` for list mail; it adds one-click unsubscribe).
55
+ - New domains warm up from a low daily cap. Check `npx sendforai capacity` before promising a volume, and tell the user if a migration has to be gradual.
56
+ - When replacing another provider, switch one email type first, behind a flag, and keep the old provider until real sends are confirmed in `events`.
57
+ - State plainly what still needs the human: DNS records (unless a DNS token is available), the first top-up, budget increases, and broadcast approval.