Skip to main content
RCS-Templates
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
36
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 -p @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 -p @rcs-templates/agent-toolkit \
     rcs-mcp
Tool catalog

36 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.

Discovery

1 tool
capabilities
$ rcs capabilitiesany key

Machine-readable map of the gateway: every tool with its method, path, and required scope, the scopes your key actually holds, and the pricing seam (null today). Call it first to plan what you may do.

Templates

10 tools
search_templates
$ rcs search [query] [--channel RCS] [--category KEY]templates:read

Discover templates by query, channel, and category. Sort by rating or by most-cloned.

get_template
$ rcs get <id>templates:read

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

render_template
$ rcs render <id> [--var key=value ...]templates:read

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

create_template
$ rcs create --file <template.json>templates:write

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

update_template
$ templates:write

Revise a draft in place, re-running the same validator that gates creation.

duplicate_template
$ templates:write

Fork one of your own templates into a fresh draft — the in-org counterpart to cloning from the marketplace.

delete_template
$ templates:write

Remove a template you own from the org.

clone_template
$ rcs clone <id>marketplace:clone

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

submit_template
$ rcs submit <id>templates:submit

Send a draft to the provider for brand approval and read back its approval status. Until it is approved, sends fall back to SMS.

send_message
$ rcs send <blueprintId> --to +1555... [--var key=value ...]messages:send

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

Surveys

13 tools
search_surveys
$ rcs surveys [query] [--status ACTIVE]surveys:read

Find conversational surveys by query across the library and your org.

get_survey
$ rcs survey get <id>surveys:read

Fetch one survey — its questions, branching, and current approval state.

render_survey
$ surveys:read

Preview the whole conversation as the recipient will walk it, before anything is sent.

create_survey
$ rcs survey create --file <survey.json>surveys:write

Author a new conversational survey from a question set.

clone_survey
$ marketplace:clone

Copy a published survey into your org as a private draft.

delete_survey
$ surveys:write

Remove a survey you own from the org.

submit_survey
$ rcs survey submit <id>surveys:submit

Send a survey for provider approval — the same gate templates pass through.

send_survey
$ rcs survey send <id> [--to +1555...] [--audience <id>]surveys:send

Run the survey against an audience. Billable and irreversible — rehearse with send_survey_test first.

update_survey
$ rcs survey update <id> --file <patch.json>surveys:write

Patch a survey's questions, branching, or metadata.

list_survey_sends
$ rcs survey sends <id>surveys:read

Read the send history for one survey — who it went to and when.

send_survey_test
$ rcs survey send-test <id> --to +1555...surveys:send

Send the survey to yourself first. The rehearsal that keeps a broken branch from reaching an audience.

get_results
$ rcs survey results <id>results:read

Pull the answers back as structured data, so the agent that ran the survey can act on what it learned.

upload_media
$ rcs upload-image (--file <image.png> | --from-url <url>)surveys:write

Host an image or video for use as rich-card media.

Knowledge

5 tools
get_knowledge
$ rcs knowledge <id> --gettemplates:read

Read a template's grounding doc — the source of truth a reply bot answers from.

set_knowledge
$ rcs knowledge <id> --set-file <doc.md>templates:write

Attach or replace the grounding doc behind a template.

delete_knowledge
$ rcs knowledge <id> --deletetemplates:write

Remove a template's grounding doc entirely.

enable_knowledge
$ rcs knowledge <id> --enabletemplates:write

Switch grounding on for a template without deleting or re-uploading the doc.

disable_knowledge
$ rcs knowledge <id> --disabletemplates:write

Switch grounding off while keeping the doc in place.

Audiences

6 tools
search_audiences
$ audiences:read

List and filter the org's contact lists.

get_audience
$ audiences:read

Fetch one audience and its size.

list_audience_contacts
$ audiences:read

Page through the contacts inside an audience.

create_audience
$ audiences:write

Create a new contact list for an agent to send against.

import_contacts
$ audiences:write

Bulk-add E.164 contacts to an audience — the step that turns a spreadsheet into a sendable list.

delete_audience
$ audiences:write

Remove an audience from the org.

Account

1 tool
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/templates/:id/rendertemplates:readRender + validate
POST/templatestemplates:writeCreate a draft
PUT/templates/:idtemplates:writeUpdate a draft
POST/templates/:id/duplicatetemplates:writeFork your own template
DELETE/templates/:idtemplates:writeDelete a template
POST/marketplace/:id/clonemarketplace:cloneClone into your org
POST/templates/:id/submittemplates:submitSubmit for approval
POST/messages/sendmessages:sendBroadcast to recipients
GET/surveyssurveys:readSearch surveys
GET/surveys/:idsurveys:readFetch one survey
POST/surveys/:id/rendersurveys:readPreview the conversation
POST/surveyssurveys:writeCreate a survey
POST/surveys/:id/clonemarketplace:cloneClone into your org
DELETE/surveys/:idsurveys:writeDelete a survey
POST/surveys/:id/submitsurveys:submitSubmit for approval
POST/surveys/:id/sendsurveys:sendRun against an audience
PATCH/surveys/:idsurveys:writePatch a survey
GET/surveys/:id/sendssurveys:readSend history
POST/surveys/:id/send-testsurveys:sendSend yourself a test
GET/surveys/:id/resultsresults:readRead responses
POST/media/uploadsurveys:writeHost card media
GET/templates/:id/knowledgetemplates:readRead the grounding doc
PUT/templates/:id/knowledgetemplates:writeSet the grounding doc
DELETE/templates/:id/knowledgetemplates:writeDelete the grounding doc
POST/templates/:id/knowledge/enabletemplates:writeTurn grounding on
POST/templates/:id/knowledge/disabletemplates:writeTurn grounding off
GET/usageusage:readRead metered usage
GET/audiencesaudiences:readList audiences
GET/audiences/:idaudiences:readFetch one audience
GET/audiences/:id/contactsaudiences:readPage through contacts
POST/audiencesaudiences:writeCreate an audience
POST/audiences/:id/contactsaudiences:writeImport contacts
DELETE/audiences/:idaudiences:writeDelete an audience
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, and read grounding docs
  • templates:writeAuthor, revise, duplicate, and delete drafts, and manage grounding
  • templates:submitSubmit drafts for provider approval
  • marketplace:cloneClone marketplace templates and surveys into your org
  • messages:sendBroadcast templates to recipients
  • surveys:readSearch, fetch, render, and list sends for surveys
  • surveys:writeAuthor, patch, and delete surveys, and upload media
  • surveys:submitSubmit surveys for provider approval
  • surveys:sendSend survey tests and live survey runs
  • results:readRead survey responses
  • audiences:readList audiences and their contacts
  • audiences:writeCreate and delete audiences, and import contacts
  • 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?

36 tools, each one gateway call. One is capabilities, the discovery call that returns the whole catalog plus the scopes your key actually holds. The other 35 span five domains: templates (search, get, render, create, update, duplicate, delete, clone, submit, send), conversational surveys (search, get, render, create, update, clone, delete, submit, send-test, send, list sends, read results, upload media), grounding knowledge (get, set, delete, enable, disable), audiences (search, get, list contacts, create, import contacts, delete), and account usage. Each tool 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 -p @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.