hip4-mcp

hip4-mcp

Provides read-only tools for discovering, analyzing, and monitoring Hyperliquid HIP-4 prediction markets (outcome trading) on testnet.

Category
访问服务器

README

hip4-mcp

⚠️ EXPERIMENTAL — HIP-4 is currently live on Hyperliquid testnet only. Mainnet launch is expected in 2026 (no exact date announced). This server will be updated for mainnet once HIP-4 goes live.

MCP server for Hyperliquid HIP-4 prediction markets (outcome trading). Provides read-only tools for discovering, analyzing, and monitoring outcome contracts.

What is HIP-4?

HIP-4 adds outcome trading to Hyperliquid — fully collateralized binary contracts that settle to 0 or 1 based on whether an event occurs. Think prediction markets built natively on HyperCore's orderbook.

  • Binary YES/NO contracts priced 0–1 (price = implied probability)
  • No leverage, no liquidations — fully collateralized
  • Settles in USDH (Hyperliquid's native stablecoin)
  • Traded on HyperCore's central limit orderbook (same infra as perps/spot)

Install

npm install -g hip4-mcp

Or clone and build:

git clone https://github.com/yashhsm/hip4-mcp.git
cd hip4-mcp
npm install
npm run build

Configure in Claude Code

Add to your MCP config (.mcp.json or Claude Code settings):

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

Tools

list_outcomes

List all HIP-4 outcome markets with metadata, side specs, and linked questions. For priceBinary markets, returns parsed underlying asset, target price, expiry, and period.

get_outcome_book

Get the L2 orderbook for a specific outcome side. Returns bids, asks, spread, and depth summary.

get_outcome_prices

Get mid prices for all outcome markets with decoded outcome IDs and side names.

get_outcome_positions

Get a user's outcome token balances (prediction market positions).

get_outcome_depth_summary

Get depth summary across ALL outcome markets — bid/ask depth, spread, best prices for every active side.

search_outcomes

Search and filter outcomes by underlying asset (BTC, HYPE), type (priceBinary), or keyword. Optionally filter to only markets with orderbook depth.

get_outcome_candles

Get OHLCV candle data for an outcome side. Useful for charting price history.

get_outcome_trades

Get a user's fill history filtered to outcome markets only.

get_outcome_open_orders

Get a user's open orders filtered to outcome markets only.

encoding_helper

Convert between outcome IDs, side indices, coin symbols (#xxx), token names (+xxx), and asset IDs. Useful for understanding the HIP-4 encoding system.

HIP-4 Asset Encoding

Outcome assets use a special encoding on Hyperliquid:

Component Formula Example (BTC outcome 2146, YES)
Encoding 10 * outcomeId + side 21460
Spot coin #<encoding> #21460
Token name +<encoding> +21460
Asset ID 100_000_000 + encoding 100021460

Side is 0 for the first outcome (usually YES), 1 for the second (usually NO).

Network

All tools accept a network parameter ("testnet" or "mainnet"), defaulting to "testnet".

  • Testnet: https://api.hyperliquid-testnet.xyz
  • Mainnet: https://api.hyperliquid.xyz

Testing

npm run build
node dist/test.js

Runs integration tests against the Hyperliquid testnet API.

Status

  • [x] Read endpoints (outcomeMeta, L2 book, mids, positions, candles, fills, orders)
  • [x] Encoding helpers
  • [x] PriceBinary description parsing
  • [x] Search/filter outcomes
  • [x] Complementary pricing validation (YES + NO = 1)
  • [ ] Write endpoints (place order, cancel) — coming with mainnet launch
  • [ ] WebSocket subscriptions for real-time price updates
  • [ ] USDH collateral management helpers

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选