DE

DexPaprika MCP Server: Multi-Chain DEX Data

Access real-time DEX data, liquidity pools, token details and trading analytics across multiple blockchains with the DexPaprika MCP server.

Quick Install
npx -y @coinpaprika/dexpaprika-mcp

Overview

DexPaprika MCP Server collects and serves aggregated, real‑time data from decentralized exchanges (DEXs) across multiple blockchains. It centralizes information about liquidity pools, token metadata, swap and trade history, and derived trading analytics so developers and analytics teams can query cross‑chain DEX state without running many separate indexers.

The server is useful for building dashboards, trading bots, risk monitors, and model context providers. It exposes a REST API (and usually metrics) and is designed to be deployed beside your data pipeline or as part of a microservice architecture that needs standardized, low-latency DEX context for multiple chains.

Features

  • Multi‑chain DEX aggregation (pools, pairs, tokens, chains)
  • Real‑time and historical swap/trade data
  • Token and pool metadata (reserves, fees, LP holders)
  • Derived analytics (TVL, volume, price, liquidity changes)
  • Unified REST API with predictable endpoints
  • Prometheus metrics and basic health checks for observability
  • Configurable RPC/backfill sources and chain list
  • Lightweight deployment via Docker

Installation / Configuration

Clone the repository and run with Docker Compose (recommended for local testing):

# clone
git clone https://github.com/coinpaprika/dexpaprika-mcp.git
cd dexpaprika-mcp

# start with docker-compose
docker-compose up -d

Basic environment variables (create a .env file in the project root):

# server
PORT=8080
LOG_LEVEL=info

# database
DATABASE_URL=postgres://user:password@db:5432/dexpaprika

# chains / RPCs (comma-separated or JSON depending on config)
RPC_URLS=https://mainnet.infura.io/v3/<KEY>,https://rpc.optimism.io

# optional API key for public endpoints
API_KEY=

# metrics
METRICS_PORT=9090

If you prefer to build and run from source (Node / Go / Python—follow the repo README for language specifics):

# example: build and run (adjust commands per language/runtime)
npm install
npm run build
npm start

Or with Docker (explicit image placeholder):

docker build -t dexpaprika-mcp:latest .
docker run -p 8080:8080 --env-file .env dexpaprika-mcp:latest

Note: Replace RPC endpoints, database URL and credentials with production values. Configure chain list and backfill parameters according to your monitoring window.

Available Resources

  • GitHub repository: https://github.com/coinpaprika/dexpaprika-mcp
  • REST API (OpenAPI/Swagger) — check the repo for the OpenAPI spec
  • Prometheus metrics endpoint: /metrics
  • Health check endpoint: /healthz
  • Example Postman / curl snippets (see below)
  • Database migrations and seed scripts (included in repo)

API Reference (common endpoints)

This table summarizes typical endpoints you can expect. Consult the repo OpenAPI for exact schemas.

EndpointMethodDescription
/v1/poolsGETList pools across supported chains (filters: chain, token, sort, page)
/v1/pools/{poolId}GETDetailed pool info (reserves, tokens, fees, TVL)
/v1/tokensGETSearch tokens (by symbol, name, address)
/v1/tokens/{address}GETToken metadata and recent price history
/v1/tradesGETRecent swaps/trades (filter by pool, token, timeframe)
/v1/metrics/tvlGETAggregated TVL per chain or protocol
/healthzGETLiveness/readiness
/metricsGETPrometheus metrics

Example: fetch pools for a chain

curl 'http://localhost:8080/v1/pools?chain=ethereum&limit=50'

Get token details:

curl 'http://localhost:8080/v1/tokens/0x6b175474e89094c44da98b954eedeac495271d0f'

Use Cases

  • Dashboarding: Build a multi‑chain DEX dashboard showing TVL, 24h volume, and top pools. Periodically poll /v1/metrics/tvl and /v1/pools to show live values.

    • Example: poll every 30 seconds and push to a timeseries DB for Grafana visualizations.
  • Arbitrage monitoring: Stream /v1/trades and /v1/pools to detect price divergence between pools and chains. Use the token price endpoints to compute implied spreads.

    • Example: query token price across chains and flag >1% spread for an alert.
  • Liquidity alerts and risk monitoring: Track large liquidity removals by subscribing (or polling) pool history; trigger alerts when reserve changes exceed thresholds.

    • Example: fetch pool and last N trades, compute reserve delta and alert if >20%.
  • Portfolio / valuation: Fetch token metadata and latest prices to compute portfolio valuations across chains for wallets that hold LP tokens.

    • Example: resolve LP composition via /v1/pools/{poolId}, get token prices, compute underlying token amounts.
  • Model context provider: Supply a language model or trading signal system with up‑to‑date market context by querying pools, trades, and token history for a given timeframe.

Tips for Production

  • Run with a persistent database and periodic backup.
  • Configure RPC fallbacks and rate limiting for reliability.
  • Expose /metrics and integrate with Prometheus/Grafana for observability.
  • Apply API key or network restrictions for public endpoints to prevent abuse.

For detailed API schemas, examples, and deployment options, refer to the repository documentation and OpenAPI spec included in the GitHub project.