Skip to main content
Glama
Tapp Exchange MCP Server

Tapp Exchange MCP Server

by tamago-labs

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

Related MCP server: SEI DEX MCP

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 pools

  • tapp_get_pool_info - Get detailed information about a specific pool

Swap Operations

  • tapp_get_swap_estimate - Estimate swap amounts and price impact

  • tapp_get_swap_route - Get optimal route between two tokens

  • tapp_swap_amm - Execute swap on AMM pool

  • tapp_swap_clmm - Execute swap on CLMM pool

  • tapp_swap_stable - Execute swap on Stable pool

Liquidity Management

  • tapp_create_amm_pool_and_add_liquidity - Create new AMM pool with initial liquidity

  • tapp_create_clmm_pool_and_add_liquidity - Create new CLMM pool with initial liquidity

  • tapp_create_stable_pool_and_add_liquidity - Create new Stable pool with initial liquidity

  • tapp_add_amm_liquidity - Add liquidity to existing AMM pool

  • tapp_add_clmm_liquidity - Add liquidity to existing CLMM pool

  • tapp_add_stable_liquidity - Add liquidity to existing Stable pool

  • tapp_remove_single_amm_liquidity - Remove liquidity from single AMM position

  • tapp_remove_multiple_amm_liquidity - Remove liquidity from multiple AMM positions

  • tapp_remove_single_clmm_liquidity - Remove liquidity from single CLMM position

  • tapp_remove_multiple_clmm_liquidity - Remove liquidity from multiple CLMM positions

  • tapp_remove_single_stable_liquidity - Remove liquidity from single Stable position

  • tapp_remove_multiple_stable_liquidity - Remove liquidity from multiple Stable positions

Position Management

  • tapp_get_positions - Get user's liquidity positions

  • tapp_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 framework

  • zod - 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.

Support

For questions and support:

Available Tools

21 tools
tapp_add_amm_liquidityC

Add liquidity to an existing AMM pool

Inputs: amountA (required), amountB (required), poolId (required).

tapp_add_clmm_liquidityC

Add liquidity to an existing CLMM pool

Inputs: amountA (required), amountB (required), fee (required), isMaxAmountB (required), +3 more.

tapp_add_stable_liquidityC

Add liquidity to an existing stable pool

Inputs: amounts (required), poolId (required).

tapp_collect_feeC

Collect fees from a specific liquidity position in a given pool

Inputs: poolId (required), positionAddr (required).

tapp_create_amm_pool_and_add_liquidityC

Create an AMM pool and add initial liquidity

Inputs: amounts (required), fee (required), tokenAddress (required).

tapp_create_clmm_pool_and_add_liquidityC

Create a CLMM pool and add initial liquidity

Inputs: amounts (required), fee (required), initialPrice (required), isMaxAmountB (required), +3 more.

tapp_create_stable_pool_and_add_liquidityC

Create a Stable pool and add initial liquidity

Inputs: amounts (required), amplificationFactor (required), fee (required), tokenAddress (required), +1 more.

tapp_get_pool_infoC

Get detailed information about a specific pool by its ID

Inputs: poolId (required).

tapp_get_poolsB

Get a paginated list of available pools on Tapp Exchange, optionally filtered by type and sorted by TVL

Inputs: page, size, sortBy, type.

tapp_get_positionsB

Get a paginated list of liquidity positions for a user address

Inputs: page, size, userAddr.

tapp_get_swap_estimateB

Estimate the amount received or needed for a swap on Tapp Exchange

Inputs: a2b (required), amount (required), pair (required), poolId (required), +1 more.

tapp_get_swap_routeC

Get the optimal route information between two tokens

Inputs: token0 (required), token1 (required).

tapp_remove_multiple_amm_liquidityC

Remove liquidity from multiple AMM positions

Inputs: poolId (required), positions (required).

tapp_remove_multiple_clmm_liquidityC

Remove liquidity from multiple CLMM positions

Inputs: poolId (required), positions (required).

tapp_remove_multiple_stable_liquidityC

Remove liquidity from multiple STABLE positions

Inputs: poolId (required), positions (required).

tapp_remove_single_amm_liquidityC

Remove liquidity from a single AMM position

Inputs: minAmount0 (required), minAmount1 (required), mintedShare (required), poolId (required), +1 more.

tapp_remove_single_clmm_liquidityC

Remove liquidity from a single CLMM position

Inputs: minAmount0 (required), minAmount1 (required), mintedShare (required), poolId (required), +1 more.

tapp_remove_single_stable_liquidityC

Remove liquidity from a single STABLE position

Inputs: poolId (required), position (required).

tapp_swap_ammC

Execute a swap on an AMM pool

Inputs: a2b (required), amount0 (required), amount1 (required), poolId (required), +1 more.

tapp_swap_clmmC

Execute a swap on a CLMM (Concentrated Liquidity Market Maker) pool

Inputs: a2b (required), amountIn (required), minAmountOut (required), poolId (required), +2 more.

tapp_swap_stableC

Execute a swap on a Stable pool

Inputs: amountIn (required), minAmountOut (required), poolId (required), tokenIn (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 21 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. The tools are organized by specific actions (add, create, get, remove, swap) and pool types (AMM, CLMM, Stable), making it easy to differentiate between them. For example, 'tapp_add_amm_liquidity' and 'tapp_swap_amm' target different operations on the same pool type, preventing misselection.

    Naming Consistency5/5

    Tool names follow a highly consistent pattern throughout: all use snake_case with a 'tapp_' prefix, followed by a verb (e.g., add, create, get, remove, swap) and a noun phrase specifying the action and pool type. This predictability makes the set easy to navigate and understand at a glance.

    Tool Count4/5

    With 21 tools, the count is slightly high but reasonable for a comprehensive DeFi exchange server covering multiple pool types and operations. It provides detailed coverage for AMM, CLMM, and Stable pools, though it might feel heavy compared to simpler servers. The tools are well-scoped, with each serving a specific function.

    Completeness5/5

    The tool surface offers complete CRUD/lifecycle coverage for liquidity management and swapping on Tapp Exchange. It includes creation, addition, removal, fee collection, information retrieval, and swapping for all pool types, with no obvious gaps. Agents can perform end-to-end operations without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI agents to interact with Saros DeFi through natural language, providing tools for liquidity pool management, portfolio analytics, farming positions, and swap quotes on Solana.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with decentralized exchanges on the SEI blockchain through natural language commands. Supports token swapping, wrapping, liquidity pool queries, and automated trading strategies on DragonSwap.
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to interact with HyperLend protocol and Kittenswap DEX on Hyperliquid EVM network. Supports DeFi operations including lending, borrowing, withdrawing assets, and token swapping with comprehensive portfolio management.
      8
      MIT