Skip to content

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.

Claude Code
↕ MCP (stdin/stdout)
OpenTusk CLI (opentusk mcp serve)
↕ OpenTusk SDK
OpenTusk API → Hot Cache → Walrus Network

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

The fastest way — create an invite code, then redeem it to set up the agent:

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

  2. Redeem the code and install MCP config

    Terminal window
    opentusk login --invite-code otinv_abc123...
    opentusk mcp install-config --target claude-code

    This generates a Sui keypair, creates an API key, and writes .mcp.json with everything configured.

  3. Start a new Claude Code session

    Open Claude Code in your project directory. Try:

    “List my OpenTusk vaults”

If you already have an API key and are logged in:

  1. Install the MCP config

    Terminal window
    opentusk mcp install-config --target claude-code
  2. Start a new Claude Code session

    Open Claude Code in your project directory. You should see OpenTusk’s tools available.

Here are a few things to ask Claude Code once the MCP server is connected:

PromptWhat 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

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.

Terminal window
mkdir -p .claude/skills/opentusk && curl -sL \
https://docs.opentusk.ai/skills/SKILL.md \
-o .claude/skills/opentusk/SKILL.md

With 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

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:

Terminal window
# Find the agent's Sui address (shown during invite redemption, or in Settings → API Keys)
# Then grant access to a shared vault
opentusk 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:

Terminal window
opentusk account setup-sui <suiprivkey1...>
opentusk mcp install-config --target claude-code # re-install to embed the key

Either way, Claude can now upload to and download from shared vaults with end-to-end encryption. The MCP server handles SEAL encrypt/decrypt transparently.

SymptomFix
Tools not showing upRestart 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