@hft-labs/mcp
v0.1.0
Published
MCP server for managing Uniswap V3 concentrated liquidity positions
Maintainers
Readme
@hft-labs/mcp
MCP server for managing Uniswap V3 concentrated liquidity positions with Claude.
Quick Start
For Claude Desktop
Open your Claude Desktop config:
~/Library/Application Support/Claude/claude_desktop_config.jsonAdd the server:
{ "mcpServers": { "hft-liquidity": { "command": "npx", "args": ["-y", "@hft-labs/mcp"], "env": { "HFT_API_URL": "https://api.hftlabs.xyz" } } } }Restart Claude Desktop
For Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"hft-liquidity": {
"command": "npx",
"args": ["-y", "@hft-labs/mcp"],
"env": {
"HFT_API_URL": "https://api.hftlabs.xyz"
}
}
}
}Configuration
| Variable | Required | Description |
|----------|----------|-------------|
| HFT_API_URL | Yes | Base URL of the HFT API |
| HFT_SESSION_KEY | No | Session key for write operations |
| HFT_CHAIN | No | Default chain: polygon or base |
What You Can Say
Once configured, talk to Claude naturally:
Monitoring:
- "Show my positions on Polygon for 0x1234..."
- "What's the health of position #456?"
- "Which of my positions need rebalancing?"
Analysis:
- "Get info on the USDC/WETH pool"
- "Show me historical volatility for pool 0xabc..."
- "Calculate an optimal balanced range for this pool"
Execution (requires session key):
- "Collect fees from position #789"
- "Add 1000 USDC to my WETH position"
- "Close position #123"
Available Tools
Read-Only
| Tool | Description |
|------|-------------|
| get_positions | List all positions for an owner |
| get_position | Get details of a specific position |
| analyze_position_health | Health metrics + rebalancing recommendations |
| get_pool | Pool info including suggested ranges |
| get_pool_history | Historical price, volume, TVL |
| calculate_optimal_range | Calculate range based on volatility |
Write Operations
| Tool | Description |
|------|-------------|
| mint_position | Create new liquidity position |
| increase_liquidity | Add liquidity to existing position |
| decrease_liquidity | Remove liquidity from position |
| collect_fees | Collect accumulated fees |
| close_position | Full close: remove, collect, burn NFT |
Local Development
If running from source:
{
"mcpServers": {
"hft-liquidity": {
"command": "node",
"args": ["./packages/hft-mcp/dist/bin.js"],
"env": {
"HFT_API_URL": "https://api.hftlabs.xyz"
}
}
}
}Build:
pnpm --filter @hft-labs/mcp buildSecurity
- The MCP server runs locally on your machine
- Session keys are stored in your local environment only
- Write operations require explicit session key configuration
- All transactions require your approval in the conversation
License
MIT
