Skip to content

Releases: BrainDAO/mcp-polymarket

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Aug 16:08
0e35d4b

Minor Changes

  • #61 8d32e91 Thanks @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 (add viem as supporting dep).
    • services/trading.ts: v2 SDK uses an object-form constructor ({ host, chain, signer, ... }) and renames chainId to chain. API credentials use createOrDeriveApiKey() with validation and a strict direct-derivation fallback; authenticated clients throw API failures instead of returning error payloads as successful values.
    • UserOrder / UserMarketOrder now UserOrderV2 / UserMarketOrderV2. The v2 types dropped feeRateBps, nonce, and taker. BUY orders pass the user's pUSD balance for fee-aware sizing.
    • services/config.ts: USDC_ADDRESS (USDC.e) replaced with COLLATERAL_ADDRESS (pUSD 0xC011a7E1...). 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 the PolymarketSDK (v1) usage from @jsr/hk__polymarket in favor of a direct /book fetch (the endpoint is public and works without auth). GammaSDK is retained for market discovery — Gamma API was not affected by the upgrade.
    • tools/get-balance-allowance.ts, tools/update-balance-allowance.ts: AssetType import 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 with node smoke-test.mjs after pnpm build.

    Default signatureType semantics are unchanged (still 2 = POLY_GNOSIS_SAFE when auto-detected with a funderAddress, 0 = EOA otherwise) — v2 ClobClient continues to accept signatureType + funderAddress for proxy-wallet flows.

v0.0.18

Choose a tag to compare

@github-actions github-actions released this 15 May 11:13
9dc8a93

Patch Changes

  • #57 c67679f Thanks @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 outcomeIndex for negRisk redemption instead of silently defaulting to outcome 0 — prevents accidentally redeeming the losing side when the caller passes a bad value
    • Move shx from dependencies to devDependencies so npm consumers don't pull it in

v0.0.17

Choose a tag to compare

@github-actions github-actions released this 13 May 09:45
5dd8ce4

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_URL to POLYGON_RPC_URL (update your env/config accordingly)
    • Remove emoji characters from log messages

v0.0.16

Choose a tag to compare

@github-actions github-actions released this 11 Feb 08:50
3cb1ba3

Patch Changes

  • 0f1d89f: Fix npm compatibility by replacing JSR protocol dependency

    • Replace jsr:@hk/polymarket with npm-compatible @jsr/hk__polymarket package
    • Fix EUNSUPPORTEDPROTOCOL error when installing with npm/npx
    • Enable installation with all package managers (npm, pnpm, yarn) without JSR-specific syntax

v0.0.15

Choose a tag to compare

@github-actions github-actions released this 29 Jan 12:13
5c1c47b

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

Choose a tag to compare

@github-actions github-actions released this 15 Jan 06:12
a7f671a

Patch Changes

  • e4de267: Fix clob client errors on createOrDeriveApiKey

v0.0.13

Choose a tag to compare

@github-actions github-actions released this 03 Nov 10:40
9d1e65b

Patch Changes

  • 768ef22: Makes default signature type to 2 for supporting proxy contract

v0.0.12

Choose a tag to compare

@github-actions github-actions released this 03 Nov 10:22
b9356ad

Patch Changes

  • aee641d: Add close false for get active markets
  • aabc860: Improves the approvals service code

v0.0.11

Choose a tag to compare

@github-actions github-actions released this 03 Nov 09:55
8620f1e

Patch Changes

  • 2829873: adds approval code for negrisk

v0.0.10

Choose a tag to compare

@github-actions github-actions released this 03 Nov 08:44
9eef436

Patch Changes

  • 859db6c: improve tool descriptions