mcp

v0.1.3
@poincaretrade/mcp Checked 12 hours ago Published 4 days ago

MCP server for the Poincaré hook: lets AI agents read the trend regime and create and manage spread-aware DCA orders.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_regime Current trend regime

What the next swap on the Poincaré WETH/USDC pool sees this block: the confirmed trend (CUSUM, data-dependent), evidence toward the threshold, which side pays the trend spread and how much, base fee and mid price. Market orientation: USDC per WETH.

get_regime_history Trend history

The hook's own detector samples over recent blocks, with where trends started, ended or flipped.

ParameterTypeDescription
blocksintegerHow many recent blocks to scan (default 3000)

wait_for_regime_change Wait for a trend onset

Block until the regime changes (trend started/ended/flipped, evidence building, spread engaged/released) or the timeout passes. Use it to react to the onset of a trend instead of polling.

ParameterTypeDescription
eventsarrayOnly return on these event types (default: any)
timeoutSecintegerGive up after this many seconds (default 60)

quote Quote a swap

Exact-input quote from the pool's Lens (matches router execution in the same block to the wei), with the spread and fee this side pays.

ParameterTypeDescription
amount *stringInput amount: USDC to buy, WETH to sell
side *stringbuy = pay USDC for WETH; sell = pay WETH for USDC

swap_build Build a swap (unsigned)

Plan an exact-input swap on the Poincaré pool and return UNSIGNED transactions for the owner's own wallet: an exact-amount approve (only if the allowance is short, never unlimited), then the router swap with a minimum-received floor from the Lens quote. Never sends, even if a key is configured. Leave `recipient` unset unless the user explicitly asked to send the output to another address.

ParameterTypeDescription
amount *stringInput amount: USDC to buy, WETH to sell
owner *stringThe wallet that will sign and pay
side *stringbuy = pay USDC for WETH; sell = pay WETH for USDC
recipientstringReceives the output; defaults to the owner. Only set when the user explicitly asks.
slippageBpsintegerMax shortfall vs the quote in bps (default 50, max 1000)

get_position LP position

An address's Poincaré LP shares, its share of the pool, what the shares redeem for right now (USDC and WETH), and their value at the pool's reserve price.

ParameterTypeDescription
owner *stringThe LP's address

lp_add_build Build a liquidity deposit (unsigned)

Plan a deposit at the pool's current ratio and return UNSIGNED transactions: exact-amount approvals only where short (never unlimited), then addLiquidity with real minimums. Give exactly one side (usdc or weth); the other is sized from the reserves. Never sends. Moving capital is the user's decision: build only when they asked to add liquidity.

ParameterTypeDescription
owner *stringThe wallet that will sign and deposit
slippageBpsintegerMax shortfall on each side in bps (default 50, max 1000)
usdcstringUSDC to deposit (the WETH side is sized for you)
wethstringWETH to deposit (the USDC side is sized for you)

lp_remove_build Build a liquidity withdrawal (unsigned)

Plan a withdrawal of a percentage of the position (above 0, at most 100) or an exact share count, and return the UNSIGNED removeLiquidity transaction with minimums from the current reserves. Never sends. Moving capital is the user's decision: build only when they asked to withdraw.

ParameterTypeDescription
owner *stringThe LP's wallet, which will sign
percentnumberShare of the position to withdraw, above 0 and at most 100, e.g. 50 or 0.5
sharesstringExact LP shares to burn, in base units (18 decimals)
slippageBpsintegerMax shortfall on each side in bps (default 50, max 1000)

dca_plan_order Plan a spread-aware DCA order

Validate a DCA order exactly as the contract will, show its schedule, and say what the first fill would do under the current regime. Sends nothing.

