Feedback

DeFi Trading Agent MCP Server

@edkdev Claim

Basic information

Runtime
JavaScript
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
edkdev
Submitted by
Community
Quality
25
Stars
39

About DeFi Trading Agent MCP Server

DeFi Trading Agent enables autonomous trading, real-time analysis, and seamless execution across 17+ blockchains with gasless support.

DeFi Trading Agent is a MCP server in the Finance category listed in the AddMCP.net directory, published by edkdev. It exposes 32 tools, including get_swap_price, get_swap_quote, execute_swap, get_supported_chains and more. Supported transport: stdio. Runtime: JavaScript. License: MIT. The repository has 39 GitHub stars. Source code is hosted on github.com. Related topics: community, crypto, defi, developer-tools, finance.

Setup

{
    "mcpServers": {
        "defi-trading": {
            "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"
            }
        }
    }
}

DeFi Trading Agent MCP Server config

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

{
    "mcpServers": {
        "defi-trading": {
            "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"
            }
        }
    }
}

DeFi Trading Agent MCP Server tools

  • get_swap_price — Get indicative price for a token swap using Aggregator Protocol
    chainId:integer*, buyToken:string*, sellToken:string*, sellAmount:string*, taker:string
  • get_swap_quote — Get executable quote with transaction data for a token swap
    chainId:integer*, buyToken:string*, sellToken:string*, sellAmount:string*, taker:string, slippageBps:integer
  • execute_swap — Execute a swap transaction (requires quote data)
    quoteData:object*
  • get_supported_chains — Get list of blockchain networks supported by Aggregator Protocol
    (no parameters)
  • get_liquidity_sources — Get list of liquidity sources available on a specific chain
    chainId:integer*
  • get_token_price — Get token prices by contract addresses using CoinGecko API
    network:string*, addresses:string*, include_market_cap:boolean, mcap_fdv_fallback:boolean, include_24hr_vol:boolean, include_24hr_price_change:boolean, include_total_reserve_in_usd:boolean
  • get_coingecko_networks — Get list of supported networks on CoinGecko/GeckoTerminal
    page:integer
  • get_supported_dexes — Get list of supported DEXes on a specific network
    network:string*, page:integer
  • get_trending_pools — Get trending pools across all networks on GeckoTerminal
    include:string, page:integer, duration:string
  • get_trending_pools_by_network — Get trending pools on a specific network
    network:string*, include:string, page:integer, duration:string
  • get_multiple_pools_data — Get data for multiple pools by their contract addresses
    network:string*, addresses:string*, include:string, include_volume_breakdown:boolean
  • get_top_pools_by_dex — Get top pools on a specific DEX
    network:string*, dex:string*, include:string, page:integer, sort:string
  • get_new_pools — Get latest new pools across all networks
    include:string, page:integer
  • search_pools — Search for pools by query (pool address, token address, or token symbol)
    query:string*, network:string, include:string, page:integer
  • get_top_pools_by_token — Get top pools for a specific token by contract address
    network:string*, tokenAddress:string*, include:string, page:integer, sort:string
  • get_token_data — Get specific token data by contract address
    network:string*, address:string*, include:string
  • get_multiple_tokens_data — Get data for multiple tokens by their contract addresses
    network:string*, addresses:string*, include:string
  • get_token_info — Get detailed token information including socials, websites, and description
    network:string*, address:string*
  • get_recently_updated_tokens — Get recently updated tokens with their information
    include:string, network:string
  • get_pool_ohlcv — Get OHLCV (Open, High, Low, Close, Volume) data for a pool
    network:string*, poolAddress:string*, timeframe:string*, aggregate:string, before_timestamp:integer, limit:integer, currency:string, token:string, include_empty_intervals:boolean
  • get_pool_trades — Get recent trades for a specific pool
    network:string*, poolAddress:string*, trade_volume_in_usd_greater_than:number
  • get_gasless_price — Get indicative price for a gasless token swap (no gas fees required)
    chainId:integer*, buyToken:string*, sellToken:string*, sellAmount:string*, taker:string, slippageBps:integer
  • get_gasless_quote — Get executable quote for a gasless token swap with EIP-712 signature data
    chainId:integer*, buyToken:string*, sellToken:string*, sellAmount:string*, taker:string, slippageBps:integer
  • submit_gasless_swap — Submit a gasless swap by signing approval and trade messages (no gas fees required)
    quoteData:object*, chainId:integer
  • get_gasless_status — Get the status of a submitted gasless swap
    tradeHash:string*, chainId:integer*
  • get_gasless_chains — Get list of blockchain networks that support gasless swaps
    (no parameters)
  • get_gasless_approval_tokens — Get list of tokens that support gasless approvals (EIP-2612 permit)
    chainId:integer
  • get_portfolio_tokens — Get tokens with balances, prices, and metadata for wallet addresses (uses USER_ADDRESS from env if addresses not provided)
    addresses:array, networks:array, withMetadata:boolean, withPrices:boolean, includeNativeTokens:boolean
  • get_portfolio_balances — Get token balances for wallet addresses (faster, no prices/metadata, uses USER_ADDRESS from env if addresses not provided)
    addresses:array, networks:array, includeNativeTokens:boolean
  • get_portfolio_transactions — Get transaction history for a wallet address (BETA: 1 address, ETH/BASE only, uses USER_ADDRESS from env if addresses not provided)
    addresses:array, networks:array, before:string, after:string, limit:integer
  • convert_wei_to_formatted — Convert wei amounts to human-readable format using ethers.js
    amount:string*, decimals:integer*
  • convert_formatted_to_wei — Convert formatted amounts to wei using ethers.js
    amount:string*, decimals:integer*

Overview

What is DeFi Trading Agent?

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 Agent?

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 Agent

  • 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 Agent

  • 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

Frequently asked questions

1 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.

2 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.

3 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.

4 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.

5 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

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