THORChain MCP Server

THORChain MCP Server

Enables AI assistants to query THORChain blockchain data including transactions, address history, liquidity pool statistics, network metrics, and vault addresses through a standardized interface.

Category
访问服务器

README

mcp-thorchain

A Model Context Protocol (MCP) server providing access to THORChain blockchain data. This server enables AI assistants like Claude to query THORChain transactions, pools, network statistics, and vault addresses through a standardized interface.

Features

  • Transaction Lookup: Get detailed information about specific THORChain transactions
  • Address History: Query transaction history for any blockchain address
  • Pool Statistics: Access liquidity pool data including prices, APY, and trading volume
  • Pool Details: Get in-depth information for specific liquidity pools
  • Network Stats: Retrieve network-wide statistics including swap volumes and active users
  • Vault Addresses: Get current inbound addresses for depositing funds to THORChain

Requirements

  • Node.js >= 20.0.0
  • npm or compatible package manager

Installation

From npm (Recommended)

npm install -g @missionsquad/mcp-thorchain

From Source

# Clone the repository
git clone https://github.com/MissionSquad/mcp-thorchain.git
cd mcp-thorchain

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Claude Desktop

To use this MCP server with Claude Desktop, add the following configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "thorchain": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-thorchain/dist/index.js"
      ]
    }
  }
}

Replace /absolute/path/to/mcp-thorchain with the actual path to your installation directory.

After adding the configuration:

  1. Completely quit Claude Desktop (Cmd+Q on macOS, or via System Tray on Windows)
  2. Reopen Claude Desktop
  3. The THORChain tools should now be available

Testing with MCP Inspector

You can test the server without Claude Desktop using the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

This will open a web interface (usually at http://localhost:5173) where you can:

  • View all available tools
  • Test tool execution with custom parameters
  • See request/response data
  • Debug server behavior

Available Tools

1. get-transaction

Get detailed information about a specific THORChain transaction.

Parameters:

  • txid (string, required): Transaction hash (64-character hexadecimal string)

Example:

{
  "txid": "DC85CB537CB6082F61270D70C4058BB111475BCDC403E6E42AAF2106D067E1B4"
}

2. get-address-history

Retrieve transaction history for a blockchain address.

Parameters:

  • address (string, required): Blockchain address to query
  • limit (number, optional): Maximum transactions to return (default: 10, max: 50)
  • offset (number, optional): Pagination offset (default: 0)

Example:

{
  "address": "thor1...",
  "limit": 20,
  "offset": 0
}

3. get-pools

Get statistics for all THORChain liquidity pools.

Parameters:

  • period (enum, optional): Time period - "1h" | "24h" | "7d" | "30d" | "90d" | "365d" | "all" (default: "24h")

Example:

{
  "period": "24h"
}

4. get-pool-detail

Get detailed information for a specific liquidity pool.

Parameters:

  • asset (string, required): Pool asset identifier (e.g., "BTC.BTC", "ETH.ETH")

Example:

{
  "asset": "BTC.BTC"
}

5. get-network-stats

Get overall THORChain network statistics.

Parameters: None

6. get-vault-addresses

Get current THORChain vault addresses for depositing funds.

Parameters: None

API Providers

The server automatically rotates between multiple API providers for redundancy:

Primary: Nine Realms (https://midgard.ninerealms.com, https://thornode.ninerealms.com) Fallback: Liquify (https://midgard.thorchain.liquify.com, https://thornode.thorchain.liquify.com)

If the primary provider fails or times out, the server automatically tries the fallback provider.

Development

Build

npm run build

Watch Mode

npm run watch

Project Structure

mcp-thorchain/
├── src/
│   ├── index.ts           # MCP server and tool definitions
│   ├── api-client.ts      # THORChain API client with provider rotation
│   └── types.ts           # TypeScript type definitions
├── dist/                  # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md

Technical Details

Dependencies

  • @modelcontextprotocol/sdk@1.22.0: MCP server SDK
  • zod@3.23.8: Schema validation

Type Safety

The project uses TypeScript with strict mode enabled. Due to a known incompatibility between Zod v3.23.8 (bundled with the MCP SDK) and TypeScript's type inference, the main server file uses @ts-nocheck. Runtime validation and type safety are maintained through Zod schemas.

Error Handling

  • All API requests include 5-second timeouts
  • Automatic provider failover on connection errors
  • Comprehensive error messages with context
  • Custom THORChainAPIError class for API-specific errors

Troubleshooting

Tools Not Appearing in Claude

  1. Verify the path in claude_desktop_config.json is absolute and correct
  2. Ensure the project is built (npm run build)
  3. Completely quit and restart Claude Desktop
  4. Check Claude's logs:
    • macOS: ~/Library/Logs/Claude/mcp-server-thorchain.log
    • Windows: %APPDATA%\Claude\logs

Build Errors

If you encounter build errors after updating dependencies:

# Clean and rebuild
rm -rf dist node_modules package-lock.json
npm install
npm run build

Connection Timeouts

The server has a 5-second timeout for each API request. If you're experiencing frequent timeouts:

  1. Check your internet connection
  2. Verify the API providers are operational
  3. The server will automatically try the fallback provider

API Reference

For detailed THORChain API documentation, see the THORChain API Handbook.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选