Skip to main content
Glama
mektigboy

Hyperliquid MCP Server

by mektigboy

get_all_mids

Retrieve mid prices for all available coins on Hyperliquid exchange using this tool, enabling efficient access to real-time market data for analysis or trading strategies.

Instructions

Get mid prices for all coins on Hyperliquid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that calls hyperliquidClient.allMids() and formats the response as MCP content.
    export async function getAllMids(hyperliquidClient: PublicClient) { let allMids = await hyperliquidClient.allMids(); return { content: [{ type: "text", text: JSON.stringify(allMids) }], isError: false, };
  • The tool schema definition including name, description, and empty input schema.
    export const ALL_MIDS_TOOL: Tool = { name: "get_all_mids", description: "Get mid prices for all coins on Hyperliquid", inputSchema: { type: "object", properties: {}, required: [], }, };
  • src/index.ts:46-48 (registration)
    Registration in the CallToolRequest handler switch statement dispatching to the getAllMids handler.
    case "get_all_mids": { return await getAllMids(hyperliquidClient); }
  • src/index.ts:78-79 (registration)
    Registration in the ListToolsRequest handler including ALL_MIDS_TOOL in the tools list.
    tools: [ALL_MIDS_TOOL, CANDLE_SNAPSHOT_TOOL, L2_BOOK_TOOL], };

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mektigboy/server-hyperliquid'

If you have feedback or need assistance with the MCP directory API, please join our Discord server