edgex-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@edgex-mcpshow me my open positions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
edgex-mcp
MCP (Model Context Protocol) server for EdgeX perpetual contract trading.
Provides 16 AI agent tools for market data, account management, and order execution. Works with Cursor, Claude Code, OpenClaw, and any MCP-compatible AI client. Use testnet by setting EDGEX_TESTNET=1 in the MCP env (like the CLI --testnet flag).
Setup
Add to your MCP configuration:
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"edgex": {
"command": "npx",
"args": ["-y", "@realnaka/edgex-mcp"],
"env": {
"EDGEX_ACCOUNT_ID": "your-account-id",
"EDGEX_STARK_PRIVATE_KEY": "0x..."
}
}
}
}Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"edgex": {
"command": "npx",
"args": ["-y", "@realnaka/edgex-mcp"],
"env": {
"EDGEX_ACCOUNT_ID": "your-account-id",
"EDGEX_STARK_PRIVATE_KEY": "0x..."
}
}
}
}OpenClaw (~/.openclaw/openclaw.json):
Prerequisite: OpenClaw does not natively support MCP. Install MCP Porter first:
npx clawhub@latest install mcporterThen configure the MCP server below. MCP Porter acts as a bridge between OpenClaw and MCP servers.
{
"mcp": {
"servers": {
"edgex": {
"command": "npx",
"args": ["-y", "@realnaka/edgex-mcp"],
"env": {
"EDGEX_ACCOUNT_ID": "your-account-id",
"EDGEX_STARK_PRIVATE_KEY": "0x..."
}
}
}
}
}Market data tools work without credentials. Account and trading tools require EDGEX_ACCOUNT_ID and EDGEX_STARK_PRIVATE_KEY.
Related MCP server: coinex-mcp-server
Tools
Environment (no auth)
Tool | Description |
| Current baseUrl, isTestnet, environment ("testnet" | "mainnet"). Call this to confirm testnet vs mainnet before trading. |
Market Data (public, no auth)
Tool | Description |
| 24h ticker: price, volume, OI, funding rate. Omit symbol for multiple contracts. |
| Order book bids/asks |
| Candlestick data (1m to 1M intervals) |
| Current and predicted funding rate |
| Long/short ratio from multiple exchanges |
| Market-wide volume summary |
Account (requires auth)
Tool | Description |
| Account balances, equity, margin |
| Open positions with unrealized PnL |
| Active/pending orders |
| Status of a specific order |
| Max order size given current balance |
| Set leverage per contract (cross-margin) |
Trading (requires auth)
Tool | Description |
| Place limit/market orders with optional TP/SL |
| Cancel orders by ID |
| Cancel all orders (optionally by symbol) |
Supported Assets
290+ perpetual contracts:
Crypto: BTC, ETH, SOL, and more
US Equities: TSLA, AAPL, NVDA, GOOG, AMZN, META, and more
Flexible symbol input: BTC, btc, BTCUSD, or contract ID 10000001.
Environment Variables
Variable | Required | Description |
| For trading | EdgeX account ID |
| For trading | StarkEx private key |
| No | Set to |
| No | Override REST API URL |
| No | HTTP proxy URL (see below) |
Proxy Configuration
Node.js's built-in fetch does not automatically use system proxy settings ($https_proxy / $http_proxy). If you're behind a proxy (common in China, corporate networks, etc.), requests to the EdgeX API will fail silently.
The MCP server auto-detects proxy env vars at startup and configures fetch accordingly (requires Node.js >= 20 or undici installed). You just need to pass the proxy URL via MCP env config:
{
"mcpServers": {
"edgex": {
"command": "npx",
"args": ["-y", "@realnaka/edgex-mcp"],
"env": {
"HTTPS_PROXY": "http://127.0.0.1:7890",
"EDGEX_ACCOUNT_ID": "your-account-id",
"EDGEX_STARK_PRIVATE_KEY": "0x..."
}
}
}
}Why this is needed: npx spawns a new Node.js process that does not inherit your shell's proxy environment variables. You must explicitly pass HTTPS_PROXY (or HTTP_PROXY) in the MCP env block.
Verify proxy is active: Call edgex_get_environment — the response includes a proxy field showing the active proxy URL or "none".
Security
Private keys stay on your local machine (never sent to any third-party server)
The MCP server runs as a local process, communicating via stdin/stdout
Credentials are passed via environment variables, not stored in config files
Use sub-account keys and set withdrawal whitelist on your main account
Resources (for AI agents)
The server exposes three MCP Resources that AI agents can read for context:
Resource URI | Content |
| Margin, order types, stock contract rules, funding, liquidation |
| Safe order workflows, key field paths, data parsing rules |
| JSON response schemas for all tools |
AI clients (Cursor, Claude Code) will automatically discover these via resources/list and can read them before performing tasks.
EdgeX Tool Ecosystem
This project is part of the EdgeX developer ecosystem. Each project is independent — choose whichever fits your integration scenario:
Project | npm Package | For |
edgex-mcp (this) |
| AI agents via MCP protocol (Cursor, Claude Code, OpenClaw) |
| Humans, shell scripts, and AI agents via SKILL.md |
Key differences:
edgex-mcp — structured tool interface, type-safe arguments via MCP protocol, server instructions and resources for AI context. Best for deep AI integration.
edgex-cli — text-based CLI with
--jsonoutput, installable SKILL.md for AI agents. Best for shell scripting and human interaction.
Both connect to the same EdgeX exchange API. You can use them together or independently.
Full Guide
1. Installation & Configuration
Add the
edgexentry shown above to your MCP configuration (command+args+ optionalenv).Market data only: You can skip
EDGEX_ACCOUNT_IDandEDGEX_STARK_PRIVATE_KEY— all public market data tools work without credentials.Trading & account access: Set
EDGEX_ACCOUNT_IDandEDGEX_STARK_PRIVATE_KEYin the MCPenvblock (use the corresponding credentials for mainnet or testnet).
2. Testnet vs Mainnet
Mainnet (production): Leave
EDGEX_TESTNETunset or set to0. Connects tohttps://pro.edgex.exchangewith real funds.Testnet: Set
EDGEX_TESTNET=1in the MCPenv. Connects tohttps://testnet.edgex.exchangefor safe experimentation.
Always call edgex_get_environment first and verify that environment and baseUrl match your expectation before placing any orders.
3. Recommended Workflow
Confirm environment:
edgex_get_environment→ checkenvironment("mainnet" / "testnet").Check market data:
edgex_get_ticker,edgex_get_funding, etc. Omitsymbolfor a multi-contract overview, or passBTC,ETH,SOL, etc.Before placing orders: Call
edgex_get_balancesandedgex_get_max_sizeto verify balance and available size. Confirm direction, quantity, and price with the user before callingedgex_place_order.Order management: Use
edgex_get_ordersto list open orders. Useedgex_get_order_status(orderId)for a single order (if it returnsfound: false, fall back toget_orders). Cancel withedgex_cancel_orderoredgex_cancel_all_orders.
4. Troubleshooting: npx Fails to Start
In some environments, npx @realnaka/edgex-mcp may not launch correctly. Use the local build path instead:
"edgex": {
"command": "node",
"args": ["/absolute/path/to/edgex-mcp/dist/index.js"],
"env": { "EDGEX_ACCOUNT_ID": "...", "EDGEX_STARK_PRIVATE_KEY": "0x..." }
}Alternatively, install globally and run directly:
npm install -g @realnaka/edgex-mcp
# Then use "command": "edgex-mcp" in your MCP configKnown Limitations
Issue | Description | Workaround |
get_order_status | The backend | Use |
npx startup | Some npm versions may not install the | Use the |
US equity market orders | Market orders for US equity contracts are rejected outside trading hours. Only limit orders within the allowed price range are accepted. | Use limit orders for equity contracts. See |
Proxy not inherited |
| Pass |
OpenClaw MCP support | OpenClaw does not natively support MCP protocol. | Install MCP Porter first: |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/realnaka/edgex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server