TypeScriptADK-TS

MCP Upbit

Access real-time and historical market data from the Upbit cryptocurrency exchange.

Overview

The Upbit MCP server connects your agent to the Upbit exchange API. It can retrieve ticker data, order books, trade history, and OHLCV candles for KRW, BTC, and USDT markets. Trading operations require API credentials; market data queries are available without authentication.

Trading vs. Read-Only

Market data (tickers, order books, candles) is publicly accessible without API credentials. Placing orders or accessing account data requires an Access Key, Secret Key, and UPBIT_ENABLE_TRADING=true.

Getting Started

Install the package:

pnpm add @iqai/mcp-upbit

Use the server in your agent:

import { McpUpbit } from "@iqai/adk";

const toolset = McpUpbit();

const tools = await toolset.getTools();
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 market data and trading",
  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_upbit_access_key",
        "UPBIT_SECRET_KEY": "your_upbit_secret_key",
        "UPBIT_ENABLE_TRADING": "true"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
UPBIT_ACCESS_KEYFor trading onlyUpbit Open API access key
UPBIT_SECRET_KEYFor trading onlyUpbit Open API secret key
UPBIT_ENABLE_TRADINGFor trading onlySet to "true" to enable trading operations (default: disabled for safety)

Credentials

To get your Upbit API credentials:

  1. Log into upbit.com and go to My Page → Open API
  2. Click Issue API Key
  3. Set the permissions your agent needs (e.g., asset inquiry, order placement)
  4. Copy the Access Key and Secret Key — the secret key is only shown once

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)

Integration Example

import { AgentBuilder, McpUpbit } from "@iqai/adk";
import * as dotenv from "dotenv";

dotenv.config();

async function main() {
  // Initialize McpUpbit toolset
  const toolset = McpUpbit({
    env: {
      UPBIT_ACCESS_KEY: process.env.UPBIT_ACCESS_KEY,
      UPBIT_SECRET_KEY: process.env.UPBIT_SECRET_KEY,
      UPBIT_ENABLE_TRADING: "true",
    },
  });

  // Get available McpUpbit tools
  const upbitTools = await toolset.getTools();

  // Create agent with McpUpbit tools
  const { runner } = await AgentBuilder.create("upbit_agent")
    .withModel("gemini-2.5-flash")
    .withDescription("A crypto trading agent that monitors and trades on Upbit")
    .withTools(...upbitTools)
    .build();

  const response = await runner.ask(
    "What is the current price of Bitcoin on Upbit and how has it moved in the last 24 hours?",
  );

  console.log(response);
}

main().catch(console.error);

Further Resources