Connect Claude web or mobile
Add a custom connector in Claude and use this URL:- Ask Claude to call
tinycloud_connect. - Open the returned
approvalUrland approve the account-registry delegation in OpenKey. - Ask Claude to call
tinycloud_connectagain. It now returnsconnected: true. - Ask Claude to list your spaces, then perform the KV or SQLite operation you
want. When a tool returns
authority_required, open itsapproval.urland retry the same tool unchanged.
tinycloud_connect to the 16 canonical tools. The service
stores a distinct delegated session key for each OpenKey OAuth subject and
accepts only delegations from an owner DID carried by that subject’s
resource-bound access token. It never receives an owner private key.
Requirements
- Node.js 20 or newer
- The TinyCloud CLI and a delegated profile for local stdio
@tinycloud/mcp0.3.0 or newer for hosted mode; 0.2.0 or newer for local stdio- A TinyCloud node running 1.6.0 or newer
- An MCP client that supports structured tool results
Configure local stdio
Install both packages with Node.js 20 or newer:delegate-session profile, complete
the one-time exact request, owner grant, and CLI import in
Access and explore my TinyCloud.
Then add the local stdio server to your MCP client:
Available tools
These tools use the same versioned operation contracts as the CLI projections.
Results use one of four statuses:
ok, authority_required, setup_required,
or error.
Every data operation plans authority for the exact space and key, prefix, or
database in its input. When authority is missing, the tool returns
authority_required with a tinycloud.auth.request; it does not widen the
request or silently fall back to owner authority. Generic KV tools reject the
TinyCloud account and secrets spaces. Use the dedicated account and secret
tools for those protected spaces.
For the MCP-first account and data discovery sequence, including a separate
owner agent that grants exact read requests, see
Access and explore my TinyCloud.
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.
KV data safety
tinycloud_kv_list returns at most 100 keys by default, accepts a limit from 1
through 1,000, and reports whether the result was truncated. KV reads and
writes are limited to 1 MiB per value.
tinycloud_kv_get returns the byte length, metadata, and a tagged
representation. Base64 is the default and preserves arbitrary files exactly;
request text or json only when the bytes use that representation. A decoded
GET can carry a weak representation ETag; use tinycloud_kv_head when a strong
validator is needed for a conditional mutation.
tinycloud_kv_put accepts one of these tagged content objects:
createsucceeds only when the key does not exist.replacerequires the current strong ETag fromtinycloud_kv_headand fails if the value changed.upsertwrites without a precondition and can overwrite an existing value.
tinycloud_kv_delete when concurrent
changes must be preserved. A failed create, replace, or guarded delete returns
a precondition error instead of overwriting or deleting newer data.
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 immediately removes
the key from reads and listings, but retained content-addressed blob bytes,
including historical versions, continue to count toward storage quota unless a
future garbage collector safely reclaims them.
SQLite reads
tinycloud_sql_schema_inspect uses a fixed query to list user tables, views,
indexes, and triggers. tinycloud_sql_query accepts exactly one SQLite
SELECT, optional bind parameters, and no write, DDL, attachment, pragma, or
multi-statement input. Both read tools request read authority for one exact
database.
Queries default to 100 rows and 1 MiB. Callers may request up to 1,000 rows and
4 MiB. Schema inspection is capped at 500 objects and 1 MiB. Limits are sent to
the node and verified again by the MCP operation; excess results fail rather
than being silently truncated. SQL BLOB parameters use
{ "type": "blob", "base64": "..." }; BLOB results add byteLength to the
same tagged representation.
SQLite writes
tinycloud_sql_execute is a destructive, non-idempotent tool. It accepts
exactly one INSERT, UPDATE, or DELETE, requires at least one positional
? placeholder, and requires one params value per placeholder. It rejects
literal-only mutations, CTEs, DDL, pragmas, attachments, and multiple
statements. The input must also set
acknowledgeDatabaseWideAuthority: true.
Delegated secret flow
- Call
tinycloud_secrets_getwith the secret name and scope. - If the result is
authority_required, use its structured request and approval action to obtain the exact capabilities. The server never silently falls back to owner authority. - Import the approved delegation with
tinycloud_auth_import. - Retry
tinycloud_secrets_get. Requests are persisted so approval and retry can happen in separate client sessions. - If the result is
setup_required, follow its Secret Manager action to add the missing value, then retry.
