go-sui-mcp
Go Sui MCPは、Suiブロックチェーン用の管理制御プレーンサーバーで、ローカルSuiクライアントコマンドと対話するためのツールを提供します。Cursor IDEとの統合により、開発体験が向上します。設定は、設定ファイル、環境変数、コマンドラインフラグを通じて行うことができます。
GitHubスター
0
ユーザー評価
未評価
お気に入り
0
閲覧数
25
フォーク
0
イシュー
7
README
Go Sui MCP (Management Control Plane)
A Go-based management control plane server for Sui blockchain, providing MCP (Management Control Plane) tools to interact with local Sui client commands. This project integrates with Cursor IDE for enhanced development experience.
Features
- MCP tools for Sui client operations
- Support for both stdio and SSE (Server-Sent Events) modes
- Integration with Cursor IDE
- Configuration via config file, environment variables, or command-line flags
Prerequisites
- Go 1.20 or higher
- Sui client installed and available in PATH
- Cursor IDE (for development)
Installation
# Clone the repository
git clone https://github.com/krli/go-sui-mcp.git
cd go-sui-mcp
# Build the application
go build -o go-sui-mcp
Configuration
Configuration can be done via:
- Config file (default:
$HOME/.go-sui-mcp.yaml
) - Environment variables
- Command-line flags
Example config file:
server:
port: 8080
sse: false
sui:
executable_path: "sui"
Environment variables:
GOSUI_SERVER_PORT=8080
GOSUI_SERVER_SSE=false
GOSUI_SUI_EXECUTABLE_PATH=sui
Running the Server
The server can be run in two modes:
- stdio mode (default):
./go-sui-mcp server
- SSE mode:
./go-sui-mcp server --sse --port 8080
Cursor IDE Integration
To integrate with Cursor IDE, create a .cursor/mcp.json
file in your project root:
{
"mcpServers": {
"sui-sse": {
"command": "/path/to/go-sui-mcp",
"args": ["server", "--sse"]
},
"sui-dev": {
"url": "http://localhost:8080/sse"
},
"sui": {
"command": "/path/to/go-sui-mcp",
"args": ["server"]
}
}
}
Available MCP Tools
The following MCP tools are available:
Version and Path
sui-formatted-version
: Get the formatted version of the Sui clientsui-path
: Get the path of the local sui binary
Balance and Objects
sui-balance-summary
: Get the balance summary of an addresssui-objects-summary
: Get the objects summary of an addresssui-object
: Get details of a specific object
Transactions
sui-process-transaction
: Process and get details of a transactionsui-pay-sui
: Transfer SUI tokens to a recipient
Example Tool Usage (in Cursor)
Transfer SUI tokens:
await mcp.invoke("sui-pay-sui", {
recipient: "0x...",
amounts: 1000000000, // 1 SUI
"gas-budget": "2000000",
"input-coins": "0x..."
});
Get balance summary:
await mcp.invoke("sui-balance-summary", {
address: "0x..." // optional, uses current address if not provided
});
Development
The project uses the following key components:
internal/sui
: Core Sui client implementationinternal/services
: MCP tools and service implementationscmd
: Command-line interface implementation
License
See LICENSE file.