Stellar XDR编解码工具

一个将Stellar XDR与JSON相互转换的协议服务器,支持类型识别、编解码和模式生成功能,适用于区块链开发场景。

  • by stellar-experimental
  • TypeScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 leighmcculloch/stellar-mcp-xdr-json

使用说明

用于XDR的Stellar MCP服务器

一 模型上下文协议(MCP) 将Stellar XDR解码为 XDR-JSON,代理可以使用它来理解XDR的含义。

提供五个工具:

  • mcp_stellar-xdr_types -获取支持的XDR类型。
  • mcp_stellar-xdr_json_schema -获取XDR类型的JSON模式。
  • mcp_stellar-xdr_guess -猜猜Stellar XDR是什么类型,得到一个可能类型的列表。
  • mcp_stellar-xdr_decode -将Stellar XDR解码为JSON。
  • mcp_stellar-xdr_encode -从JSON编码Stellar XDR。

用法(通用)

要与代理一起使用,请设置 stdio MCP配置与您的代理呼叫 以下命令:

{
  "command": "npx",
  "args": ["deno", "run", "--allow-read", "https://github.com/leighmcculloch/mcp-stellar-xdr/raw/refs/heads/main/mcp-stellar-xdr.ts"]
}

如果你有 deno 安装后,您可以省略 npx 命令和呼叫 deno 直接。

用法(克劳德桌面)

要与Claude Desktop一起使用:

  1. 添加服务器配置:

    在 macOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json

    在Windows上: %APPDATA%/Claude/claude_desktop_config.json

    {
      "mcpServers": {
        "mcp-stellar-xdr-json": {
          "command": "npx",
          "args": [
            "deno",
            "run",
            "--allow-read",
            "https://github.com/leighmcculloch/mcp-stellar-xdr/raw/refs/heads/main/mcp-stellar-xdr.ts"
          ]
        }
      }
    }
    
  2. 重新打开克劳德桌面。

用法(克劳德代码)

  1. 添加服务器配置:

    claude mcp add \
      --transport stdio \
      --scope user \
      mcp-stellar-xdr \
      -- \
      npx deno run --allow-read https://github.com/leighmcculloch/mcp-stellar-xdr/raw/refs/heads/main/mcp-stellar-xdr.ts
    
  2. 重新打开克劳德代码。

示例

理解交易

https://github.com/user-attachments/assets/8c4eef81-9109-432d-8be6-8e24ead74eef

理解合同事件

https://github.com/user-attachments/assets/91523c7e-652e-46f8-92af-2315f408e32d