Skip to content

mcp-server

MCP server that exposes Sui blockchain tools to Claude Code and other MCP-compatible clients.

Overview

A stdio-based Model Context Protocol server providing Sui blockchain tools. It wraps the Sui CLI and the sui-agent-wallet REST API into MCP tools that Claude Code (or any MCP client) can call directly.

Installation

bash
clawhub install mcp-server

Or manually:

bash
cd <your-workspace>/skills/mcp-server
npm install

Features

  • Wallet operations: address, balance, accounts, pending transactions
  • Transaction approval and rejection
  • Network switching
  • Sign and execute unsigned transactions
  • Run arbitrary Sui CLI commands
  • Build and publish Move packages
  • Test coverage analysis
  • On-chain object queries
  • Contract decompilation links

Prerequisites

  • Node.js v18+
  • Sui CLI
  • sui-agent-wallet server running on localhost:3847 (for wallet tools)

Usage

Start the Server

bash
npm start
# or
npx tsx index.ts

Configure in Claude Code

json
{
  "mcpServers": {
    "sui-tools": {
      "command": "npx",
      "args": ["tsx", "/path/to/mcp-server/index.ts"]
    }
  }
}

API Reference

ToolDescription
sui_wallet_addressGet current wallet address
sui_wallet_balanceGet wallet balance
sui_wallet_accountsList all accounts
sui_wallet_pendingGet pending transactions
sui_wallet_approveApprove a pending transaction
sui_wallet_rejectReject a pending transaction
sui_wallet_switch_networkSwitch network (mainnet, testnet, devnet, localnet)
sui_wallet_sign_executeSign and execute a base64 transaction
sui_cliRun any Sui CLI command
sui_move_test_coverageRun tests with coverage for a Move package
sui_move_buildBuild a Move package
sui_move_publish_unsignedGenerate unsigned publish transaction
sui_objectQuery an on-chain object by ID
sui_decompileGet Suivision URL for a package