mcp-dexscreener

Ultrabitch/mcp-dexscreener

3.2

If you are the rightful owner of mcp-dexscreener and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The DexScreener MCP Server provides access to the DexScreener API with Telegram-optimized formatting and automatic chain detection.

Tools
5
Resources
0
Prompts
0

šŸš€ DexScreener MCP Server

A Model Context Protocol (MCP) server that provides access to the DexScreener API with Telegram-optimized formatting and automatic chain detection.

Docker Node.js MCP

✨ Features

  • šŸ” Auto-detect blockchain from token address format
  • šŸ“± Telegram-optimized formatting with market cap prioritization
  • 🐳 Docker-ready for headless deployment
  • ⚔ High-performance with negligible address detection overhead
  • šŸ”— Multi-chain support (Solana, Ethereum, BSC, Polygon, Arbitrum, Base)
  • šŸ“Š Real-time market data from DexScreener API

šŸš€ Quick Start

Option 1: Docker (Recommended for Production)

# Clone and run
git clone <your-repo-url>
cd mcp-dexscreener
docker-compose up -d

# Server available at http://localhost:3001

Option 2: Local Development

# Install dependencies
npm install

# Run STDIO version (for Claude Desktop)
npm start

# Run SSE version (for remote agents)
node index-sse.js

šŸ“” API Endpoints

EndpointDescription
GET /Server info and available endpoints
GET /healthHealth check
GET /sseMCP SSE connection endpoint
POST /messagesMCP messages endpoint

šŸ› ļø Available Tools

šŸ†• getTokenInfo (Auto-Detection)

Get token information with automatic chain detection:

getTokenInfo({ 
  tokenAddress: "DtR4D9FtVoTX2569gaL837ZgrB6wNjj6tkmnX9Rdk9B2" 
})
// Automatically detects Solana and returns formatted data

Traditional Tools (Require Chain ID)

  • getPairsByToken - Get pairs by token address
  • searchPairs - Search pairs by query
  • getPairByChainAndAddress - Get specific pair data
  • getTokenPools - Get token pools
  • getLatestTokenProfiles - Latest token profiles
  • checkTokenOrders - Check token orders

šŸ“± Telegram Format Example

šŸš€ **LAUNCHCOIN** [+15.77%]

šŸ”— Solana @ Raydium

**MC: $225.9M**
USD: $0.2258

**FDV:** $225.9M  |  **Liq:** $1.9M
**Vol 24h:** $16.5M  |  **Txns:** 62.6K

CA: `Ey59PH7Z4BFU4HjyKnyMdWt5GGN76KazTAwQihoUXRnk`

šŸ“Š [Chart](link) | 🌐 [Website](link) | 🐦 [Twitter](link)

šŸ”— Chain Detection

The server automatically detects blockchain from address format:

ChainFormatExample
Solana43-44 chars, Base58DtR4D9FtVoTX2569gaL837ZgrB6wNjj6tkmnX9Rdk9B2
Ethereum42 chars, starts with 0x0x1234567890123456789012345678901234567890
BSC/PolygonSame as EthereumAuto-fallback for EVM chains
Tron34 chars, starts with TTXyz123...

🐳 Docker Deployment

Production Setup

# Build and run
docker-compose up -d

# Test container health (optional)
node test-docker.js

# View logs
docker-compose logs -f

# Stop
docker-compose down

Configuration

The Docker setup includes:

  • āœ… Production-optimized Node.js Alpine image
  • āœ… Simplified deployment (no non-root user complications)
  • āœ… Health checks and auto-restart
  • āœ… Resource limits (512MB RAM, 0.5 CPU)
  • āœ… Structured logging with rotation
  • āœ… Comprehensive test suite for container health

šŸ–„ļø Agent Integration

For Remote Agents/Orchestrators

const mcpClient = new MCPClient({
  sseUrl: "http://your-server:3001/sse",
  messagesUrl: "http://your-server:3001/messages"
});

// Use the auto-detection tool
const result = await mcpClient.callTool("getTokenInfo", {
  tokenAddress: "DtR4D9FtVoTX2569gaL837ZgrB6wNjj6tkmnX9Rdk9B2"
});

For Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "dexscreener": {
      "command": "node",
      "args": ["/absolute/path/to/index.js"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

⚔ Performance

  • Address Detection: ~0.001ms (single regex match)
  • EVM Fallback: ~200-500ms max (only on API failure)
  • Rate Limits: 60/min for profiles, 300/min for pairs/search

šŸ”§ Development

Project Structure

mcp-dexscreener/
ā”œā”€ā”€ index.js          # STDIO transport (Claude Desktop)
ā”œā”€ā”€ index-sse.js      # HTTP/SSE transport (remote agents)
ā”œā”€ā”€ package.json      # Dependencies and scripts
ā”œā”€ā”€ Dockerfile        # Production container
ā”œā”€ā”€ docker-compose.yml # Orchestration
ā”œā”€ā”€ test-docker.js    # Container health test suite
└── CLAUDE.md         # Development notes (gitignored)

Testing

The project includes a comprehensive test suite for Docker deployments:

# Run container health tests
node test-docker.js

Tests verify:

  • āœ… Health endpoint functionality
  • āœ… API information endpoint
  • āœ… SSE connection handling
  • āœ… MCP endpoint protection
  • āœ… Proper error responses

Environment Variables

  • PORT - Server port (default: 3001)
  • NODE_ENV - Environment (production/development)

šŸ“„ API Reference

Based on DexScreener API Documentation

Rate limits:

  • Token profiles/boosts: 60 requests/minute
  • Pairs/search: 300 requests/minute

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test with Docker: docker-compose up --build
  5. Submit a pull request

šŸ“œ License

MIT License - see LICENSE file for details

šŸ†˜ Support


Built with ā¤ļø for the crypto community