Tapp Exchange MCP Server
Enables AI agents to interact with Tapp Exchange, a decentralized exchange on Aptos blockchain. Supports pool management, trading operations across AMM/CLMM/Stable pools, liquidity provision, and position tracking through natural language.
README
Tapp Exchange MCP Server
An MCP (Model Context Protocol) server implementation for Tapp Exchange, a next-generation decentralized exchange built on Aptos blockchain.
Overview
Tapp Exchange is a decentralized trading platform that brings together innovations from leading DEX protocols. Built on concepts from Uniswap v4, Tapp offers a powerful hooks system and advanced singleton vault design for unmatched capital efficiency.
This MCP server provides AI agents like Claude with the ability to interact with Tapp Exchange, enabling:
- Pool Management: Query available pools, get detailed pool information
- Trading Operations: Execute swaps on AMM, CLMM, and Stable pools
- Liquidity Management: Add/remove liquidity, create new pools
- Position Tracking: Monitor liquidity positions and collect fees
Features
Pool Types Supported
- AMM Pools: Traditional Automated Market Maker pools
- CLMM Pools: Concentrated Liquidity Market Maker pools (like Uniswap v3)
- Stable Pools: Optimized for stablecoin trading with low slippage
Core Functionality
- Pool discovery and analytics
- Multi-pool type swap execution
- Liquidity provision and management
- Fee collection from positions
- Position monitoring and analytics
Installation
npm install @tamago-labs/tapp-exchange-mcp
Configuration
Create a .env file in your project root:
# Network Configuration
TAPP_NETWORK=mainnet # or testnet, devnet
# Optional: Custom RPC URL
# TAPP_RPC_URL=https://fullnode.mainnet.aptoslabs.com/v1
# Optional: Private Key (if not provided, a new random key will be generated)
# TAPP_PRIVATE_KEY=your_private_key_here
# Optional: API Configuration
# TAPP_API_TIMEOUT=30000
Usage
As an MCP Server
npx tapp-exchange-mcp
Integration with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"tapp-exchange": {
"command": "npx",
"args": ["@tamago-labs/tapp-exchange-mcp"]
}
}
}
Programmatic Usage
import { TappAgent } from '@tamago-labs/tapp-exchange-mcp';
const agent = new TappAgent();
// Get available pools
const pools = await agent.getPools({
page: 1,
size: 10,
sortBy: 'tvl'
});
// Execute a swap
const swapResult = await agent.swapAMM({
poolId: 'pool_address',
a2b: true,
fixedAmountIn: true,
amount0: 1000000,
amount1: 0
});
Available Tools
Pool Management
tapp_get_pools- Get paginated list of available poolstapp_get_pool_info- Get detailed information about a specific pool
Swap Operations
tapp_get_swap_estimate- Estimate swap amounts and price impacttapp_get_swap_route- Get optimal route between two tokenstapp_swap_amm- Execute swap on AMM pooltapp_swap_clmm- Execute swap on CLMM pooltapp_swap_stable- Execute swap on Stable pool
Liquidity Management
tapp_create_amm_pool_and_add_liquidity- Create new AMM pool with initial liquiditytapp_create_clmm_pool_and_add_liquidity- Create new CLMM pool with initial liquiditytapp_create_stable_pool_and_add_liquidity- Create new Stable pool with initial liquiditytapp_add_amm_liquidity- Add liquidity to existing AMM pooltapp_add_clmm_liquidity- Add liquidity to existing CLMM pooltapp_add_stable_liquidity- Add liquidity to existing Stable pooltapp_remove_single_amm_liquidity- Remove liquidity from single AMM positiontapp_remove_multiple_amm_liquidity- Remove liquidity from multiple AMM positionstapp_remove_single_clmm_liquidity- Remove liquidity from single CLMM positiontapp_remove_multiple_clmm_liquidity- Remove liquidity from multiple CLMM positionstapp_remove_single_stable_liquidity- Remove liquidity from single Stable positiontapp_remove_multiple_stable_liquidity- Remove liquidity from multiple Stable positions
Position Management
tapp_get_positions- Get user's liquidity positionstapp_collect_fee- Collect fees from liquidity positions
Testing
Run the included test scripts to verify functionality:
# Test pool operations
npm run test:pools
# Test swap operations
npm run test:swap
# Test liquidity operations
npm run test:liquidity
Development
Building
npm run build
Running Tests
npm test
Architecture
The MCP server is built with:
- TappAgent: Core agent class that interfaces with Tapp Exchange SDK
- MCP Tools: Individual tools for each exchange operation
- Type Safety: Full TypeScript support with comprehensive type definitions
- Error Handling: Robust error handling and validation
- Key Management: Automatic key format detection and validation
Key Features
Multi-Pool Support
- AMM: Traditional x*y=k pools
- CLMM: Concentrated liquidity with custom price ranges
- Stable: Stablecoin-optimized pools with low slippage
Advanced Liquidity Management
- Single and batch position management
- Automated fee collection
- Position analytics and monitoring
Safety Features
- Input validation and sanitization
- Transaction simulation before execution
- Slippage protection
- Gas estimation and optimization
Dependencies
@aptos-labs/ts-sdk- Aptos blockchain SDK@tapp-exchange/sdk- Official Tapp Exchange SDK@modelcontextprotocol/sdk- MCP frameworkzod- Runtime type validation
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests for any improvements.
License
MIT License - see LICENSE file for details.
Links
Support
For questions and support:
- GitHub Issues: Create an issue
- Documentation: Tapp Exchange Docs
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。