RCSTemplates
Agent platform

RCS Templates is agent-native

Beyond a human dashboard. One authenticated gateway lets an autonomous AI agent discover, author, clone, render, and send RCS templates programmatically — reused by an MCP server, a CLI, and an embeddable client, all over a single typed contract so they can never drift.

1
Gateway
/api/agent/*
3
Surfaces
MCP · CLI · client
9
Tools
one per call
4
Skill chains
least-privilege
Architecture

One gateway, three skins

The agent toolkit is a thin client over the /api/agent gateway, which reuses the exact same services the human app calls — marketplace, render, send, Studio. No business logic is forked. Pick the skin that fits your agent.

MCP server

Pro
rcs-mcp

A hand-rolled Model Context Protocol server (newline-delimited JSON-RPC over stdio, zero runtime deps). Register it once and Claude — or any MCP host — can search, render, clone, author, and send templates as native tools.

claude mcp add rcs-templates \
  --env RCS_GATEWAY_URL=https://your-server \
  --env RCS_AGENT_KEY=rcsk_live_… \
  -- npx -y @rcs-templates/agent-toolkit rcs-mcp

CLI

Pro
rcs

A thin, scriptable mirror of the gateway. Every command prints JSON, so it composes with jq, drops into CI, or runs as a step inside a shell-driven agent loop.

rcs search "appointment reminder" --channel RCS --sort rating
rcs render <id> --var firstName=Ada
rcs clone <id>
rcs send <blueprintId> --to +15551112222 --var firstName=Ada

Typed client

GatewayClient

Import GatewayClient + the shared TOOLS catalog from @rcs-templates/agent-toolkit and call the gateway directly from your service. The same typed client powers the MCP server and the CLI.

import { GatewayClient, TOOLS } from '@rcs-templates/agent-toolkit';

const client = GatewayClient.fromEnv();
const { items } = await client.call({
  method: 'GET',
  path: '/templates',
  query: { q: 'promo' },
});

ProThe packaged MCP server and CLI ship on the Pro plan. The underlying gateway and typed client are available to embed in your own service.

Quickstart

From key to first call in three steps

Everything below works in local or preview without payment configured — a scoped key transacts against your org's existing metered billing.

1

Mint a scoped key

Pro

On a Pro plan, an org admin mints an agent key with exactly the scopes a job needs. The plaintext is shown once.

POST /api/agent-keys
{ "name": "my-bot",
  "scopes": ["templates:read",
             "marketplace:clone"] }

→ { data: { key: "rcsk_live_…" } }
2

Point the toolkit at your server

Two environment variables configure every surface — MCP, CLI, and the embedded client.

export RCS_GATEWAY_URL=https://your-server
export RCS_AGENT_KEY=rcsk_live_…
3

Call it

Register the MCP server with your agent, or run the CLI directly — both speak to the same gateway.

claude mcp add rcs-templates \
  --env RCS_GATEWAY_URL=https://… \
  --env RCS_AGENT_KEY=rcsk_live_… \
  -- npx -y @rcs-templates/agent-toolkit \
     rcs-mcp
Tool catalog

Nine tools, one call each

Every tool maps to exactly one gateway endpoint and is gated by a scope — so a key only ever does what it was minted to do. These are the names the MCP server exposes; the CLI mirrors them verb-for-verb.

capabilities
$ rcs capabilitiesany key

Machine-readable map of the gateway: every endpoint, the scopes your key actually holds, and the pricing seam (null today).

search_templates
$ rcs searchtemplates:read

Discover templates by query, channel (RCS/WhatsApp/SMS), and category. Sort by rating or by most-cloned.

get_template
$ rcs gettemplates:read

Fetch one template — content, channel, ratings, clone count, and (where shared) its grounding knowledge doc.

render_template
$ rcs rendertemplates:read

Try-before-you-buy: render with sample variables and inspect the validated RCS payload plus the mandatory SMS fallback.

create_template
$ rcs createtemplates:write

Author a new template from a content object. The shared validator rejects anything that breaks channel rules with machine-coded errors.

clone_template
$ rcs clonemarketplace:clone

Deep-copy a marketplace listing into your org as a clean private draft you fully own — no provenance carried over.

submit_template
$ rcs submittemplates:submit

Send a draft to the provider (Twilio) for brand approval and read back its approval status.

send_message
$ rcs sendmessages:send

Broadcast an org-owned template to an E.164 list — RCS-first, with the always-on SMS/MMS fallback. Returns the delivery funnel.

get_usage
$ rcs usageusage:read

Read the org's month-to-date metered usage — the same ledger the human dashboard and billing meter count.

The contract

The /api/agent gateway

The HTTP surface every skin wraps. Auth is the agent-key rail (not the human master key); each write is additionally scope-gated. Reads are tenant- and published-scoped, exactly like the human routers.

MethodPathScopeDoes
GET/capabilitiesany keyCatalog + granted scopes
GET/templatestemplates:readSearch the library
GET/templates/:idtemplates:readFetch one template
POST/templatestemplates:writeCreate a draft
POST/templates/:id/rendertemplates:readRender + validate
POST/marketplace/:id/clonemarketplace:cloneClone into your org
POST/templates/:id/submittemplates:submitSubmit for approval
POST/messages/sendmessages:sendBroadcast to recipients
GET/usageusage:readRead metered usage
Identity

Keys are capability tokens

  • Minted by an admin. An org admin creates a key via POST /api/agent-keys (mint, list, and revoke). A Settings → API Keys tab is on the way.
  • Shown once, hashed at rest. The rcsk_live_… secret is displayed a single time and stored only as a SHA-256 hash. Lose it and you mint a new one.
  • Scoped & revocable. Each key carries an explicit scope set and can be revoked instantly. Revocation fails closed; last-used is tracked for audit.
  • A separate rail. The agent gateway never accepts the human master key, and the human app never accepts an agent key. Two surfaces, never conflated.
Scope vocabulary
  • templates:readSearch, fetch, and render templates
  • templates:writeAuthor new template drafts
  • templates:submitSubmit drafts for provider approval
  • marketplace:cloneClone marketplace listings into your org
  • messages:sendBroadcast templates to recipients
  • usage:readRead metered usage for the org
Skill chains

Packaged multi-step workflows

The value is the chain, not new capability — each skill strings the tools into a repeatable job and declares the least-privilege scope set it needs, so an org can mint a key that matches exactly one workflow.

Find & buy a template

find-and-buy-template

Shop the marketplace for the best fit, inspect renders before buying, then clone the winner into your org as a fresh draft.

search → render → clone
templates:readmarketplace:clone

Author & publish

author-and-publish

Turn a one-line brief into a validated, compliant template, self-check the render, and submit it for provider approval.

create → render → submit
templates:writetemplates:readtemplates:submit

Campaign in a box

campaign-in-a-box

Pick or clone a template, validate personalization against the recipient list, confirm, send, and report the delivery funnel.

clone → render → send → usage
templates:readmarketplace:clonemessages:sendusage:read

Reply bot

reply-bot

Draft a grounded, on-brand reply to an inbound message using a template's knowledge doc as the single source of truth.

get_template → draft (grounded)
templates:read
Safety

Hardened for external callers

This is the first surface meant to be hit directly by outside clients, so it's built to refuse anything the human app would. These properties came out of an adversarial code review.

Two rails, never conflated

The agent gateway is a separate surface from the human app. Neither token accepts the other's: an agent key can't reach human admin routes, and the master key isn't honored here.

Approval-gate parity

Agent sends enforce the exact same provider-approval gate as the human send path — there's no back door to ship an unapproved template.

Smishing containment

Send destinations are E.164-validated and the gateway is rate-limited — per-IP before auth, per-key after, and tighter still on send — to bound abuse.

Keys hashed & revocable

Secrets are shown once, stored only as a SHA-256 hash, scoped, and revocable. Revocation fails closed, and last-used is tracked for audit.

Atomic clone counts

Clone counters increment atomically, so concurrent agent buys never lose an update or race the marketplace ranking.

Send rollback

A send that fails marks its broadcast FAILED rather than leaving it stuck in SENDING — the funnel you read back is always truthful.

Cross-org redaction

Org-private knowledge docs are stripped from cross-org reads of published listings, so grounding content never leaks between tenants.

One usage ledger

Agent activity writes the same UsageEvent ledger as the human app, so usage, billing, and reporting stay unified across both rails.

Roadmap

Designed next: agent commerce

Fully designed and coming soon — no payment code ships in this release yet. Stated plainly so there's no ambiguity about what's live today.

Coming soon

x402 pay-per-call

An agent-native payment rail: a priced route answers HTTP 402, the agent signs a USDC transfer on Base, and the call proceeds — no account, no checkout. Designed in full; deliberately deferred (no payment code ships yet). The capabilities endpoint already returns pricing: null as the seam.

Coming soon

Priced marketplace & author payouts

One-time clone prices and per-send royalties set by template authors, with on-ledger payouts — turning the library into a marketplace agents can buy from. Depends on the x402 rail.

FAQ

Agent platform questions

What does "agent-native" mean for RCS Templates?

An autonomous AI agent can discover, author, clone, render, and send RCS templates programmatically — through one authenticated HTTP gateway (/api/agent/*), with no human clicking buttons. The same gateway is exposed as an MCP server, a CLI, and an embeddable typed client.

How does an agent authenticate?

With a scoped agent API key (prefixed rcsk_live_…), minted by an org admin. The plaintext key is shown once and stored only as a SHA-256 hash. It carries a least-privilege set of scopes and is revocable. The agent gateway is a separate rail from the human app — neither token is accepted on the other's surface.

What can an agent actually do through the gateway?

Nine tools, each one gateway call: capabilities, search_templates, get_template, render_template, create_template, clone_template, submit_template, send_message, and get_usage. Each is gated by a scope, so a key only does what it was minted to do.

Which plan do I need to use the MCP server and CLI?

The @rcs-templates/agent-toolkit — the MCP server (rcs-mcp) and the CLI (rcs) — is a Pro-plan feature. Free accounts can explore the library and the docs; minting an agent key and running the packaged MCP/CLI surfaces requires Pro. Enterprise includes it too.

How do I add the MCP server to Claude?

Run `claude mcp add rcs-templates --env RCS_GATEWAY_URL=https://your-server --env RCS_AGENT_KEY=rcsk_live_… -- npx -y @rcs-templates/agent-toolkit rcs-mcp`. The tools then appear natively in the agent.

What are skill chains?

Packaged, composable workflows that string the tools into a repeatable job — find-and-buy-template, author-and-publish, campaign-in-a-box, and reply-bot. The value is the chain, not new capability, and each declares the least-privilege scopes it needs.

Can an agent send messages to anyone it wants?

No. Sends require the messages:send scope, the template must be org-owned and provider-approved (the same gate the human path enforces), destinations are E.164-validated, and the gateway is rate-limited. Sending is billable and irreversible, so the send skill confirms first.

Is per-call crypto payment (x402) available yet?

No. The x402 pay-per-call rail is fully designed but intentionally deferred — no payment code ships in this release. Today a scoped key transacts against the org's existing metered billing; the capabilities endpoint exposes pricing: null as the forward-looking seam.

Building an agent on RCS?

Ask for early access to the gateway and toolkit, or tell us what you're wiring up — we'll help you scope the keys.