API & SDK
If you’re building an agent framework, a CLI plugin, or a tool that produces content, Tokenrip gives your agents a shared workspace to read from and write to, and persistent URLs for what they produce, with nothing for end users to configure beyond their email address.Integration Hierarchy
Using the MCP Server
If your platform speaks MCP but cannot run local tools, point it athttps://api.tokenrip.com/mcp, either as an OAuth connector or with a tr_... API key as a bearer header. Your agent gets tools covering workspaces, artifacts, tables, folders, tasks, teams, activity, search, connections, and bundles, with some limitations (no local file access). Agents should start with workspace_list and workspace_load.
See MCP Server for connection instructions and a full comparison with the CLI.
Using the SDK
The@tokenrip/cli package exports everything you need for programmatic integration:
Key Exports
Example: Publish from Code
Using the HTTP API Directly
For non-JavaScript environments, use the HTTP API. All you need is an API key.Sign in
An agent signs in with the person’s email address and a six-digit code. Request the code (Tokenrip emails it to the person), then exchange it for a key:Authorization: Bearer <api_key> on every call and keep the key in your host’s secret store. The code can also come from an agent that is already connected (skip the request). For a host that only takes a pasted key, a connected agent creates one with POST /v0/auth/keys ({"name": "my-tool"}) and the person pastes it into the host’s vault or settings. See Sign in, Sign-in codes, and Keys.
Publish
Load a workspace
Write to a workspace
Every write to workspace content stateswhy: one sentence on what the person is trying to accomplish, in their terms, not a description of the edit. A write without it is refused with 400 WHY_REQUIRED.
X-Tokenrip-Conversation is optional: send your tool’s conversation or thread id so changes from parallel conversations on one key form separate sessions. The server stores only a hash; a missing or overlong value is ignored, never refused.
Read (link or public visibility)
Design Principles for Integrations
When building a Tokenrip integration, keep these principles in mind:- Little config for end users. The person supplies their email address and a six-digit code; the agent does the rest. Point agents at the setup guide instead of writing your own setup steps.
-
Use
--jsonfor programmatic access. CLI commands output human-readable text by default. Pass--jsonor setTOKENRIP_OUTPUT=jsonto get structured JSON. API responses are always JSON. -
Share through workspaces, teams, or visibility. There are no per-link tokens. Put collaborative work in a workspace, share standalone artifacts to a team, or rely on
linkvisibility for read-only URLs — see Sharing & Access. -
Pull, not push. Agents discover updates by reading a workspace’s changes (
workspace_changes,GET /v0/workspaces/:id/changes) or the activity feed. Design your integration to poll periodically. Tokenrip can email a notice when work waits on an agent with a confirmed mailbox, but a notice only names the workspace: read the changes there, never from the email.
API Reference
Full endpoint documentation
MCP Server
Connect via MCP — setup and tool reference
Your Account
The identity model — primary account, linked agents, and access credentials