TypeScriptADK-TS

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_TICKER
market:string

Description

Get the latest ticker data from Upbit for a single market

GET_ORDERBOOK
market:string

Description

Get orderbook snapshot for a given market

GET_TRADES
market:string

Description

Get recent trades for a market

GET_ACCOUNTS

No parameters

Description

Get Upbit account balances (requires private API enabled)

CREATE_ORDER
market:stringside:stringord_type:stringvolume:stringprice:stringtime_in_force:stringsmp_type:stringidentifier:string

Description

Create an Upbit order (requires private API)

GET_ORDERS
market:stringstate:stringpage:integerlimit:integer

Description

List Upbit orders (requires private API)

GET_ORDER
uuid:stringidentifier:string

Description

Get a single Upbit order (requires private API)

CANCEL_ORDER
uuid:string

Description

Cancel an existing Upbit order (requires private API)

LIST_WITHDRAWAL_ADDRESSES

No parameters

Description

List registered withdrawal-allowed addresses (requires private API)

CREATE_WITHDRAWAL
currency:stringamount:stringaddress:stringnet_type:stringsecondary_address:stringtransaction_type:string

Description

Request a digital asset withdrawal (requires private API)

GET_WITHDRAWAL
uuid:string

Description

Get a single withdrawal by UUID (requires private API)

LIST_WITHDRAWALS
currency:stringstate:stringpage:integerlimit:integer

Description

List withdrawals (requires private API)

CANCEL_WITHDRAWAL
uuid:string

Description

Cancel a digital asset withdrawal by UUID (requires private API)

GET_DEPOSIT_CHANCE
currency:stringnet_type:string

Description

Get deposit availability information for a currency (private)

CREATE_DEPOSIT_ADDRESS
currency:stringnet_type:string

Description

Request creation of a deposit address (requires private API)

GET_DEPOSIT_ADDRESS
currency:stringnet_type:string

Description

Get a single deposit address for a currency and net_type (private)

LIST_DEPOSIT_ADDRESSES

No parameters

Description

List deposit addresses for all currencies (requires private API)

GET_DEPOSIT
uuid:string

Description

Get a single deposit by UUID (requires private API)

LIST_DEPOSITS
currency:stringstate:stringpage:integerlimit:integer

Description

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 operations
  • UPBIT_SECRET_KEY: Required for private trading operations
  • UPBIT_ENABLE_TRADING: Set to "true" to enable trading functionality
  • UPBIT_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