Skip to content

feat: add Hydrex Base MCP plugin#90

Open
CottonEyeBro wants to merge 5 commits into
base:masterfrom
hydrexfi:master
Open

feat: add Hydrex Base MCP plugin#90
CottonEyeBro wants to merge 5 commits into
base:masterfrom
hydrexfi:master

Conversation

@CottonEyeBro

@CottonEyeBro CottonEyeBro commented Jun 10, 2026

Copy link
Copy Markdown

Summary

This PR adds a plugin for Hydrex, an Omni-Liquidity MetaDEX on Base that delivers the best swap rates on Base and supports concentrated liquidity position management.


What This Adds

skills/base-mcp/plugins/hydrex.md — a complete send_calls-based plugin covering:

  • DEX swaps with best available routing on Base
  • Concentrated liquidity position management — open and close positions
  • Read endpoints for live quotes, wallet portfolio, open positions, and trade history
  • Full orchestration patterns for harness surfaces (Claude Code, Cursor, Codex) and chat-only surfaces (Claude.ai, ChatGPT)
  • Price impact guard — warns the user and requires explicit confirmation before executing any swap with price impact > 5%
  • Slippage defaults (50 bps) with user-overridable parameters on all write operations

Infrastructure

The plugin is backed by a dedicated prepare server hosted at https://hydrex-agent.com, built on the hydrex-base-mcp Express server running against Base mainnet (chainId: 8453).

Allowlist Request

Please add hydrex-agent.com to the web_request allowlist so the plugin works natively on Claude.ai and ChatGPT consumer surfaces. On harness surfaces the plugin works today via direct HTTP tool calls without allowlisting.


Endpoints

Endpoint Type Description
GET /health Read Server health check
GET /state/quote Read Best available swap quote on Base
GET /state/portfolio Read Token balances and LP positions for a wallet
GET /state/positions Read Open concentrated liquidity positions
GET /state/trade-history Read Past swaps executed through Hydrex
GET /prepare/swap Prepare Returns unsigned swap calldata
GET /prepare/add-liquidity Prepare Returns unsigned approve + mint calldata
GET /prepare/remove-liquidity Prepare Returns unsigned remove-liquidity calldata

All prepare endpoints return a transactions[] array ready to pass directly to send_calls.


Testing

Health check:

GET https://hydrex-agent.com/health
{"ok":true,"service":"hydrex-base-skill-server","chainId":8453}

Sample quote — 10 USDC → WETH:

GET https://hydrex-agent.com/state/quote?tokenIn=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&tokenOut=0x4200000000000000000000000000000000000006&amount=10000000&recipient=0x0000000000000000000000000000000000000001

CottonEyeBro and others added 5 commits June 3, 2026 13:46
- Replace all http://hydrex-agent.com:3000 references with https://hydrex-agent.com
- Update allowlist from [] to [hydrex-agent.com] to request web_request allowlisting

Co-authored-by: Cursor <cursoragent@cursor.com>
feat: add Hydrex Base MCP plugin
@cb-heimdall

cb-heimdall commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants