返回市场
MCP-恒星-XDR-JSON

MCP-恒星-XDR-JSON

作者:leighmcculloch2 星标更新:2025-09-08

项目介绍

Stellar MCP Server for XDR

这是一个解码Stellar XDR到XDR-JSON的Model Context Protocol (MCP)服务器,代理可以使用它来理解XDR的含义。

提供五个工具:

  • mcp_stellar-xdr_types - 获取支持的XDR类型。
  • mcp_stellar-xdr_json_schema - 获取XDR类型的JSON模式。
  • mcp_stellar-xdr_guess - 推测Stellar XXDR的类型,返回可能类型的列表。
  • mcp_stellar-xdr_decode - 将Stellar XDR解码为JSON。
  • mcp_stellar-xdr_encode - 将Stellar XDR从JSON编码。

使用方法(通用)

要与代理一起使用,请设置一个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)

要在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. 重新打开Claude Desktop。

使用方法(Claude Code)

  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. 重新打开Claude Code。

示例

理解一笔交易

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

理解一个合约事件

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