Universal Crypto MCP can be configured through environment variables, a config file, or CLI arguments.
| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Environment mode | production |
LOG_LEVEL |
Logging level (DEBUG, INFO, WARN, ERROR) | INFO |
MCP_TRANSPORT |
Transport mode (stdio, http, sse) | stdio |
MCP_PORT |
HTTP/SSE server port | 3000 |
| Variable | Description | Required For |
|---|---|---|
COINGECKO_API_KEY |
CoinGecko Pro API key | Enhanced market data |
BINANCE_API_KEY |
Binance API key | Trading tools |
BINANCE_API_SECRET |
Binance API secret | Trading tools |
BINANCE_US_API_KEY |
Binance US API key | US trading |
BINANCE_US_API_SECRET |
Binance US API secret | US trading |
CRYPTOPANIC_API_KEY |
CryptoPanic API key | News tools |
ETHERSCAN_API_KEY |
Etherscan API key | Contract verification |
INFURA_API_KEY |
Infura API key | RPC fallback |
ALCHEMY_API_KEY |
Alchemy API key | RPC fallback |
| Variable | Description | Default |
|---|---|---|
X402_PRIVATE_KEY |
EVM private key for payments | - |
X402_CHAIN |
Default chain | arbitrum |
X402_MAX_AMOUNT |
Maximum payment amount | 1.0 |
X402_AUTO_PAY |
Enable automatic payments | false |
| Variable | Description | Default |
|---|---|---|
PRIVATE_KEY |
EVM wallet private key | - |
MNEMONIC |
HD wallet mnemonic phrase | - |
RPC_URL |
Custom RPC endpoint | Chain default |
Create a .universal-crypto-mcp.json file in your project root or home directory:
{
"transport": "stdio",
"logLevel": "INFO",
"modules": {
"trading": {
"enabled": true,
"exchanges": ["binance", "binance-us"]
},
"marketData": {
"enabled": true,
"providers": ["coingecko", "dexpaprika"]
},
"defi": {
"enabled": true,
"protocols": ["aave", "uniswap", "compound"]
},
"wallets": {
"enabled": true,
"chains": ["ethereum", "arbitrum", "base", "polygon"]
},
"payments": {
"enabled": true,
"x402": {
"chain": "arbitrum",
"maxAmount": "1.0",
"autoPay": false
}
}
},
"rpc": {
"ethereum": "https://eth.llamarpc.com",
"arbitrum": "https://arb1.arbitrum.io/rpc",
"base": "https://mainnet.base.org",
"polygon": "https://polygon-rpc.com"
}
}Override settings via command line:
# Transport mode
npx @nirholas/universal-crypto-mcp --http --port 8080
# Log level
npx @nirholas/universal-crypto-mcp --log-level DEBUG
# Enable specific modules
npx @nirholas/universal-crypto-mcp --modules trading,market-data
# Custom config file
npx @nirholas/universal-crypto-mcp --config ./my-config.jsonConfiguration is applied in this order (later overrides earlier):
- Default values
- Configuration file
- Environment variables
- CLI arguments
{
"modules": {
"trading": {
"enabled": true,
"exchanges": ["binance"],
"sandbox": false,
"defaultPairs": ["BTC/USDT", "ETH/USDT"]
}
}
}{
"modules": {
"defi": {
"enabled": true,
"protocols": ["aave", "uniswap", "compound"],
"slippageTolerance": 0.5,
"gasMultiplier": 1.2
}
}
}{
"modules": {
"wallets": {
"enabled": true,
"chains": ["ethereum", "arbitrum"],
"confirmations": 1,
"gasStrategy": "fast"
}
}
}Add to your .gitignore:
.env
.env.local
*.key
*-key.jsonStore sensitive data in environment variables, not config files:
export X402_PRIVATE_KEY="0x..."
export BINANCE_API_KEY="..."
export BINANCE_API_SECRET="..."When using API keys:
- Enable only required permissions
- Use IP whitelisting when available
- Set spending limits for exchange APIs
Always test with small amounts before enabling larger transactions:
{
"modules": {
"payments": {
"x402": {
"maxAmount": "0.01"
}
}
}
}- First Tool - Use your first crypto tool
- Deployment - Deploy to production