Pear MCP server
io.github.MarvelNwachukwu/mcp-pear·v0.2.2·1 starsMCP server for Pear Protocol: markets, positions, orders, portfolio, and gated trade execution.
1 stars33 downloads/wk
Reviews
Write oneNobody has reviewed Pear yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Pear tools (20, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
adjust_leverageChange leverage (1-100x) on an existing Pear Protocol position. Higher leverage means greater liquidation risk for the same price move. WRITE: changes risk profile of a live position. Requires PEAR_TRADE_ENABLED=true.
adjust_positionReduce or increase an existing Pear Protocol position's size by 1-100 percent. executionType: MARKET (immediate) or LIMIT (provide limitRatio). WRITE: changes exposure on a real trade. Requires PEAR_TRADE_ENABLED=true.
cancel_orderwrite actionCancel a pending Pear Protocol limit, take-profit, or stop-loss order by orderId. Does not affect already-filled portions. For TWAP orders, use cancel_twap_order. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.
cancel_twap_orderwrite actionCancel a Pear Protocol TWAP (time-weighted average price) order and all of its remaining unfilled chunks. WRITE: cancels a live order. Requires PEAR_TRADE_ENABLED=true.
close_all_positionsClose every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. Requires PEAR_TRADE_ENABLED=true.
close_positionClose one open Pear Protocol position by positionId. executionType: MARKET (immediate) or TWAP (spread over time; requires twapDuration in seconds). WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.
create_agent_walletwrite actionCreate a new Pear Protocol agent wallet for the authenticated user. The agent wallet is what Pear uses to sign Hyperliquid trades. After creation, the user MUST approve this wallet on Hyperliquid (the response message contains the approval instructions). WRITE: executes a state change. Requires PEAR_TRADE_ENABLED=true.
get_account_summaryGet the authenticated user's Pear Protocol account summary: agent wallet address, total closed trades, pending trigger-order USD value, pending TWAP-chunk USD value, and last sync timestamp. Requires PEAR_API_KEY.
get_active_marketsGet the most active Pear Protocol pair markets right now: current active pairs plus top gainers, top losers, highlighted pairs, and the user's watchlist. Use to see what's hot or as a starting point for narrowing into a specific pair.
get_agent_walletGet the authenticated user's Pear Protocol agent wallet address. The agent wallet is what Pear uses to sign Hyperliquid trades on the user's behalf. Returns an empty/missing address if no agent wallet has been created yet; call create_agent_wallet to create one.
get_healthCheck Pear Protocol API health. Returns service status, server timestamp, and uptime in seconds. Use this to verify the API is reachable before running other tools.
get_open_ordersList the authenticated user's open limit, take-profit, and stop-loss orders on Pear Protocol. Returns each order's ID, type, status, and pair composition. Requires PEAR_API_KEY.
get_open_positionsList the authenticated user's currently open Pear Protocol pair positions, including position ID, entry ratio, mark ratio, unrealized PnL, and long/short composition. Requires PEAR_API_KEY.
get_pair_ratioGet the current ratio (long/short composition price) for a specific Pear Protocol pair. Pass long and short asset arrays. Returns the ratio, 24h change, and funding rate. Useful when you know the pair you care about and want the latest number.
get_portfolioFetch the authenticated user's full portfolio metrics on Pear Protocol: bucketed PnL across last 1 day / 1 week / 1 month / 1 year / all-time, plus overall stats (total trades, all-time volume, current open interest, unrealized PnL). Requires PEAR_API_KEY.
get_trade_historyFetch the authenticated user's recent closed trades on Pear Protocol with realized PnL, entry/exit ratios, and pair composition. Optional date range and limit. Requires PEAR_API_KEY.
get_twap_ordersList the authenticated user's active TWAP (time-weighted average price) orders on Pear Protocol, including chunk execution and fill detail. Requires PEAR_API_KEY.
list_marketsBrowse Pear Protocol pair markets with optional filters and pagination. Each market is a long/short composition with current ratio, 24h change, volume, open interest, and funding. Use to discover what's tradable, or with searchText to find a specific pair.
open_positionOpen a new pair position on Pear Protocol. Specify executionType (MARKET / TRIGGER / TWAP / LADDER / TP / SL / SYNC), leverage (1-100), usdValue (≥1), slippage (0.001-0.1), and the long/short asset compositions (arrays of { asset, weight }). Optionally attach stopLoss/takeProfit and TWAP/TRIGGER/LADDER parameters. WRITE: executes a real trade. Requires PEAR_TRADE_ENABLED=true.
set_risk_parametersSet or update stop-loss / take-profit on an existing Pear Protocol position. Each threshold has type ('PRICE' or 'PERCENTAGE'), value, and optional trailing fields. Pass null to clear a field; omit it to leave unchanged. WRITE: changes risk parameters on a live position. Requires PEAR_TRADE_ENABLED=true.
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan71 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 69 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Pear compares
Against every graded E-commerce MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 78/100
- higher than 67% of 2,174 E-commerce servers
- Tools
- 20
- the typical E-commerce server has 6
- Tools that change things
- 15%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 1
- more than 65% of 1,047 E-commerce servers
- Downloads a week
- 33
- more than 25% of 411 E-commerce servers with a package
What its tools let an agent do: 13 read · 2 create · 3 change · 2 delete
Install Pear in Claude Code, Cursor or VS Code
Runs npx -y @marvelcodes/mcp-pear on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add mcp-pear -- npx -y @marvelcodes/mcp-pear
What the publisher says
From the Pear repository's README, as published. We do not edit it. Read it on GitHub
mcp-pear
The Pear Protocol MCP server for Hyperliquid pair trading — connect Claude, Cursor, or any AI agent to on-chain perps: browse pair markets, read positions and portfolio, and (opt-in) execute pair trades.
Model Context Protocol (MCP) server for Pear Protocol. Gives Claude, or any MCP-compatible agent, access to markets, pair ratios, positions, orders, trade history, portfolio, and (v0.2) full trade execution on Hyperliquid.
v0.2 adds trade execution. Ten write tools (open, close, and adjust positions; manage leverage and risk; cancel orders) are off by default behind PEARTRADEENABLED=true. Pear signs server-side, so mcp-pear never holds private keys.
What is Pear Protocol?
Pear is a Hyperliquid-backed perps platform for pair markets: long one basket against another. Every pair has a live ratio that moves as the legs diverge. More at pearprotocol.io.
Tools
Public (no auth):
- get_health: API health and uptime
- list_markets: browse pair markets with filters and pagination
- getactivemarkets: top gainers, losers, and highlighted pairs
- getpairratio: current ratio, 24h change, and funding for a specific pair
Authenticated read:
- getaccountsummary: your account header
- getopenpositions: your open positions with PnL
- getopenorders: your open limit, TP, and SL orders
- gettwaporders: your active TWAP orders
- gettradehistory: your closed trades with realized PnL
- get_portfolio: bucketed PnL across 1d, 1w, 1m, 1y, and all-time
- getagentwallet: the agent wallet Pear uses to sign your trades
Authenticated write (v0.2, gated behind PEARTRADEENABLED=true):
- createagentwallet: create the agent wallet
- openposition, closeposition, closeallpositions: open and close pair positions
- adjustposition, adjustleverage: change size or leverage on a live position
- setriskparameters: set or update TP and SL
- cancelorder, canceltwap_order: cancel pending orders
Full parameter reference in Tool reference. See Trade execution (v0.2) for the gate and Hyperliquid funding rules.
Install
# Run directly
npx -y @marvelcodes/mcp-pear@latest
# Or install globally
pnpm install -g @marvelcodes/mcp-pear
mcp-pearPin @latest (or a specific version) in the npx spec. Plain npx @marvelcodes/mcp-pear can launch a stale cached version: npx prefers its local cache over the npm registry when the spec is unpinned, so after a new release lands you may still be running the old one. @latest re-resolves against the registry each launch; pin like @0.2.0 instead if you want a frozen version. Stuck on an old version after upgrading? Clear the npx cache: rm -rf ~/.npm/_npx (macOS/Linux).
Getting an API key
For the authenticated tools, mint a key:
npx -y @marvelcodes/mcp-pear@latest setupThe CLI opens a browser, asks you to sign once with your wallet, mints a Pear API key, and (optionally) writes PEARAPIKEY and PEAR_ADDRESS to a .env. Copy those two values into your Claude Desktop config and restart Claude.
Already have a JWT from app.pear.garden? Skip setup and use JWT pass-through below.
Configuration
Three auth modes. mcp-pear uses the first one whose env vars are set, decided on the first authenticated call.
Mode 1: JWT pass-through (multi-tenant orchestrators)
For Telegram bots and other orchestrators that mint JWTs externally (Privy, EIP-712, or any Pear-supported flow). The JWT is opaque; mcp-pear never calls /auth/login.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Pear: common questions
- Is Pear MCP server safe?
- Mostly: it is graded B (78/100). Read the Pear safety report
- How do I install Pear?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Pear need an API key?
- Yes. The registry entry asks for
PEAR_API_KEY,PEAR_JWT,PEAR_REFRESH_TOKEN. - Is Pear maintained?
- The last commit was 109 days ago (2026-07-18). The latest release is v0.2.2.
- What can I use instead of Pear?
- Servers from other publishers that do the same job: Polymarket Toolkit MCP server, Iran Crypto Exchanges MCP server and Longbridge MCP server.
- How does Pear compare with other E-commerce MCP servers?
- safety score 78/100 (higher than 67% of 2,174 E-commerce servers); tools 20 (the typical E-commerce server has 6); tools that change things 15% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Pear
Same job from other publishers: the closest match first, then the best rated.
- Polymarket ToolkitRead-only Polymarket data tools for AI agents: profiles, PnL, market scans. No keys, no orders.not reviewedEstablishedB
- Iran Crypto ExchangesUnofficial read-only Iranian crypto exchanges: prices in Toman, order books, trades, candles.not reviewedGrowingA
LongbridgeUS/HK markets — 163 tools: quotes, options, orders, fundamentals, screener, IPO, alerts, DCA & gridnot reviewedGrowingA- OmieMCP server for Omie — ERP, customers, products, orders, invoices, financialsnot reviewedEstablishedB
- Sv NumberPhone numbers for AI agents: order a private number, read the SMS verification code, hand it back.not reviewedEstablishedB