ParameterTypeDescription
amount *stringTotal budget in the input token (USDC to buy, WETH to sell), e.g. "1000"
intervalSec *integerSeconds between fills (>= 60)
side *stringbuy = pay USDC for WETH; sell = pay WETH for USDC
slices *integerNumber of fills
catchUpbooleanGrow later fills to make up skipped ones, so the order completes by the deadline. Default true
deadlineintegerUnix seconds; default one spare interval after the last planned fill
limitPricestringUSDC per WETH: the most a buy pays / the least a sell accepts
maxSlippageBpsintegerMax shortfall vs the in-transaction quote (bps). Default 50
maxSpreadBpsintegerSkip a fill while the trend spread on this side exceeds this (bps). 0 = never pay the spread. Default 10000 (no cap)
pauseOnTrendbooleanHold fills while a trend runs with this side (the side the pool charges); resume when it ends. Default false
recipientstringReceives every fill; default the owner
startTimeintegerUnix seconds; omit to start immediately

dca_create_order Create a DCA order

Escrow the budget in the PoincareDCA contract and open the order. Returns the unsigned approve + create transactions, or sends them when send=true and a key is configured.

ParameterTypeDescription
amount *stringTotal budget in the input token (USDC to buy, WETH to sell), e.g. "1000"
intervalSec *integerSeconds between fills (>= 60)
side *stringbuy = pay USDC for WETH; sell = pay WETH for USDC
slices *integerNumber of fills
catchUpbooleanGrow later fills to make up skipped ones, so the order completes by the deadline. Default true
deadlineintegerUnix seconds; default one spare interval after the last planned fill
limitPricestringUSDC per WETH: the most a buy pays / the least a sell accepts
maxSlippageBpsintegerMax shortfall vs the in-transaction quote (bps). Default 50
maxSpreadBpsintegerSkip a fill while the trend spread on this side exceeds this (bps). 0 = never pay the spread. Default 10000 (no cap)
ownerstringOrder owner; defaults to the configured key's address
pauseOnTrendbooleanHold fills while a trend runs with this side (the side the pool charges); resume when it ends. Default false
recipientstringReceives every fill; default the owner
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.
startTimeintegerUnix seconds; omit to start immediately

dca_get_order Get a DCA order

An order's state and progress, plus the contract's own verdict on its next fill.

ParameterTypeDescription
id *DCA order id

dca_list_orders List DCA orders

Every DCA order an address has opened, newest last, with each one's next-fill status.

ParameterTypeDescription
ownerstringDefaults to the configured key's address

dca_preview_slice Can the next fill run now?

PoincareDCA.canExecute: the next fill's size, quote, floor, the spread this block, and why it would be held if it would.

ParameterTypeDescription
id *DCA order id

dca_execute_slice Fill the next slice now

Fill the current slot's slice of your own order (keepers do this automatically; the owner may too). Checks the contract's verdict first and refuses if the fill would be held.

ParameterTypeDescription
id *DCA order id
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.

dca_cancel_order Cancel a DCA order

Cancel your order and refund its unfilled budget. Only the owner can.

ParameterTypeDescription
id *DCA order id
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.

dca_close_expired Refund an expired order

After the deadline, return an order's unfilled budget to its owner. Anyone may send this; the refund always goes to the owner.

ParameterTypeDescription
id *DCA order id
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.

dca_pause_order Pause a DCA order

Hold your order: no buy fills until you resume it. It can still be cancelled, and with catch-up the buys it misses are made up after resuming. Owner only.

ParameterTypeDescription
id *DCA order id
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.

dca_resume_order Resume a DCA order

Let a paused order fill again. Owner only.

ParameterTypeDescription
id *DCA order id
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.

dca_edit_order Edit a DCA order

Re-plan an open order's REMAINING budget from now: a new number of buys and interval, and optionally new protection, slippage, limit and end time. Side, recipient and budget cannot change; a paused order stays paused. Validates like the contract. Owner only.

ParameterTypeDescription
id *DCA order id
catchUpboolean
deadlineintegerUnix seconds; default one spare interval after the last new buy
durationSecintegerAlternative end: the new schedule's window in seconds
intervalSecintegerSeconds between buys
limitPriceUSDC per WETH, or "none" to remove the limit
maxSlippageBpsinteger
maxSpreadBpsinteger
pauseOnTrendboolean
sendbooleanBroadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead.
slicesintegerBuys to spread the remaining budget over