@hashpower/mcp
OfficialThis server is a knowledge base and simulator for agents building Hashpower trading bots, not a trading API: it provides market semantics, live market reads, and order simulation, but never holds keys or executes trades.
Retrieve protocol knowledge: get deployments, market rules/semantics, margin model, units and scaling
Read live market data: hashprice, order book (futures/perps), trades, funding, expirations, market stats, oracle history, positions, and margin status
Simulate and validate orders: simulate an order's fill price/quantity and check
canPlaceOrder(portfolio margin gate)Scaffold unsigned transactions (prototype only): build deposit or order calldata for local signing — not for production
Query by explicit wallet parameter with no server-side session or key storage
Reads on-chain data from the Ethereum (Base) network, including hashprice, orderbooks, positions, margin status, and simulates order fills for Hashpower trading bots. Does not execute trades.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@hashpower/mcp simulate an order to mine 1 PH/s for 24h"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@hashpower/mcp
Knowledge base and simulator for agents building Hashpower trading bots. Not a trading API. This server never holds keys, never broadcasts transactions, and is never in the production trade path.
The permissionless API is the contracts on Base plus the public subgraphs. This MCP server teaches an agent those rules, lets it scan the same live market a human reads on the trading UI, and lets it simulate - then the agent writes its own bot against @hashpower/*-abi. Execution never goes through this server.
Instruction manual (setup, guardrails, tools, units, how to execute locally): docs/agent-manual.md. Hosted for agents at dev.hashpower.io/build/mcp.md (testnet) and hashpower.io/build/mcp.md (mainnet; site build rewrites client key and URLs).
Connect
Hosted testnet - Cursor key dev-hashpower (reserves hashpower for production):
{
"mcpServers": {
"dev-hashpower": {
"url": "https://mcp.dev.hashpower.io/mcp"
}
}
}Hosted mainnet (when LMN is live):
{
"mcpServers": {
"hashpower": {
"url": "https://mcp.hashpower.io/mcp"
}
}
}Same image, HASHPOWER_ENV flipped by the deploy workflow. initialize.serverInfo.name is dev-hashpower on testnet and hashpower on mainnet.
Local stdio (agent brings its own RPC):
{
"mcpServers": {
"dev-hashpower": {
"command": "npx",
"args": ["-y", "@hashpower/mcp"],
"env": {
"HASHPOWER_ENV": "testnet"
}
}
}
}Until the first npm publish, npx -y github:Lumerin-protocol/hashpower-mcp#dev works the same way.
Optional env:
Variable | Default (testnet) | Meaning |
|
|
|
|
| Ethereum JSON-RPC |
|
| Semantics source ( |
|
|
|
|
| HTTP bind port |
Prerequisite for any real trade: the bot wallet holds Base ETH (gas) and USDC (collateral). Deposit to CollateralVault first.
Related MCP server: QuantRisk
Tools
See the instruction manual for the full catalog, units, and operating loop. Short list:
Knowledge: get_deployments, get_market_rules, get_margin_model, get_units_and_scaling
Read: get_market_snapshot, get_hashprice, get_orderbook, get_trades, get_funding, get_expirations, get_market_stats, get_oracle_history, get_positions, get_margin_status
Simulate: simulate_order, check_can_place_order
Scaffold (prototype only): build_deposit_tx, build_order_tx - unsigned calldata. Production bots encode via the npm packages.
Local dev
pnpm install
pnpm check
pnpm test
pnpm build
pnpm start
HASHPOWER_TRANSPORT=http pnpm start:httpHosted HTTP is stateless: no MCP session, no ALB stickiness. Any Fargate task can serve any request.
What this is not
Not a wallet manager
Not a hosted order router
Not an API-key product
Not in the runtime path of a production bot
Available Tools
12 toolsbuild_deposit_txScaffold deposit calldataA
PROTOTYPE ONLY. Returns unsigned approve+deposit calldata. Simulate, then sign locally. Not for production bots.
Inputs: amount (required).
build_order_txScaffold createOrder calldataA
PROTOTYPE ONLY. Returns unsigned createOrder calldata. Run simulate_order and check_can_place_order first. Production bots encode via the npm ABI packages.
Inputs: price (required), venue (required), quantity (required), timeInForce, +1 more.
check_can_place_orderCheck canPlaceOrderB
PortfolioMarginEngine.canPlaceOrder(wallet, additionalIM) — the pre-trade gate. additionalIM is integer token units (USDC 6 decimals).
Inputs: wallet (required), additionalIm (required).
get_deploymentsGet deploymentsA
Return contract addresses, subgraph URLs, chain ID, and published @hashpower/*-abi package versions for the configured environment (testnet or mainnet).
Inputs: no named parameters.
get_hashpriceGet hashpriceA
Read the on-chain hashprice oracle via AggregatorV3 latestRoundData().
Inputs: pair.
get_margin_modelGet margin modelB
Portfolio margin / IM / MM / liquidation rules for perps and futures.
Inputs: no named parameters.
get_margin_statusGet margin statusB
Vault balance, portfolio IM/MM, and isHealthy for a wallet (eth_call).
Inputs: wallet (required).
get_market_rulesGet market rulesA
Agent-facing market semantics from hashpower.io /semantics (same source as GitBook). Omit slug to list the catalog; pass a slug such as futures-margin or perps-trading to fetch the markdown.
Inputs: slug.
get_orderbookGet order bookA
On-chain CLOB prices. For futures, expirationAt (unix seconds) is required. Perps is a single perpetual book.
Inputs: venue (required), maxLevels, expirationAt.
get_positionsGet positions and open ordersC
Open positions and resting orders for a wallet from the public subgraphs. Wallet is a parameter — this server has no session.
Inputs: wallet (required), venue.
get_units_and_scalingGet units and scalingC
Oracle decimals, futures contract unit/ticks, and perps QUANTITY_DECIMALS / order scaling.
Inputs: no named parameters.
simulate_orderSimulate orderA
On-chain simulateOrder view: would this price/qty fill, at what average? Positive qty = buy, negative = sell. Does not place an order.
Inputs: price (required), venue (required), quantity (required), expirationAt.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct resource or action: market rules, margin model, units/scaling, and deployments are clearly separated, while check_can_place_order, simulate_order, and build_order_tx form a clear pre-trade pipeline. There is no meaningful overlap that would cause an agent to select the wrong tool.
All tool names follow a consistent snake_case verb_noun pattern: read-only operations use get_, and simulation/build operations use descriptive verbs. The naming style is uniform and predictable across the entire toolset.
12 tools is a well-scoped count for a trading-domain MCP server. Each tool covers a distinct aspect—market data, account state, margin checks, simulation, and transaction building—without redundancy or bloat.
The toolset covers the core domain well: market semantics, live data, positions, margin status, order pre-flight checks, and unsigned transaction building. Obvious lifecycle operations like cancel or withdraw are not exposed, but the explicit prototype-only and external-encoding caveats make this a minor gap rather than a severe one.
Related MCP Connectors
A paper-money exchange: read live order books, place practice trades, test a bot. No sign-up.
Sandbox marketplace where AI agents hire agents for verified outcomes. Test money only.
Markets, strategies with a measured record and your own account, for any AI. Read-only.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to trade crypto with paper money, access market data, view leaderboards, and manage trading bots via an MCP-compatible interface.16MIT
- FlicenseAqualityCmaintenanceEnables agents to generate alpha signals, retrieve market snapshots, compute portfolio risk, validate and submit paper orders, and trigger a kill switch, all under deterministic pre-trade risk controls and audit logging.5-
- AlicenseNot gradedqualityBmaintenanceProvides a safe paper-trading twin of the Binance Agent OS MCP API so agents can be rehearsed, scored, gated for go-live, and shadow-compared against live calls without using real funds.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to paper-trade on Polymarket against live order books with realistic fees and fill mechanics, including market search, portfolio tracking, and strategy backtesting.33157 PyPI509MIT