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:
- Dashboard: chainship.org/settings → API token → Generate token. Copy it now: it is shown once.
- CLI:
npx chainship login, then use the token stored in~/.chainship/auth.json.
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:
| Variable | Value |
|---|---|
CHAINSHIP_TOKEN | the token from step 1 (required for every tool except chainship_deploy_x402) |
CHAINSHIP_API_URL | https://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:
- "What plan am I on with chainship, and how many credits are left?" →
chainship_plan,chainship_balance - "Deploy the files in ./dist with chainship." →
chainship_deploy, which returns the permanent URL, the Arweave transaction id and what it cost - "Show my last chainship deploys." →
chainship_list
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
| Tool | Does | Input |
|---|---|---|
chainship_plan | the account's plan and what it allows | – |
chainship_balance | credit balance and ledger | – |
chainship_list | your recent deploys | – |
chainship_deploy | deploy a static site from account credits. Returns url, txId, debitedUsd, balanceUsd | files: [{ path, content }] (UTF-8 text) |
chainship_deploy_x402 | deploy 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 answers | Means | Do |
|---|---|---|
paymentRequired: true | not enough credits | top up (Credits & payments) and ask again |
error: "not logged in" or 401 | token missing, wrong or revoked | make a new token (step 1) and restart the client |
| an empty deploy list | token missing, wrong or revoked, or no deploys yet | ask 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 tools | the server did not start | run 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) |