Releases: BrainDAO/mcp-polymarket
Release list
v0.1.0
Minor Changes
-
#61
8d32e91Thanks @petrarka! - Migrate to Polymarket v2 / pUSD (April 28 2026 exchange upgrade)The Polymarket exchange migrated from USDC.e to pUSD collateral and bumped CLOB endpoints to v2 on April 28 2026. The legacy
@polymarket/clob-client(v1) is no longer compatible — placing orders against the v2 exchange fails when signed with v1 contracts.Changes:
- Swap dependency
@polymarket/clob-client@^4.22.8→@polymarket/clob-client-v2@^1.0.6(addviemas supporting dep). services/trading.ts: v2 SDK uses an object-form constructor ({ host, chain, signer, ... }) and renameschainIdtochain. API credentials usecreateOrDeriveApiKey()with validation and a strict direct-derivation fallback; authenticated clients throw API failures instead of returning error payloads as successful values.UserOrder/UserMarketOrdernowUserOrderV2/UserMarketOrderV2. The v2 types droppedfeeRateBps,nonce, andtaker. BUY orders pass the user's pUSD balance for fee-aware sizing.services/config.ts:USDC_ADDRESS(USDC.e) replaced withCOLLATERAL_ADDRESS(pUSD0xC011a7E1...). Exchange and collateral-adapter addresses use the canonical V2 contracts. Added USDC.e onramp/offramp constants for future wrap/unwrap flows.services/approvals.ts: pUSD and CTF approvals target the V2 exchanges and collateral adapters.services/redemption.ts: standard and NegRisk redemption route through their V2 collateral adapters and return pUSD.services/api.ts: dropped thePolymarketSDK(v1) usage from@jsr/hk__polymarketin favor of a direct/bookfetch (the endpoint is public and works without auth).GammaSDKis retained for market discovery — Gamma API was not affected by the upgrade.tools/get-balance-allowance.ts,tools/update-balance-allowance.ts:AssetTypeimport path updated to v2 SDK.
Adds
smoke-test.mjs— a retry-aware regression harness for live read-only APIs, signature defaults, authenticated client initialization, pUSD balance access, and V2 order signing. It never posts an order or sends an on-chain transaction. Run withnode smoke-test.mjsafterpnpm build.Default
signatureTypesemantics are unchanged (still 2 = POLY_GNOSIS_SAFE when auto-detected with afunderAddress, 0 = EOA otherwise) — v2 ClobClient continues to acceptsignatureType+funderAddressfor proxy-wallet flows. - Swap dependency
v0.0.18
Patch Changes
-
#57
c67679fThanks @MarvelNwachukwu! - Cleanup batch:- Fix stderr log lines running together due to missing trailing newlines on init/order/market-order logs (server log output is no longer corrupted into one line)
- Reject invalid
outcomeIndexfor negRisk redemption instead of silently defaulting to outcome 0 — prevents accidentally redeeming the losing side when the caller passes a bad value - Move
shxfromdependenciestodevDependenciesso npm consumers don't pull it in
v0.0.17
Patch Changes
-
750f240: Fix MCP protocol logging and rename RPC environment variable
- Route all server log output to stderr so it no longer corrupts the MCP stdout JSON-RPC stream
- Rename
POLYMARKET_RPC_URLtoPOLYGON_RPC_URL(update your env/config accordingly) - Remove emoji characters from log messages
v0.0.16
Patch Changes
-
0f1d89f: Fix npm compatibility by replacing JSR protocol dependency
- Replace
jsr:@hk/polymarketwith npm-compatible@jsr/hk__polymarketpackage - Fix
EUNSUPPORTEDPROTOCOLerror when installing with npm/npx - Enable installation with all package managers (npm, pnpm, yarn) without JSR-specific syntax
- Replace
v0.0.15
Patch Changes
-
57566eb: Fix network detection errors with flaky RPC endpoints
- Use StaticJsonRpcProvider instead of JsonRpcProvider to bypass network auto-detection
- Fix signature type auto-detection being overwritten during config merge
- Skip approval checks for proxy wallet mode (signature type 2) since approvals are managed via Polymarket UI
v0.0.14
Patch Changes
- e4de267: Fix clob client errors on createOrDeriveApiKey
v0.0.13
Patch Changes
- 768ef22: Makes default signature type to 2 for supporting proxy contract
v0.0.12
v0.0.11
Patch Changes
- 2829873: adds approval code for negrisk
v0.0.10
Patch Changes
- 859db6c: improve tool descriptions