Quickstart: Claude Code
Claude Code can read, write, and manage files on OpenTusk directly through MCP tools — no SDK code required. This guide gets you from zero to “save this file to OpenTusk” in about 3 minutes.
What you’ll set up
Section titled “What you’ll set up”Claude Code ↕ MCP (stdin/stdout)OpenTusk CLI (opentusk mcp serve) ↕ OpenTusk SDKOpenTusk API → Hot Cache → Walrus NetworkClaude Code talks to the OpenTusk MCP server, which runs as a local subprocess. The MCP server handles authentication, uploads, downloads, encryption, and all 34 storage operations on your behalf.
Option A: Invite code (recommended)
Section titled “Option A: Invite code (recommended)”The fastest way — create an invite code, then redeem it to set up the agent:
-
Create an invite code
Terminal window opentusk invite create --name "claude-code"Copy the invite code (
otinv_...) — it’s single-use and expires in 1 hour. -
Redeem the code and install MCP config
Terminal window opentusk login --invite-code otinv_abc123...opentusk mcp install-config --target claude-codeThis generates a Sui keypair, creates an API key, and writes
.mcp.jsonwith everything configured. -
Start a new Claude Code session
Open Claude Code in your project directory. Try:
“List my OpenTusk vaults”
Option B: Manual API key
Section titled “Option B: Manual API key”If you already have an API key and are logged in:
-
Install the MCP config
Terminal window opentusk mcp install-config --target claude-code -
Start a new Claude Code session
Open Claude Code in your project directory. You should see OpenTusk’s tools available.
Try it out
Section titled “Try it out”Here are a few things to ask Claude Code once the MCP server is connected:
| Prompt | What happens |
|---|---|
| ”Create a vault called ‘project-docs‘“ | Calls opentusk_vault_create with visibility public |
| ”Upload README.md to my project-docs vault” | Calls opentusk_file_upload — reads from disk, uploads to OpenTusk |
| ”Save this conversation summary to OpenTusk” | Calls opentusk_file_create — creates a file from inline content |
| ”Download the latest report from OpenTusk” | Calls opentusk_file_download — writes to your local filesystem |
| ”Back up the src/ directory to OpenTusk” | Uploads each file, organizing into folders |
| ”What’s my storage usage?” | Calls opentusk_account_info — shows plan, quota, and usage |
Add the SKILL.md (recommended)
Section titled “Add the SKILL.md (recommended)”The SKILL.md teaches Claude how to use OpenTusk well — when to create vaults, how to organize files, which workflows to follow. It loads into Claude’s context automatically.
mkdir -p .claude/skills/opentusk && curl -sL \ https://docs.opentusk.ai/skills/SKILL.md \ -o .claude/skills/opentusk/SKILL.mdWith the SKILL.md installed, Claude knows patterns like:
- Project backup — zip and upload your project to a vault
- Conversation memory — persist context across sessions
- Artifact storage — save generated code, reports, or images
- Multi-agent sharing — use shared vaults to pass data between agents
Shared vaults
Section titled “Shared vaults”If you set up via invite code (Option A), Claude Code already has a Sui keypair and can work with shared vaults. Just add its address as a vault member:
# Find the agent's Sui address (shown during invite redemption, or in Settings → API Keys)# Then grant access to a shared vaultopentusk vault members add <vault-id> <agent-sui-address>If you set up via manual API key (Option B), you’ll need to store a Sui key first:
opentusk account setup-sui <suiprivkey1...>opentusk mcp install-config --target claude-code # re-install to embed the keyEither way, Claude can now upload to and download from shared vaults with end-to-end encryption. The MCP server handles SEAL encrypt/decrypt transparently.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
| Tools not showing up | Restart Claude Code — it reads .mcp.json at session start |
| ”Command not found” | Run opentusk mcp install-config again — it writes absolute paths |
| ”Invalid API key” | Verify with opentusk whoami, or create a new key at app.opentusk.ai |
| ”SEAL encryption not available” | Run opentusk account setup-sui <key> then reinstall the MCP config |
| File stuck in “rehydrating” | Cold files take a moment to fetch from Walrus — try the download again in a few seconds |