Claude Desktop + Hyperliquid: MCP Tools for AI Agent Perpetual Trading
AI trading bots need access to perpetual futures markets like Hyperliquid, but connecting Claude Desktop to advanced DeFi protocols typically requires complex API integrations and wallet management. WAIaaS bridges this gap with 45 MCP tools, including native Hyperliquid integration that lets Claude trade perpetuals, manage sub-accounts, and monitor positions directly from the chat interface.
Why Claude Desktop Needs Native DeFi Access
Claude Desktop is becoming the control center for AI agents, but its capabilities stop at text generation. The Model Context Protocol (MCP) changes this by letting Claude connect to external systems through standardized tools. However, building MCP servers for blockchain interactions requires deep knowledge of wallet management, transaction signing, and DeFi protocol APIs.
For perpetual futures trading specifically, agents need to handle complex operations like position sizing, leverage management, and real-time market data — all while maintaining security through proper wallet controls and policy enforcement.
WAIaaS: The Complete MCP Trading Infrastructure
WAIaaS functions as a comprehensive MCP server that transforms Claude into a capable trading agent. Once connected, Claude gains access to wallet operations, DeFi protocols, and specialized trading tools including full Hyperliquid integration for perpetual futures.
MCP Integration Setup
Adding WAIaaS to Claude Desktop requires just one configuration change:
{
"mcpServers": {
"waiaas": {
"command": "npx",
"args": ["-y", "@waiaas/mcp"],
"env": {
"WAIAAS_BASE_URL": "http://127.0.0.1:3100",
"WAIAAS_SESSION_TOKEN": "wai_sess_<your-token>",
"WAIAAS_DATA_DIR": "~/.waiaas"
}
}
}
}
This single MCP server provides Claude with 45 tools spanning wallet management, token transfers, DeFi operations, NFT handling, and specialized trading functions.
Hyperliquid Perpetual Trading Integration
The Hyperliquid integration supports the full range of perpetual futures operations through MCP tools that Claude can call directly:
# Claude can execute trades through the hyperliquid MCP tool
# Example: Long 1 ETH with 5x leverage
curl -X POST http://127.0.0.1:3100/v1/actions/hyperliquid/place-order \
-H "Content-Type: application/json" \
-H "Authorization: Bearer wai_sess_<token>" \
-d '{
"coin": "ETH",
"is_buy": true,
"sz": "1.0",
"limit_px": "2500",
"reduce_only": false
}'
Claude can also query positions, check account health, and manage sub-accounts:
# Get current perpetual positions
curl http://127.0.0.1:3100/v1/actions/hyperliquid/get-positions \
-H "Authorization: Bearer wai_sess_<token>"
# Check account margin and PnL
curl http://127.0.0.1:3100/v1/actions/hyperliquid/get-account-state \
-H "Authorization: Bearer wai_sess_<token>"
Policy-Based Risk Management
WAIaaS includes 21 policy types with 4 security tiers, crucial for automated trading. For perpetual futures, specific policies prevent dangerous trades:
# Set maximum leverage limit
curl -X POST http://127.0.0.1:3100/v1/policies \
-H "Content-Type: application/json" \
-H "X-Master-Password: my-secret-password" \
-d '{
"walletId": "<wallet-uuid>",
"type": "PERP_MAX_LEVERAGE",
"rules": {"max_leverage": "10"}
}'
# Limit position sizes
curl -X POST http://127.0.0.1:3100/v1/policies \
-H "Content-Type: application/json" \
-H "X-Master-Password: my-secret-password" \
-d '{
"walletId": "<wallet-uuid>",
"type": "PERP_MAX_POSITION_USD",
"rules": {"max_position_usd": "5000"}
}'
These policies operate at the transaction level — Claude can request any trade, but WAIaaS enforces the risk limits automatically.
Multi-Protocol DeFi Access
Beyond Hyperliquid, Claude gains access to 15 DeFi protocol providers through the same MCP interface:
- Jupiter Swap: Solana token swapping with optimal routing
- Aave V3: Lending and borrowing across multiple chains
- Lido Staking: Ethereum liquid staking
- LI.FI: Cross-chain bridging
- Polymarket: Prediction market trading
- Pendle: Yield tokenization
Each protocol exposes its functionality through standardized MCP tools, letting Claude compose complex DeFi strategies.
Session-Based Security Model
WAIaaS uses a three-layer authentication system that separates concerns:
- masterAuth: System administration (wallet creation, policies)
- sessionAuth: AI agent operations (transactions, queries)
- ownerAuth: Human oversight (approvals, emergency controls)
Claude operates with sessionAuth tokens that have configurable limits and automatic expiration. Critical operations can require human approval through WalletConnect or push notifications.
Quick Start: Claude Trading Agent
Here's how to set up Claude Desktop for perpetual futures trading:
Step 1: Install and Start WAIaaS
npm install -g @waiaas/cli
waiaas init
waiaas start
waiaas quickset --mode mainnet
The quickset command creates wallets for major networks and generates MCP session tokens.
Step 2: Configure Claude Desktop
Add the MCP server configuration to ~/Library/Application Support/Claude/claude_desktop_config.json:
waiaas mcp setup --all
This automatically registers all wallets with Claude Desktop.
Step 3: Set Trading Policies
Create risk management policies before trading:
# Maximum 5x leverage
curl -X POST http://127.0.0.1:3100/v1/policies \
-H "Content-Type: application/json" \
-H "X-Master-Password: <password>" \
-d '{
"type": "PERP_MAX_LEVERAGE",
"rules": {"max_leverage": "5"}
}'
Step 4: Fund and Trade
Transfer funds to your wallet, then ask Claude to execute trades:
User: "Check my Hyperliquid account balance and open a small long position on ETH"
Claude: I'll check your Hyperliquid account and help you open a position. Let me start by getting your current account state...
[Claude calls get_account_state tool]
[Claude calls place_order tool with appropriate sizing]
Step 5: Monitor Positions
Claude can continuously monitor positions and execute management strategies:
User: "Set a stop loss at 5% down from my ETH position entry price"
Claude: I'll help you set a stop loss order. First, let me check your current ETH position...
[Claude calls get_positions tool]
[Claude calculates stop price and places conditional order]
Advanced Trading Strategies
With access to multiple DeFi protocols, Claude can execute sophisticated strategies that combine perpetual trading with other DeFi operations:
Funding Rate Arbitrage
Claude can monitor Hyperliquid funding rates and automatically hedge positions through spot markets:
User: "Monitor ETH funding rates and hedge through Jupiter when rates exceed 0.1% daily"
Claude: I'll set up a monitoring strategy that:
1. Checks Hyperliquid funding rates every hour
2. When ETH funding exceeds 0.1% daily, opens opposite spot position via Jupiter
3. Manages both positions to capture funding payments while staying market neutral
Cross-Chain Position Management
Using LI.FI bridge integration, Claude can manage positions across different chains:
User: "Bridge USDC from Ethereum to Arbitrum and increase my Hyperliquid position size"
Claude: I'll bridge your USDC and increase your position:
1. First, let me check your Ethereum USDC balance
2. Bridge optimal amount to Arbitrum via LI.FI
3. Deposit to Hyperliquid and increase your ETH long position
The 7-stage transaction pipeline ensures all operations go through proper validation, policy checks, and execution stages while maintaining audit trails.
What's Next
WAIaaS transforms Claude Desktop into a complete DeFi trading terminal through its comprehensive MCP integration. The combination of 45 MCP tools, 15 DeFi protocols, and robust policy engine provides the infrastructure for sophisticated AI trading agents.
Start building your Claude trading agent today by exploring the full documentation at WAIaaS GitHub or learn more at waiaas.ai.