About tinysend
tinysend is the official TypeScript SDK for the tinysend API, for applications and agents that need to work with email and newsletter data. It offers a fetch-based interface with no dependencies and covers the full API surface.
Key features
- 01Manage mailing lists
- 02Create and retrieve lists
- 03Fetch-based API access
- 04Zero runtime dependencies
- 05Custom base URL and fetch support
Use cases
- 01Use tinysend API from TypeScript code
- 02Manage lists through the SDK
- 03Configure a custom fetch implementation
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://mcp.tinysend.comclaude mcp add --transport http tinysend-node https://mcp.tinysend.com{"mcpServers":{"tinysend-node":{"type":"http","url":"https://mcp.tinysend.com"}}}Open in Cursor{"servers":{"tinysend-node":{"type":"http","url":"https://mcp.tinysend.com"}}}Open in VS Code{"mcpServers":{"tinysend-node":{"type":"http","url":"https://mcp.tinysend.com"}}}{"mcpServers":{"tinysend-node":{"serverUrl":"https://mcp.tinysend.com"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEtinysend
Official TypeScript SDK for the tinysend API. Zero dependencies, fetch-based — works in Node.js, Bun, Deno, Cloudflare Workers, and browsers.
- website: tinysend.com
- docs: tinysend.com/docs
- agents: tinysend.com/agents
Install
npm install tinysend
Getting a token
Every call needs a bearer token (sk_...).
- humans: create one in your account settings at tinysend.com
- agents: register yourself — no human in the loop. The protocol is at tinysend.com/auth.md (POST to id.tinysend.com/agent/auth), walkthrough at tinysend.com/agents/agent-auth
Usage
import { Tinysend } from 'tinysend';
const ts = new Tinysend('sk_...');
// lists
const lists = await ts.lists.list();
const list = await ts.lists.create({ name: 'Weekly Update' });
// subscribers
await ts.subscribers.create(list.id, { email: '[email protected]', verified: true });
// send an email
const post = await ts.posts.create(list.id, {
subject: 'Hello World',
body_html: '<p>Welcome to our newsletter!</p>',
});
await ts.posts.send(list.id, post.id);
// contacts
const contacts = await ts.contacts.list({ search: 'john' });
// mailboxes
const mailboxes = await ts.mailboxes.list();
// stats
const stats = await ts.stats.project();
// webhooks
const hook = await ts.webhooks.create({
url: 'https://example.com/webhook',
events: ['post.sent', 'subscriber.created'],
});
// sender domain (who emails come from)
await ts.sender.set(list.id, { type: 'custom_domain', name: 'James', email: 'james', domain: 'acme.com' });
await ts.sender.check(list.id); // re-check DNS
// custom domain for the archive site
await ts.siteDomains.set(list.id, { domain: 'news.acme.com' });
// waitlists
await ts.lists.join(list.id, { email: '[email protected]' });
await ts.lists.invite(list.id, { count: 100 });
// automations, invites, usage, settings
const automations = await ts.automations.list();
const invites = await ts.invites.list();
const usage = await ts.usage.get();
The SDK covers the full API surface — verified against the live openapi spec on every release.
Error handling
import { Tinysend, TinysendError } from 'tinysend';
try {
await ts.lists.get('nonexistent');
} catch (err) {
if (err instanceof TinysendError) {
console.log(err.status); // 404
console.log(err.code); // 'not_found'
console.log(err.message); // 'list not found'
}
}
Configuration
const ts = new Tinysend('sk_...', {
baseUrl: 'https://api.tinysend.com/v1', // default
fetch: customFetch, // custom fetch implementation
});
License
MIT
a system operator product
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.