MCP.so
Sign In
D

Defi Trading Mcp

@edkdev

About Defi Trading Mcp

DeFi Trading Agent MCP Server

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "defi-trading-mcp": {
      "command": "npx",
      "args": [
        "defi-trading-mcp"
      ],
      "env": {
        "USER_PRIVATE_KEY": "your_private_key_here",
        "USER_ADDRESS": "0xYourWalletAddress",
        "COINGECKO_API_KEY": "CG-your_coingecko_api_key",
        "ALCHEMY_API_KEY": "your_alchemy_api_key"
      }
    }
  }
}

Tools

32

Get indicative price for a token swap using Aggregator Protocol

Get executable quote with transaction data for a token swap

Execute a swap transaction (requires quote data)

Get list of blockchain networks supported by Aggregator Protocol

Get list of liquidity sources available on a specific chain

Get token prices by contract addresses using CoinGecko API

Get list of supported networks on CoinGecko/GeckoTerminal

Get list of supported DEXes on a specific network

Get trending pools across all networks on GeckoTerminal

Get trending pools on a specific network

Get data for multiple pools by their contract addresses

Get top pools on a specific DEX

Get latest new pools across all networks

Search for pools by query (pool address, token address, or token symbol)

Get top pools for a specific token by contract address

Get specific token data by contract address

Get data for multiple tokens by their contract addresses

Get detailed token information including socials, websites, and description

Get recently updated tokens with their information

Get OHLCV (Open, High, Low, Close, Volume) data for a pool

Get recent trades for a specific pool

Get indicative price for a gasless token swap (no gas fees required)

Get executable quote for a gasless token swap with EIP-712 signature data

Submit a gasless swap by signing approval and trade messages (no gas fees required)

Get the status of a submitted gasless swap

Get list of blockchain networks that support gasless swaps

Get list of tokens that support gasless approvals (EIP-2612 permit)

Get tokens with balances, prices, and metadata for wallet addresses (uses USER_ADDRESS from env if addresses not provided)

Get token balances for wallet addresses (faster, no prices/metadata, uses USER_ADDRESS from env if addresses not provided)

Get transaction history for a wallet address (BETA: 1 address, ETH/BASE only, uses USER_ADDRESS from env if addresses not provided)

Convert wei amounts to human-readable format using ethers.js

Convert formatted amounts to wei using ethers.js

Overview

What is Defi Trading Mcp?

Defi Trading Mcp transforms an AI assistant into an autonomous crypto trading agent with real-time market analysis, portfolio management, and trade execution across 17+ blockchains. It is designed for developers and traders who want to automate DeFi trading via MCP-compatible clients.

How to use Defi Trading Mcp?

Install globally with npm install -g defi-trading-mcp, then configure an MCP client (e.g., Claude Desktop, Cursor, Kiro IDE) with environment variables: USER_PRIVATE_KEY, USER_ADDRESS, COINGECKO_API_KEY, and optionally ALCHEMY_API_KEY. Use natural language prompts like "Get me a quote for 0.1 eth to usdc on Base chain" to execute trades.

Key features of Defi Trading Mcp

  • Autonomous portfolio management across 17+ blockchains
  • Real-time market intelligence with OHLCV technical analysis
  • Gasless trade execution (no ETH needed for fees)
  • MEV protection for Ethereum transactions via private mempool
  • Local private key signing – keys never leave your device
  • 25+ tools for swapping, quoting, and token discovery

Use cases of Defi Trading Mcp

  • Quote and execute swaps across multiple chains using simple prompts
  • Scan for newly launched memecoins with liquidity and volume filters
  • Monitor portfolio positions and receive risk alerts with protective trade execution
  • Perform technical analysis on trending tokens to identify entry points
  • Manage DeFi portfolio rebalancing based on performance across all chains

FAQ from Defi Trading Mcp

What blockchains does Defi Trading Mcp support?

It supports 17+ networks including Ethereum, Base, Polygon, Arbitrum, Optimism, BSC, Avalanche, Blast, Linea, Scroll, Mantle, Mode, Worldchain, Unichain, Berachain, Ink, and MonadTestnet.

What are the required environment variables?

You must set USER_PRIVATE_KEY, USER_ADDRESS, and COINGECKO_API_KEY. An ALCHEMY_API_KEY is optional for premium RPC performance.

Where does my private key stay?

Your private key never leaves your device. All transaction signing happens locally, and no sensitive data is transmitted to external servers.

Does Defi Trading Mcp protect against MEV attacks?

Yes, Ethereum transactions are automatically protected from MEV, sandwich, and front-running attacks via private mempool routing.

Can I trade without holding ETH for gas?

Yes, gasless trading is supported. Use get_gasless_price, get_gasless_quote, submit_gasless_swap, and get_gasless_status to execute trades without native gas tokens.

Frequently asked questions

What blockchains does Defi Trading Mcp support?

It supports 17+ networks including Ethereum, Base, Polygon, Arbitrum, Optimism, BSC, Avalanche, Blast, Linea, Scroll, Mantle, Mode, Worldchain, Unichain, Berachain, Ink, and MonadTestnet.

What are the required environment variables?

You must set `USER_PRIVATE_KEY`, `USER_ADDRESS`, and `COINGECKO_API_KEY`. An `ALCHEMY_API_KEY` is optional for premium RPC performance.

Where does my private key stay?

Your private key never leaves your device. All transaction signing happens locally, and no sensitive data is transmitted to external servers.

Does Defi Trading Mcp protect against MEV attacks?

Yes, Ethereum transactions are automatically protected from MEV, sandwich, and front-running attacks via private mempool routing.

Can I trade without holding ETH for gas?

Yes, gasless trading is supported. Use `get_gasless_price`, `get_gasless_quote`, `submit_gasless_swap`, and `get_gasless_status` to execute trades without native gas tokens.

Comments

More Finance & Commerce MCP servers