MCP path
For Claude web, iOS and Android, addhttps://mcp.tinycloud.xyz/mcp as a custom
connector. Call tinycloud_connect, approve its one-time OpenKey link, and call
it again before continuing with account discovery below. Hosted mode creates
and maintains the delegate profile for you and exposes 20 tools.
For personal records, just ask “Log my weight: 80.5 kg today.” Approve connect
and the separate records request once, then Claude uses tinycloud_apps_context,
tinycloud_apps_read, tinycloud_apps_write and tinycloud_apps_query.
These hosted-only tools share the coding-agent records under
xyz.tinycloud.agent-data/ in default, using one prefix grant for get, list,
put and delete. Generic KV tools still request their exact input scope.
Claude asks for your city once to store your timezone.
Fresh reads return ETags for conditional edits; stale edits return CHANGED.
Ordered write batches can partially succeed: inspect each outcome and move
steps before retrying, and report only what was saved. For larger questions,
Claude can offer an optional fast, searchable copy of your records, with
its own approval. KV remains the truth. COPY_PARTIAL resumes on the next
query; nonretryable copy_unavailable needs the node team, so answer from KV.
See TinyCloud MCP for the complete contract and approval settings.
Production grants last 30 days and approval links last 15 minutes. An expired
session returns a fresh link in error.details; an expired grant returns an
authority_required approval link. Approve the new link before retrying.
Hosted results include readable canonical JSON in text except successful secret
values. Read-only results have a 100,000-character cap; write results are never
truncated by it.
For a local MCP client, continue with the CLI bootstrap in this section.
The local stdio surface has 17 tools and requires Node.js 20 or newer and a
TinyCloud node running 1.6.0 or newer.
Install the CLI and MCP packages with Node.js 20 or newer, then create a
delegated agent profile once if one does not already exist:
The remaining seven local tools manage the selected session and protected secret flow:
Call
tinycloud_account_spaces_list first. Compare its space IDs with
tinycloud_account_applications_list, then choose a space and call
tinycloud_kv_list. Read individual keys with tinycloud_kv_get only after
their names and app context are known.
Account registry discovery is capped at 1,000 records, 1 MiB per record, and 4
MiB total serialized output. It fails closed instead of returning a partial
registry.
Do not treat an application name as permission to read every key in its space.
Use its manifest and any linked knowledge bundle to identify relevant prefixes
and data shapes. See Agent-readable Apps.
Store a file safely
TinyCloud KV values can hold arbitrary bytes. After selecting the target space and key, calltinycloud_kv_put with tagged content. For a Markdown file the
tool input can be:
authority_required, complete the exact request flow below and
retry the same input. create cannot overwrite an existing key. To update a
known value safely, call tinycloud_kv_head, copy its strong quoted etag, and
use mode: "replace" with that ETag. Use mode: "upsert" only when overwriting
without a concurrency check is intentional.
For binary files, base64-encode the bytes and use
{ "encoding": "base64", "value": "..." }. KV reads and writes are capped at
1 MiB. tinycloud_kv_get defaults to base64 and also supports explicit text
and json representations. It returns the representation tag, byte length,
ETag, and available content metadata.
Delete only a selected key. Passing the ETag from tinycloud_kv_head to
tinycloud_kv_delete prevents deleting a value that changed after inspection.
If a conditional mutation reports a retryable database serialization conflict,
re-read the key state, which may still be absent. If it exists, compare its
current ETag before deciding whether to retry. Deletion removes the key from
reads and listings immediately; retained content-addressed blob bytes, including
historical versions, continue to count toward storage quota unless a future
garbage collector safely reclaims them.
Generic KV tools cannot access the protected account or secrets spaces.
Inspect SQLite
Calltinycloud_sql_schema_inspect with an exact space and database first.
Then call tinycloud_sql_query with the same target, exactly one SQLite
SELECT, and optional bind params. These MCP tools do not execute writes,
DDL, pragmas, attachments, or multiple statements.
Queries default to 100 rows and 1 MiB and allow explicit limits up to 1,000 rows
and 4 MiB. Oversized results fail instead of being silently truncated. SQLite
BLOB parameters use { "type": "blob", "base64": "..." }; BLOB results use
the same tag and include byteLength. Each SQL read tool requests read
capability for the exact database, not the entire space.
Mutate SQLite data
tinycloud_sql_execute is destructive and non-idempotent. It accepts exactly
one INSERT, UPDATE, or DELETE with at least one positional ? placeholder
and one params value per placeholder. The input must explicitly include
acknowledgeDatabaseWideAuthority: true:
Two-agent approval
Use separate delegate and owner agents when a data tool returnsauthority_required.
- The delegate agent calls the data tool and saves the returned
tinycloud.auth.requestobject exactly asrequest.json. Do not edit its request ID, audience, host, or capabilities. - The owner agent reviews the artifact. It must contain only the exact
account-registry, KV key or prefix, or SQLite database capabilities expected
for this step. A write or delete request must match the user’s stated action.
For
tinycloud.sql/write, the owner must separately accept that the actual capability is database-wide rather than table- or row-scoped. - The owner agent grants that exact request with an explicit owner profile:
- The delegate agent passes the complete delegation object to
tinycloud_auth_import. - The delegate agent retries the same exploration tool. Imports persist in the selected profile, so approval and retry may happen in different MCP process sessions.
Owner CLI inspection
When MCP is unavailable, the owner can inspect the same registries locally and return a read-only summary to the agent. Use an explicit owner profile, machine-readable output, and canonical live account reads:--live matters for read-only discovery. The default indexed spaces path may
refresh and register accessible spaces when its index is empty.
After selecting a space, list keys and read only the chosen key:
tc account commands derive the account registry from the active
profile. Do not run these commands with a delegate profile and assume they
target the owner’s account. Use the MCP tools and their canonical per-operation
requests for delegated exploration.
Stop conditions
Stop and return the structured result instead of widening authority when:- the owner rejects or changes the request
- a space or app is absent from the canonical account registry
- the app manifest does not explain a prefix or value shape
- a write or delete was not explicitly requested, or its exact target is unclear
- a SQL read request is not one bounded read-only
SELECT - a SQL mutation lacks the explicit database-wide-authority acknowledgment
- the owner does not accept database-wide SQL write and schema authority
- the next step needs a secret value that the user did not request
