项目简介

AssetCLI 是一个用于管理 Solana 区块链上 DAO 的命令行工具,它通过集成的 Model Context Protocol (MCP) 接口,允许用户使用自然语言与 DAO 进行交互,从而简化 DAO 的治理和操作流程。用户可以使用兼容 MCP 协议的 AI 客户端(如 Claude Desktop)以自然语言指令执行 DAO 的各项功能。

主要功能点

  • 自然语言 DAO 交互: 通过 MCP 接口,使用自然语言命令管理 DAO。
  • 资源访问: 提供 DAO 文档资源,例如 README、DAO 指南、提案指南和钱包指南,方便用户了解和使用 AssetCLI。
  • 工具执行: 支持通过自然语言调用工具执行 DAO 的各项操作,包括:
    • 配置管理: 设置和查看 CLI 工具的配置信息,例如集群网络、钱包信息等。
    • 钱包管理: 导入和查看钱包信息。
    • DAO 管理: 创建、使用、展示和列出 DAO,以及为 DAO 财政库充值。
    • 提案管理: 创建、投票、执行和列出提案。
    • 通用工具: 查询账户余额和交易信息。

安装步骤

  1. 克隆仓库
git clone https://github.com/assetCLI/assetCLI-init.git
cd assetCLI-init
  1. 安装依赖
pnpm install
  1. 构建项目
pnpm build

服务器配置

要将 AssetCLI 配置为 Claude Desktop 的 MCP 服务器,您需要修改 Claude Desktop 的配置文件 'claude_desktop_config.json'。

配置文件路径:

  • MacOS: '~/Library/Application\ Support/Claude/claude_desktop_config.json'
  • Windows: '$env:AppData\Claude\claude_desktop_config.json'

修改配置内容如下:

{
  "mcpServers": {
    "assetCLI": {
      "command": "node",
      "args": ["$(pwd)/dist/mcp-server.js"]
    }
  }
}

配置参数说明:

  • server name (服务器名称): 'assetCLI' - 在 Claude Desktop 中识别和选择此 MCP 服务器的名称。
  • command (命令): 'node' - 用于启动 MCP 服务器的命令,这里使用 Node.js 运行时。
  • args (参数): '["$(pwd)/dist/mcp-server.js"]' - 启动 MCP 服务器的参数,指向 AssetCLI 项目编译后的 'mcp-server.js' 文件。'$(pwd)' 表示当前工作目录,确保 Claude Desktop 能找到服务器脚本。

基本使用方法

配置完成后,在 Claude Desktop 中选择 'assetCLI' 服务器,即可使用自然语言指令与 DAO 进行交互。

常用自然语言指令示例:

  • 配置和设置

    • 'Set my cluster to devnet' (设置网络为 devnet)
    • 'Import my wallet from ~/.config/solana/id.json' (导入钱包)
    • 'Show me my wallet information' (显示钱包信息)
    • 'What's the current configuration?' (查看当前配置)
  • DAO 管理

    • 'Create a new integrated DAO called "Community Fund" with 3 members and a threshold of 2' (创建一个新的集成 DAO)
    • 'Show me all the DAOs I'm a member of' (显示我参与的所有 DAO)
    • 'I want to use the DAO with address abc123...' (使用指定地址的 DAO)
  • 资金操作

    • 'Fund my DAO treasury with 0.5 SOL' (为 DAO 财政库充值 SOL)
    • 'What's the balance of my DAO treasury?' (查看 DAO 财政库余额)
  • 提案操作

    • 'Create a proposal to send 0.1 SOL to address abc123... with title "Web Development Fee"' (创建一个 SOL 转账提案)
    • 'Show me all active proposals for my DAO' (显示 DAO 的所有活跃提案)
    • 'I want to vote yes on proposal abc123...' (对指定提案投赞成票)
    • 'Execute the approved proposal abc123...' (执行已批准的提案)
  • 实用工具

    • 'Get the balance of address abc123...' (查询指定地址的余额)
    • 'Look up transaction signature xyz789...' (查询指定交易签名)
    • 'What happened in transaction abc123...?' (查看指定交易的详细信息)

更多详细指令和功能,请参考仓库文档或通过 MCP 接口查询文档资源,例如 'GET assetCLI://docs/readme'。

信息

分类

开发者工具