# Sdks

> Official Node.js, Python, and Go SDKs plus the primitive CLI for Primitive — email infrastructure for AI agents. Generated from the OpenAPI spec.

- **Type:** MCP server
- **Install:** `agentstack add mcp-primitivedotdev-sdks`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [primitivedotdev](https://agentstack.voostack.com/s/primitivedotdev)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [primitivedotdev](https://github.com/primitivedotdev)
- **Source:** https://github.com/primitivedotdev/sdks
- **Website:** https://www.primitive.dev/

## Install

```sh
agentstack add mcp-primitivedotdev-sdks
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Primitive SDKs

[](https://github.com/primitivedotdev/sdks/actions/workflows/sdk-checks.yml)

Monorepo for the Primitive SDKs.

Primitive is an inbound and outbound email platform. The SDKs are centered on a
small default workflow:

1. receive an inbound email
2. inspect a normalized email object
3. send, reply, or forward synchronously

## SDKs

| SDK | Install target | README |
| --- | --- | --- |
| Node.js | `npm install @primitivedotdev/sdk` | `sdk-node/README.md` |
| Python | `pip install primitivedotdev` | `sdk-python/README.md` |
| Go | `go get github.com/primitivedotdev/sdks/sdk-go@latest` | `sdk-go/README.md` |

## Default API shape

Across the SDKs, the default story is:

- receive inbound mail with `receive(...)`
- create an outbound client with `client(...)`
- send new mail with `send(...)`
- continue a thread with `reply(...)`
- forward a message with `forward(...)`

The Node.js end-state looks like this:

```ts
import primitive from "@primitivedotdev/sdk";

const client = primitive.client({
  apiKey: process.env.PRIMITIVE_API_KEY!,
});

export async function POST(req: Request) {
  const email = await primitive.receive(req, {
    secret: process.env.PRIMITIVE_WEBHOOK_SECRET!,
  });

  await client.reply(email, "Thank you for your email.");

  return Response.json({ ok: true });
}
```

## x402 payments

Each SDK also ships a non-custodial x402 payments client. One agent registers a
payout address and requests a USDC payment; the paying agent signs locally with
its own key and settles. Keys never leave the caller. Networks are `base` and
`base-sepolia`, and amounts are token base units (USDC has 6 decimals, so
`"10000"` is 0.01 USDC). See the "x402 payments" section in each SDK README
(`sdk-node`, `sdk-python`, `sdk-go`) for runnable examples, and the
`primitive payments` command group in the CLI for the same flow from a terminal.

## Advanced surfaces

The low-level and generated APIs still exist for advanced use cases:

- webhook verification/parsing helpers
- generated HTTP API packages
- Primitive Memories key-value operations
- OpenAPI exports
- contract tooling
- raw MIME parsing helpers
- CLI

The SDK refresh keeps those escape hatches available, but the primary docs story
focuses on the inbound/outbound automation flow above.

## Repository layout

```text
sdks/
  .github/workflows/
  openapi/
  json-schema/
  sdk-go/
  sdk-node/
  sdk-python/
  test-fixtures/
```

## Development

Use the root `Makefile` as the main task interface:

```bash
make node-generate python-generate go-generate
make check
make build
make shared-check
```

The `Makefile` wraps each SDK's native commands. You can still run them directly
 from each SDK directory when needed:

```bash
cd sdk-node && pnpm typecheck && pnpm test
cd sdk-python && uv sync --dev && uv run pytest && uv run ruff check . && uv run basedpyright
cd sdk-go && go test ./... && go test -run TestSharedCompatibilityFixtures ./...
```

## Documentation

- `docs/architecture.md` gives the repository architecture and package layout
- `docs/schema-generation.md` documents schema/codegen flow
- `docs/repo-model.md` documents the monorepo task model
- `RELEASE.md` documents the release process

## Primitive developer resources

Everything for building on [primitive.dev](https://www.primitive.dev), the email API for AI agents:

- **Primitive API documentation** — [docs.primitive.dev/docs](https://docs.primitive.dev/docs) (REST reference: [/docs/api](https://docs.primitive.dev/docs/api))
- **Primitive OpenAPI spec** — [primitive.dev/openapi.json](https://www.primitive.dev/openapi.json)
- **Primitive authentication guide** — [/docs/auth](https://docs.primitive.dev/docs/auth)
- **Primitive webhooks** — [/docs/endpoints](https://docs.primitive.dev/docs/endpoints)
- **Primitive MCP server** (Claude & ChatGPT connector) — [/docs/connectors](https://docs.primitive.dev/docs/connectors)
- **Primitive CLI** — `npm install -g primitive`
- **Full developer-resources index** — [primitive.dev/developers](https://www.primitive.dev/developers)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [primitivedotdev](https://github.com/primitivedotdev)
- **Source:** [primitivedotdev/sdks](https://github.com/primitivedotdev/sdks)
- **License:** MIT
- **Homepage:** https://www.primitive.dev/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-primitivedotdev-sdks
- Seller: https://agentstack.voostack.com/s/primitivedotdev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
