Get the FREE Ultimate OpenClaw Setup Guide →

mexc

MCP server from RyanLisse/mexc-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ryanlisse-mexc-mcp-server node dist/server.js \
  --env MEXC_API_KEY="your_mexc_api_key_here" \
  --env MEXC_SECRET_KEY="your_mexc_secret_key_here"

How to use

The MEXC MCP Server provides real-time market data and trading capabilities by integrating with the MEXC cryptocurrency exchange through Encore.ts. It exposes MCP tools for accessing live ticker data, order books, 24-hour statistics, and a suite of trading operations such as placing and managing orders, querying balances, and retrieving historical data. The server leverages Encore.ts secrets management for API keys to securely store credentials and uses built-in rate limiting and caching to ensure reliable performance under load. Tools are designed to be used via MCP tool endpoints, allowing clients to call them with the required input parameters and receive structured responses.

To use the server, configure your environment with your MEXC API credentials (via Encore secrets or environment vars in development). Start the development or production server as described in the installation guide, then interact with the MCP tools such as mexc_get_ticker, mexc_get_order_book, mexc_place_order, mexc_cancel_order, and mexc_get_account_balance. The tool list also includes authentication, connectivity checks, and trading history endpoints, enabling comprehensive exchange integration for market data and automated trading workflows.

How to install

Prerequisites:

  • Bun (>= 1.0.0)
  • Node.js (>= 18.0.0)
  • Encore CLI (for deployment)
  • MEXC API credentials
  1. Clone the repository
git clone https://github.com/RyanLisse/mexc-mcp-server.git
cd mexc-mcp-server
  1. Install dependencies
bun install
  1. Configure environment variables Create a .env file in the project root with your MEXC API credentials:
# MEXC API Credentials
MEXC_API_KEY=your_mexc_api_key_here
MEXC_SECRET_KEY=your_mexc_secret_key_here
  1. Run development server
bun run dev
  1. Run tests and quality checks
bun test
bun run test:coverage
bun run check
bun run format
bun run lint:fix
  1. Deployment (Encore Cloud) Reference Encore deployment steps in the README, including secret management and environment-specific configuration.

Additional notes

Environment variables can be provided directly or via Encore.ts secrets management. Suggested secrets usage mirrors the README examples: MEXC_API_KEY and MEXC_SECRET_KEY. Ensure you store credentials securely and rotate keys regularly. If you encounter connectivity or rate-limiting issues, review the built-in rate limiting and caching configurations, and verify that your API keys have appropriate permissions. For local development, you can fall back to process.env values if Encore secrets are not available. The MCP tools list (e.g., mexc_get_ticker, mexc_place_order) provides a convenientll set of entry points for market data and trading actions. If you need to troubleshoot, consult the test suite commands such as test:mexc and test:coverage to verify connectivity and API handling.

Related MCP Servers

Sponsor this space

Reach thousands of developers