mcp
v0.1.3MCP 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.
| Parameter | Type | Description |
|---|---|---|
blocks | integer | How 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.
| Parameter | Type | Description |
|---|---|---|
events | array | Only return on these event types (default: any) |
timeoutSec | integer | Give 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.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Input amount: USDC to buy, WETH to sell |
side * | string | buy = 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.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Input amount: USDC to buy, WETH to sell |
owner * | string | The wallet that will sign and pay |
side * | string | buy = pay USDC for WETH; sell = pay WETH for USDC |
recipient | string | Receives the output; defaults to the owner. Only set when the user explicitly asks. |
slippageBps | integer | Max 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.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The wallet that will sign and deposit |
slippageBps | integer | Max shortfall on each side in bps (default 50, max 1000) |
usdc | string | USDC to deposit (the WETH side is sized for you) |
weth | string | WETH 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.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The LP's wallet, which will sign |
percent | number | Share of the position to withdraw, above 0 and at most 100, e.g. 50 or 0.5 |
shares | string | Exact LP shares to burn, in base units (18 decimals) |
slippageBps | integer | Max 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.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Total budget in the input token (USDC to buy, WETH to sell), e.g. "1000" |
intervalSec * | integer | Seconds between fills (>= 60) |
side * | string | buy = pay USDC for WETH; sell = pay WETH for USDC |
slices * | integer | Number of fills |
catchUp | boolean | Grow later fills to make up skipped ones, so the order completes by the deadline. Default true |
deadline | integer | Unix seconds; default one spare interval after the last planned fill |
limitPrice | string | USDC per WETH: the most a buy pays / the least a sell accepts |
maxSlippageBps | integer | Max shortfall vs the in-transaction quote (bps). Default 50 |
maxSpreadBps | integer | Skip a fill while the trend spread on this side exceeds this (bps). 0 = never pay the spread. Default 10000 (no cap) |
pauseOnTrend | boolean | Hold fills while a trend runs with this side (the side the pool charges); resume when it ends. Default false |
recipient | string | Receives every fill; default the owner |
startTime | integer | Unix 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.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Total budget in the input token (USDC to buy, WETH to sell), e.g. "1000" |
intervalSec * | integer | Seconds between fills (>= 60) |
side * | string | buy = pay USDC for WETH; sell = pay WETH for USDC |
slices * | integer | Number of fills |
catchUp | boolean | Grow later fills to make up skipped ones, so the order completes by the deadline. Default true |
deadline | integer | Unix seconds; default one spare interval after the last planned fill |
limitPrice | string | USDC per WETH: the most a buy pays / the least a sell accepts |
maxSlippageBps | integer | Max shortfall vs the in-transaction quote (bps). Default 50 |
maxSpreadBps | integer | Skip a fill while the trend spread on this side exceeds this (bps). 0 = never pay the spread. Default 10000 (no cap) |
owner | string | Order owner; defaults to the configured key's address |
pauseOnTrend | boolean | Hold fills while a trend runs with this side (the side the pool charges); resume when it ends. Default false |
recipient | string | Receives every fill; default the owner |
send | boolean | Broadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead. |
startTime | integer | Unix 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.
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
owner | string | Defaults 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.
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
send | boolean | Broadcast 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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
send | boolean | Broadcast 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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
send | boolean | Broadcast 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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
send | boolean | Broadcast 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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
send | boolean | Broadcast 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.
| Parameter | Type | Description |
|---|---|---|
id * | DCA order id | |
catchUp | boolean | |
deadline | integer | Unix seconds; default one spare interval after the last new buy |
durationSec | integer | Alternative end: the new schedule's window in seconds |
intervalSec | integer | Seconds between buys |
limitPrice | USDC per WETH, or "none" to remove the limit | |
maxSlippageBps | integer | |
maxSpreadBps | integer | |
pauseOnTrend | boolean | |
send | boolean | Broadcast with the key configured in POINCARE_PRIVATE_KEY. Omit or false to get unsigned transactions instead. |
slices | integer | Buys to spread the remaining budget over |