MCP Upbit
An MCP server for interacting with the Upbit cryptocurrency exchange
- Package:
@iqai/mcp-upbit - Purpose: Interacting with the Upbit cryptocurrency exchange for market data and trading operations.
Usage with ADK TypeScript
import {McpUpbit} from "@iqai/adk";
const toolset = McpUpbit({
env: {
UPBIT_ACCESS_KEY: process.env.UPBIT_ACCESS_KEY,
UPBIT_SECRET_KEY: process.env.UPBIT_SECRET_KEY,
UPBIT_ENABLE_TRADING: "true",
},
})
const tools = await toolset.getTools()import {McpToolset} from "@iqai/adk";
const toolset = new McpToolset({
name: "Upbit MCP Client",
description: "Client for Upbit exchange operations",
transport: {
mode: "stdio",
command: "npx",
args: ["-y", "@iqai/mcp-upbit"],
env: {
UPBIT_ACCESS_KEY: process.env.UPBIT_ACCESS_KEY,
UPBIT_SECRET_KEY: process.env.UPBIT_SECRET_KEY,
UPBIT_ENABLE_TRADING: "true",
PATH: process.env.PATH || "",
},
},
})
const tools = await toolset.getTools(){
"mcpServers": {
"upbit-mcp-server": {
"command": "npx",
"args": ["-y", "@iqai/mcp-upbit"],
"env": {
"UPBIT_ACCESS_KEY": "your_access_key_here",
"UPBIT_SECRET_KEY": "your_secret_key_here",
"UPBIT_ENABLE_TRADING": "true"
}
}
}
}Features
- Access Upbit market data and trading operations
- Public market data tools (no authentication required)
- Private trading tools with API key authentication
- Real-time ticker, orderbook, and trade data
Available Tools
GET_TICKERmarket:string
GET_TICKERDescription
Get the latest ticker data from Upbit for a single market
GET_ORDERBOOKmarket:string
GET_ORDERBOOKDescription
Get orderbook snapshot for a given market
GET_TRADESmarket:string
GET_TRADESDescription
Get recent trades for a market
GET_ACCOUNTSNo parameters
GET_ACCOUNTSNo parameters
Description
Get Upbit account balances (requires private API enabled)
CREATE_ORDERmarket:stringside:stringord_type:stringvolume:stringprice:stringtime_in_force:stringsmp_type:stringidentifier:string
CREATE_ORDERDescription
Create an Upbit order (requires private API)
GET_ORDERSmarket:stringstate:stringpage:integerlimit:integer
GET_ORDERSDescription
List Upbit orders (requires private API)
GET_ORDERuuid:stringidentifier:string
GET_ORDERDescription
Get a single Upbit order (requires private API)
CANCEL_ORDERuuid:string
CANCEL_ORDERDescription
Cancel an existing Upbit order (requires private API)
LIST_WITHDRAWAL_ADDRESSESNo parameters
LIST_WITHDRAWAL_ADDRESSESNo parameters
Description
List registered withdrawal-allowed addresses (requires private API)
CREATE_WITHDRAWALcurrency:stringamount:stringaddress:stringnet_type:stringsecondary_address:stringtransaction_type:string
CREATE_WITHDRAWALDescription
Request a digital asset withdrawal (requires private API)
GET_WITHDRAWALuuid:string
GET_WITHDRAWALDescription
Get a single withdrawal by UUID (requires private API)
LIST_WITHDRAWALScurrency:stringstate:stringpage:integerlimit:integer
LIST_WITHDRAWALSDescription
List withdrawals (requires private API)
CANCEL_WITHDRAWALuuid:string
CANCEL_WITHDRAWALDescription
Cancel a digital asset withdrawal by UUID (requires private API)
GET_DEPOSIT_CHANCEcurrency:stringnet_type:string
GET_DEPOSIT_CHANCEDescription
Get deposit availability information for a currency (private)
CREATE_DEPOSIT_ADDRESScurrency:stringnet_type:string
CREATE_DEPOSIT_ADDRESSDescription
Request creation of a deposit address (requires private API)
GET_DEPOSIT_ADDRESScurrency:stringnet_type:string
GET_DEPOSIT_ADDRESSDescription
Get a single deposit address for a currency and net_type (private)
LIST_DEPOSIT_ADDRESSESNo parameters
LIST_DEPOSIT_ADDRESSESNo parameters
Description
List deposit addresses for all currencies (requires private API)
GET_DEPOSITuuid:string
GET_DEPOSITDescription
Get a single deposit by UUID (requires private API)
LIST_DEPOSITScurrency:stringstate:stringpage:integerlimit:integer
LIST_DEPOSITSDescription
List deposits (requires private API)
Environment Variables
Security
Private keys are used for trading operations. Handle with care.
UPBIT_ACCESS_KEY: Required for private trading operationsUPBIT_SECRET_KEY: Required for private trading operationsUPBIT_ENABLE_TRADING: Set to "true" to enable trading functionalityUPBIT_SERVER_URL: Optional API server URL (defaults to https://api.upbit.com)
Usage Examples
Public Market Data
- "Get ticker for KRW-BTC market"
- "Show me the orderbook for KRW-ETH"
- "What are the recent trades for KRW-ADA?"
Private Trading Operations
- "Show my Upbit account balances"
- "Get my order history for KRW-BTC"
- "Create a buy order for 0.001 BTC at 50,000,000 KRW"
- "Cancel order with UUID abc123..."
Response Format
Actions return structured responses including:
ā Market data with prices and volumes š¹ ā Account balances and positions š° ā Order status and transaction details š ā Error messages when applicable ā ļø
Error Handling
Error Scenarios
The server handles various error scenarios gracefully.
šØ Missing API credentials šø Invalid market identifiers š Trading disabled š API rate limits š Insufficient balances