KuCoin Futures MCP Server
Provides tools for interacting with the KuCoin Futures API, enabling market data retrieval, order placement and cancellation, position and margin management, funding rate history, and account balance queries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
KuCoin Futures MCP Server
A production-ready Model Context Protocol (MCP) Server for KuCoin Futures API with header-based authentication, deployed on Vercel Edge Functions.
π Table of Contents
Related MCP server: Kalshi MCP Server
π Features
20 Complete Trading Tools
Category | Tools | Description |
Market Data (5) |
| Real-time market data and contract specifications |
Order Management (8) |
| Complete order lifecycle management |
Position Management (4) |
| Position monitoring and management |
Funding (2) |
| Funding rate information |
Account (1) |
| Account overview and balances |
Key Capabilities
β Real-time Trading - Place, cancel, and monitor orders
β Position Management - Track P&L, manage margin, view history
β Risk Management - Stop-loss and take-profit orders
β Market Analysis - OHLCV data, order book depth, funding rates
β Universal Compatibility - Claude Desktop, n8n, direct HTTP
β Production Ready - European deployment, rate limiting, error handling
π Quick Start
1. Get KuCoin API Keys
# Visit https://futures.kucoin.com/api
# Create API key with permissions: General, Trade2. Deploy to Vercel
3. Configure Environment Variables
KUCOIN_API_KEY=your_api_key
KUCOIN_API_SECRET=your_api_secret
KUCOIN_API_PASSPHRASE=your_passphrase
MCP_AUTH_KEY=your_secure_auth_key4. Connect to Claude Desktop
{
"mcpServers": {
"kucoin-futures": {
"command": "npx",
"args": ["mcp-remote", "https://your-deployment.vercel.app/mcp"],
"env": {}
}
}
}π Prerequisites
Required Accounts
API key with
GeneralandTradepermissionsSufficient balance for trading operations
For deploying the MCP server
Free tier sufficient for personal use
Supported Clients
Claude Desktop - Direct MCP integration
n8n Workflows - HTTP Request nodes
Custom Applications - Direct JSON-RPC API
π Deployment
Option 1: One-Click Deploy (Recommended)
Option 2: Manual Deployment
Clone Repository
git clone https://github.com/mbrio089/kucoin-mcp-server.git cd kucoin-mcp-serverInstall Vercel CLI
npm i -g vercelDeploy
vercel --prodSet Environment Variables
vercel env add KUCOIN_API_KEY vercel env add KUCOIN_API_SECRET vercel env add KUCOIN_API_PASSPHRASE vercel env add MCP_AUTH_KEY
Environment Configuration
Copy .env.example to configure your deployment:
# KuCoin Futures API credentials (get from https://futures.kucoin.com/api)
KUCOIN_API_KEY=your_kucoin_api_key_here
KUCOIN_API_SECRET=your_kucoin_api_secret_here
KUCOIN_API_PASSPHRASE=your_kucoin_api_passphrase_here
# MCP Authentication (generate a secure random string)
MCP_AUTH_KEY=your_secure_mcp_auth_key_hereπ οΈ Usage
Claude Desktop Integration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kucoin-futures": {
"command": "npx",
"args": ["mcp-remote", "https://your-deployment.vercel.app/mcp"],
"env": {}
}
}
}Example Prompts:
"Show me all available futures contracts"
"What's the current price of XBTUSDTM?"
"Place a limit buy order for 0.1 BTC at $65000"
"Show my current positions and their P&L"
"Set a stop loss at $60000 for my BTC position"n8n Workflow Integration
Use HTTP Request nodes with authentication:
{
"method": "POST",
"url": "https://your-deployment.vercel.app/mcp",
"headers": {
"Content-Type": "application/json",
"X-MCP-Auth-Key": "your-auth-key"
},
"body": {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getPositions",
"arguments": {}
}
}
}Direct HTTP API
curl -X POST https://your-deployment.vercel.app/mcp \
-H "Content-Type: application/json" \
-H "X-MCP-Auth-Key: your-auth-key" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getTicker",
"arguments": {"symbol": "XBTUSDTM"}
}
}'π API Reference
Authentication
Two authentication methods supported:
# Method 1: Custom Header
X-MCP-Auth-Key: your-auth-key
# Method 2: Bearer Token
Authorization: Bearer your-auth-keyTool Categories
getSymbols- Get all available futures contractsgetTicker- Real-time price and 24h statisticsgetOrderBook- Order book depth (optimized endpoint)getKlines- Candlestick/OHLCV data with time rangesgetSymbolDetail- Contract specifications and parameters
addOrder- Place limit/market orders (requires: symbol, side, type, size, marginMode, positionSide, leverage for new positions)cancelOrder- Cancel specific order by IDcancelAllOrders- Cancel all orders or by symbolgetOrders- List orders with filtering optionsgetOrderById- Get detailed order informationaddStopOrder- Place stop-loss/take-profit ordersgetOpenOrders- Get open order statisticsgetFills- Get executed trades with fees and liquidity
getPositions- Get all open positionsgetPosition- Get position details for specific symbolmodifyMargin- Add or remove position margingetPositionsHistory- Historical positions with P&L analysis
getFundingRate- Current funding ratesgetFundingHistory- Historical funding rate datagetAccountFutures- Account overview and balances
β‘ Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client β β Vercel Edge β β KuCoin API β
β (Claude/n8n) βββββΊβ Functions βββββΊβ Futures β
β β β (EU Regions) β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββTechnical Stack
Runtime: Vercel Edge Functions (Node.js 22.x)
Language: TypeScript with Zod validation
Protocol: JSON-RPC 2.0 compliant MCP
Deployment: European regions (Frankfurt, Dublin, Paris)
Authentication: HMAC SHA256 + Header-based MCP auth
Key Benefits
Low Latency: Edge functions with <100ms response times
Geo-Bypass: European deployment avoids US restrictions
Scalability: Auto-scaling without infrastructure management
Security: Multi-layer authentication and encrypted transmission
π Security
Multi-Layer Security
Transport Security: HTTPS/TLS encryption
API Authentication: HMAC SHA256 signatures for KuCoin
Access Control: Header-based authentication for MCP
Input Validation: Zod schemas validate all inputs
Environment Security: Sensitive data in Vercel environment variables
Rate Limiting
Market Data: 100 requests/10 seconds
Trading: 30 requests/3 seconds
Individual Endpoints: Specific limits per endpoint
Best Practices
Never commit API keys to version control
Use environment variables for all sensitive data
Regularly rotate authentication keys
Monitor API usage and rate limits
π§ Troubleshooting
Common Issues
401 Authentication Errors
# Check MCP authentication
curl -H "X-MCP-Auth-Key: your-key" https://your-deployment.vercel.app/mcp
# Verify environment variables in Vercel dashboard
vercel env lsKuCoin API Errors
Verify API key permissions (General + Trade required)
Check rate limits (Market: 100/10s, Trading: 30/3s)
Ensure correct API credentials in environment variables
Geo-restriction Issues
Server deployed in EU regions to bypass US restrictions
If issues persist, check deployment region in Vercel
Tool Execution Errors
Validate JSON-RPC request format
Ensure all required parameters are provided
Check tool schemas in MCP tools list
Debug Commands
# Test MCP server health
curl -X OPTIONS https://your-deployment.vercel.app/mcp
# List available tools
curl -X POST https://your-deployment.vercel.app/mcp \
-H "Content-Type: application/json" \
-H "X-MCP-Auth-Key: your-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Check Vercel deployment logs
vercel logs https://your-deployment.vercel.appπ€ Contributing
Contributions are welcome! Please follow these steps:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Setup
git clone https://github.com/mbrio089/kucoin-mcp-server.git
cd kucoin-mcp-server
npm install
cp .env.example .env.local # Configure your environment
vercel dev # Start local development serverCode Standards
TypeScript with strict mode
Zod for input validation
JSON-RPC 2.0 compliance
Comprehensive error handling
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Moritz Braun LinkedIn: https://www.linkedin.com/in/moritz-braun-748434b4/
β Star this repository if you find it helpful!
Need help? Open an issue or check the troubleshooting guide.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Live prices, perps, prediction markets and a paper trading desk over one MCP.
Create and manage trading strategies, bots, webhooks and signals from any MCP client.
MCP server for Mudrex futures trading enabling AI agents to securely access data and risk tools.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceComprehensive Binance Futures trading MCP server with 41 professional trading tools across account management, order execution, market data, and risk management. Features smart ticker caching, secure authentication, and Docker support for seamless integration with MCP clients.4PythonMIT
- AlicenseNot gradedqualityDmaintenanceEnables users to search, analyze, and trade on Kalshi prediction markets directly through MCP-compatible clients. It supports portfolio management, market data retrieval, and limit order execution with production-grade authentication and rate limiting.27 PyPI1MIT
- AlicenseAqualityCmaintenanceMCP server for Binance USDT-M Futures trading β exposes tools for market data, account state, order management, and position/margin control.238Apache 2.0

gate-local-mcpofficial
AlicenseNot gradedqualityDmaintenanceExposes the full Gate API v4 to MCP clients with 384 tools for spot, futures, margin, wallet, and more. Supports both public endpoints (no auth) and authenticated trading operations.320 npm1MIT