Deploy from an AI agent (MCP)

@chainship/mcp is a Model Context Protocol server. With it, an agent in Claude Code, Claude Desktop or Cursor can deploy a static site to chainship, list your deploys and read your plan and credits, all as tools it calls for you.

What a chainship_deploy gives you: the files go to Arweave permanently, and visitors get tamper-checked delivery. From the second visit on, the browser checks each file against its hash and refuses a changed one. The first visit is not checked, and a host that swaps the whole bundle for another self-consistent one is not caught yet (see Trust model). Deploys paid per call through x402 (chainship_deploy_x402) do not embed the checker yet (#516): they are permanent, not tamper-checked.

1. Get a token

Either:

The token can deploy and spend your credits. Keep it in your client's config or an env file, never in a repository.

2. Add it to your client

The server is on npm as @chainship/mcp, and the client starts it with npx, so there is nothing to install by hand. It needs Node 20 or newer.

The server reads two variables:

VariableValue
CHAINSHIP_TOKENthe token from step 1 (required for every tool except chainship_deploy_x402)
CHAINSHIP_API_URLhttps://chainship.org (the default, so set it only for a self-hosted dashboard)

Claude Code (one command, from any folder):

claude mcp add chainship \
  -e CHAINSHIP_TOKEN=<your token> \
  -- npx -y @chainship/mcp

Run claude mcp list to see it connected. Add --scope user to have it in every project.

Claude Desktop: Settings → Developer → Edit Config opens claude_desktop_config.json. Add the server and restart Claude Desktop:

{
  "mcpServers": {
    "chainship": {
      "command": "npx",
      "args": ["-y", "@chainship/mcp"],
      "env": { "CHAINSHIP_TOKEN": "<your token>" }
    }
  }
}

Cursor: the same JSON in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in one project (keep that file out of git, it holds the token). Then Settings → MCP shows chainship.

3. Use it

Ask in plain words, and the agent picks the tool:

A deploy is permanent and paid from credits, and cannot be undone or refunded. The tool tells the agent to ask you before it spends, and a good client shows you each tool call to approve.

Tools

ToolDoesInput
chainship_planthe account's plan and what it allows–
chainship_balancecredit balance and ledger–
chainship_listyour recent deploys–
chainship_deploydeploy a static site from account credits. Returns url, txId, debitedUsd, balanceUsdfiles: [{ path, content }] (UTF-8 text)
chainship_deploy_x402deploy without an account, paid per deploy in USDC on Base (x402). Permanent, but no tamper check yet (#516)files, then payment and paymentSignature after the 402 challenge

Files are passed as text, so this suits HTML, CSS, JS and similar. For a large build or binary assets (images, fonts), deploy with the CLI instead.

When something fails

The tool answersMeansDo
paymentRequired: truenot enough creditstop up (Credits & payments) and ask again
error: "not logged in" or 401token missing, wrong or revokedmake a new token (step 1) and restart the client
an empty deploy listtoken missing, wrong or revoked, or no deploys yetask for chainship_plan first: it answers not logged in for a bad token. If it shows your plan, the account has no deploys yet
the client lists no chainship toolsthe server did not startrun npx -y @chainship/mcp in a terminal: it should wait silently, and an error there is the cause (an old Node is the usual one: node --version must be 20 or newer)