Desic OKX Agent
Provides tools for accessing OKX market data (ticker, order book, candles, etc.), account balances, positions, orders, and executing trades via the OKX API.
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., "@Desic OKX Agentget ticker for BTC-USDT"
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.
Desic OKX Agent
An independent local OKX runtime, MCP server, CLI, and reusable agent skills for Codex, Claude Code, and other MCP clients.
Desic OKX Agent is an independent community project. It is not affiliated with, endorsed by, or an official product of OKX.
What it provides
A shared local Runtime reused by multiple MCP and CLI clients
In-memory ticker, order book, trades, candles, funding, mark price, and open-interest data
Time-aligned decision snapshots with freshness and consistency metadata
Public market and derivatives tools that work without API credentials
Named OKX accounts for balances, positions, orders, fills, bills, and risk summaries
Direct ordinary-order, algo-order, leverage, amend, cancel, and close-position operations
Experimental News and Smart Money intelligence with SQLite history fallback
Seven reusable analysis and trading skills
SQLite WAL persistence for closed candles, intelligence history, derived events, and execution records
The project does not expose withdrawal, deposit, transfer, asset-movement, or API-key-management tools.
Related MCP server: seashail
Requirements
Node.js 22.12 or newer
npm
Network access to OKX, or an HTTP/HTTPS proxy that can reach OKX
Install from GitHub
The npm package is not published yet. Install the current source version with:
git clone https://github.com/xiazhi88/desic-okx-agent.git
cd desic-okx-agent
npm ci
npm run build
npm linkThis registers the desic-okx command on the local machine.
After the package is published to npm, installation will be:
npm install --global desic-okx-agentQuick start
Public market tools do not require an account:
desic-okx start
desic-okx call market_get_ticker --json '{"instId":"BTC-USDT-SWAP"}'
desic-okx call market_get_decision_snapshot --json '{"instId":"BTC-USDT-SWAP","bar":"1m"}'The Runtime starts automatically when an MCP client or CLI call needs it. desic-okx start is optional.
Useful Runtime commands:
desic-okx status
desic-okx tools
desic-okx stopConnect Codex
Register the local stdio MCP server:
codex mcp add desic-okx -- desic-okx mcpOr add it to ~/.codex/config.toml:
[mcp_servers.desic-okx]
command = "desic-okx"
args = ["mcp"]Connect Claude Code
Register it for the current user:
claude mcp add --transport stdio --scope user desic-okx -- desic-okx mcpVerify the connection with:
claude mcp get desic-okxA JSON example is available in examples/claude-code/mcp.json.
Install the skills
The MCP server exposes the tools. Skills add reusable analysis and trading workflows. Install only the skills you want by copying their directories from skills/.
Codex personal skills:
~/.agents/skills/<skill-name>/SKILL.mdClaude Code personal skills:
~/.claude/skills/<skill-name>/SKILL.mdProject-scoped alternatives are .agents/skills/ for Codex and .claude/skills/ for Claude Code.
Included skills:
okx-market-analysisokx-derivatives-analysisokx-news-intelligenceokx-smart-money-analysisokx-account-analysisokx-tradingtrading-philosophy
Restart the client if a newly installed skill does not appear.
Configure an OKX account
Public tools work without credentials. Account and trading tools use a named account alias and never accept credentials as tool arguments.
Add and verify an account interactively:
desic-okx account add --name demo --environment demo
desic-okx account verify --name demo
desic-okx account listThe credential prompts hide input. Credentials are stored in the system configuration directory in config.json; Unix permissions are set to 0600. The active path is shown by:
desic-okx config-pathEnvironment variables can override a named account:
OKX_ACCOUNT
OKX_API_KEY
OKX_API_SECRET
OKX_API_PASSPHRASE
OKX_ENVIRONMENT=demo|liveThe three credential values must be provided together. Whether an account can trade is determined by the permissions assigned to its API key in OKX.
Proxy
REST and WebSocket connections share the proxy configured in config.json:
{
"proxy": {
"url": "http://127.0.0.1:7890"
}
}See examples/config.example.json for a complete credential-free configuration template. Restart the Runtime after changing configuration.
Runtime behavior
Binds a random port on
127.0.0.1Stores PID, port, and a random access token in private local state files
Prewarms
BTC-USDT-SWAPandETH-USDT-SWAPSubscribes to other instruments on demand and releases them after 15 minutes of inactivity
Serves fresh data from memory and uses REST for cold or stale data
Reconnects WebSockets automatically
Rebuilds the order book after sequence gaps or checksum failures
Restores persisted candle and intelligence history before live prewarming
market_get_decision_snapshot combines market components around one observation time. It reports every component's exchange timestamp, receive time, age, warnings, and maximum observed time skew. Trading prechecks reject inconsistent snapshots.
Trading behavior
Trading tools require a stable executionKey. Client order IDs are derived from that key, and execution state is recorded locally. When a write times out or returns an unclear result, the Runtime queries remote order state before deciding whether a retry is safe.
Supported order families include:
limitmarketpost_onlyiocfoktriggerconditionaltrailing
Ordinary and strategy orders are checked against instrument increments, minimum size, current account permission, and market snapshot consistency before submission.
Use an OKX Demo account first. Trading software can lose money, and the project provides no investment advice or guarantee of execution quality.
Experimental intelligence
News and Smart Money use upstream interfaces that may change without notice. Compatibility failures return CAPABILITY_UNAVAILABLE, or locally persisted history when available. A failure in these modules does not disable market, account, or trading tools.
Development
npm ci
npm run checkThe check pipeline runs:
TypeScript type checking
Unit tests
Skill validation
Sensitive-information scanning
Production build
MCP SDK smoke tests
The optional end-to-end trading test is restricted to OKX Demo. Export the four environment variables listed in the account section, using demo as the environment, and then run:
npm run test:demoNormal tests never submit orders.
Status
This repository is currently pre-release software at version 0.1.0. Unit, packaging, Skill, and MCP transport checks are automated. Real OKX Demo trading should be validated in the target network environment before a 1.0.0 release.
License
MIT. See LICENSE.
OKX and related marks belong to their respective owners.
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.
Related MCP Servers
Alicense-qualityCmaintenanceMCP server connecting AI assistants to OKX exchange, enabling trading, market data, account management, and more via 150+ tools across 11 modules.Last updated387MIT- Alicense-qualityFmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.Last updated9Apache 2.0
- AlicenseAqualityCmaintenanceA universal MCP server that enables any LLM or AI agent to access expert skills from your local filesystem.Last updated312633MIT
- AlicenseDqualityCmaintenanceEnables AI agents to access the full OKX exchange API for trading, market data, account management, and more through 300+ MCP tools.Last updated1001251MIT
Related MCP Connectors
Agent-first skill marketplace with USK open standard for Claude, Cursor, Gemini, Codex CLI.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/xiazhi88/desic-okx-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server