Skip to main content
Glama
BrainDAO

Upbit MCP Server

by BrainDAO
README.md
# πŸ“ˆ Upbit MCP Server

[![npm version](https://img.shields.io/npm/v/@iqai/mcp-upbit.svg)](https://www.npmjs.com/package/@iqai/mcp-upbit)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

## πŸ“– Overview

Fast MCP server for interacting with [Upbit](https://upbit.com), South Korea's largest cryptocurrency exchange. This server provides comprehensive access to public market data and optional private trading tools including order management, deposits, and withdrawals.

By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to access real-time ticker data, orderbooks, trade history, and execute trading operations directly through their context window.

<a href="https://glama.ai/mcp/servers/@IQAIcom/mcp-upbit">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@IQAIcom/mcp-upbit/badge" alt="Upbit Server MCP server" />
</a>

## ✨ Features

*   **Public Market Data**: Access real-time ticker data, orderbook snapshots, and recent trades for any Upbit market.
*   **Account Management**: View account balances and positions (requires API key).
*   **Order Management**: Create, query, and cancel orders with support for limit, market, and price order types.
*   **Deposit Operations**: Check deposit eligibility, create deposit addresses, and track deposit history.
*   **Withdrawal Operations**: Create withdrawals, manage withdrawal addresses, and track withdrawal history.

## πŸ“¦ Installation

### πŸš€ Using npx (Recommended)

To use this server without installing it globally:

```bash
npx @iqai/mcp-upbit
```

### πŸ”§ Build from Source

```bash
git clone https://github.com/IQAIcom/mcp-upbit.git
cd mcp-upbit
pnpm install
pnpm run build
```

## ⚑ Running with an MCP Client

Add the following configuration to your MCP client settings (e.g., `claude_desktop_config.json`).

### πŸ“‹ Minimal Configuration (Public Data Only)

```json
{
  "mcpServers": {
    "upbit": {
      "command": "npx",
      "args": ["-y", "@iqai/mcp-upbit"],
      "env": {
        "UPBIT_SERVER_URL": "https://api.upbit.com"
      }
    }
  }
}
```

### βš™οΈ Full Configuration (With Trading Enabled)

```json
{
  "mcpServers": {
    "upbit": {
      "command": "npx",
      "args": ["-y", "@iqai/mcp-upbit"],
      "env": {
        "UPBIT_SERVER_URL": "https://api.upbit.com",
        "UPBIT_ACCESS_KEY": "your_access_key_here",
        "UPBIT_SECRET_KEY": "your_secret_key_here",
        "UPBIT_ENABLE_TRADING": "true"
      }
    }
  }
}
```

## πŸ” Configuration (Environment Variables)

| Variable | Required | Description | Default |
| :--- | :--- | :--- | :--- |
| `UPBIT_SERVER_URL` | No | Upbit API server URL | `https://api.upbit.com` |
| `UPBIT_ACCESS_KEY` | For trading | Your Upbit API access key | - |
| `UPBIT_SECRET_KEY` | For trading | Your Upbit API secret key | - |
| `UPBIT_ENABLE_TRADING` | For trading | Enable private trading tools | `false` |

### πŸ”‘ Where to Get Upbit API Keys

1. Create an account on [Upbit](https://upbit.com) if you don't already have one
2. Go to the [Upbit Developer Center](https://upbit.com/service_center/open_api_guide)
3. Create a new API key
4. Set appropriate permissions (read, trade, withdraw as needed)
5. Store your API keys in the environment variables

### πŸ”’ Security & Permissions

- Keep your `UPBIT_SECRET_KEY` private and IP-allowlist your server in Upbit.
- Set `UPBIT_ENABLE_TRADING=true` only when you intend to place/cancel orders or create withdrawals/deposit addresses.
- Upbit permission mapping:
  - Orders: create/cancel β†’ μ£Όλ¬Έν•˜κΈ°, query/list β†’ 주문쑰회
  - Accounts/balances β†’ μžμ‚°μ‘°νšŒ
  - Withdrawals: create/cancel β†’ μΆœκΈˆν•˜κΈ°, query/list/address list β†’ 좜금쑰회
  - Deposits: create deposit address β†’ μž…κΈˆν•˜κΈ°, query/list/chance/address read β†’ μž…κΈˆμ‘°νšŒ

**Documentation:**
- [Auth Reference](https://docs.upbit.com/kr/reference/auth)
- [Orders Reference](https://docs.upbit.com/kr/reference/new-order)
- [Withdrawals Reference](https://docs.upbit.com/kr/reference/withdraw)
- [Deposits Reference](https://docs.upbit.com/kr/reference/available-deposit-information)

## πŸ’‘ Usage Examples

### πŸ“Š Market Data
*   "What is the current price of Bitcoin on Upbit (KRW-BTC)?"
*   "Show me the orderbook for Ethereum (KRW-ETH)."
*   "Get the recent trades for XRP (KRW-XRP)."

### πŸ’Ό Account & Orders (Requires API Key)
*   "What are my current account balances?"
*   "Place a limit buy order for 0.01 BTC at 50,000,000 KRW."
*   "Cancel my pending order with UUID xyz123."
*   "Show me my open orders for KRW-BTC."

### πŸ’³ Deposits & Withdrawals (Requires API Key)
*   "Create a deposit address for BTC."
*   "List my recent deposits."
*   "Withdraw 1 ETH to my wallet address."
*   "Check the status of my withdrawal."

## πŸ› οΈ MCP Tools

<!-- AUTO-GENERATED TOOLS START -->

### `CANCEL_ORDER`
Cancel an existing Upbit order (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uuid` | string | βœ… |  |

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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uuid` | string | βœ… |  |

### `CREATE_DEPOSIT_ADDRESS`
Request creation of a deposit address (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `currency` | string | βœ… |  |
| `net_type` | string | βœ… |  |

### `CREATE_ORDER`
Create an Upbit order (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `market` | string | βœ… |  |
| `side` | string | βœ… |  |
| `ord_type` | string | βœ… |  |
| `volume` | string |  |  |
| `price` | string |  |  |
| `time_in_force` | string |  |  |
| `smp_type` | string |  |  |
| `identifier` | string |  |  |

### `CREATE_WITHDRAWAL`
Request a digital asset withdrawal (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `currency` | string | βœ… |  |
| `amount` | string | βœ… |  |
| `address` | string | βœ… |  |
| `net_type` | string | βœ… |  |
| `secondary_address` | string |  |  |
| `transaction_type` | string |  |  |

### `GET_ACCOUNTS`
Get Upbit account balances (requires private API enabled)

_No parameters_

### `GET_DEPOSIT`
Get a single deposit by UUID (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uuid` | string | βœ… |  |

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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `currency` | string | βœ… |  |
| `net_type` | string | βœ… |  |

### `GET_DEPOSIT_CHANCE`
Get deposit availability information for a currency (private)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `currency` | string | βœ… |  |
| `net_type` | string |  |  |

### `GET_ORDER`
Get a single Upbit order (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uuid` | string |  |  |
| `identifier` | string |  |  |

### `GET_ORDERBOOK`
Get orderbook snapshot for a given market

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `market` | string | βœ… | Upbit market code, e.g., KRW-BTC |

### `GET_ORDERS`
List Upbit orders (requires private API)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `market` | string |  |  |  |
| `state` | string |  | "wait" |  |
| `page` | integer |  | 1 |  |
| `limit` | integer |  | 100 |  |

### `GET_TICKER`
Get the latest ticker data from Upbit for a single market

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `market` | string | βœ… | Upbit market code, e.g., KRW-BTC |

### `GET_TRADES`
Get recent trades for a market

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `market` | string | βœ… | Upbit market code, e.g., KRW-BTC |

### `GET_WITHDRAWAL`
Get a single withdrawal by UUID (requires private API)

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uuid` | string | βœ… |  |

### `LIST_DEPOSIT_ADDRESSES`
List deposit addresses for all currencies (requires private API)

_No parameters_

### `LIST_DEPOSITS`
List deposits (requires private API)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `currency` | string |  |  |  |
| `state` | string |  |  |  |
| `page` | integer |  | 1 |  |
| `limit` | integer |  | 50 |  |

### `LIST_WITHDRAWAL_ADDRESSES`
List registered withdrawal-allowed addresses (requires private API)

_No parameters_

### `LIST_WITHDRAWALS`
List withdrawals (requires private API)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `currency` | string |  |  |  |
| `state` | string |  |  |  |
| `page` | integer |  | 1 |  |
| `limit` | integer |  | 50 |  |

<!-- AUTO-GENERATED TOOLS END -->

## πŸ‘¨β€πŸ’» Development

### πŸ—οΈ Build Project
```bash
pnpm run build
```

### πŸ‘οΈ Development Mode (Watch)
```bash
pnpm run watch
```

### βœ… Linting & Formatting
```bash
pnpm run lint
pnpm run format
```

### πŸ§ͺ Testing with MCP Inspector
```bash
pnpm run build
npx @modelcontextprotocol/inspector node dist/index.js
```

### πŸ“ Project Structure
*   `src/tools/`: Individual tool definitions
*   `src/lib/`: Configuration, HTTP client, and authentication utilities
*   `src/index.ts`: Server entry point

## πŸ“š Resources

*   [Upbit API Documentation](https://docs.upbit.com)
*   [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
*   [Upbit Platform](https://upbit.com)

## ⚠️ Disclaimer

This project interacts with the Upbit cryptocurrency exchange API. Trading in cryptocurrencies involves significant risk. Users should exercise caution and verify all data independently. The authors are not responsible for any financial losses incurred through the use of this software.

## πŸ“„ License

[MIT](LICENSE)

TDQS

B3.1/5.0

Scored across 19 tools

Disambiguation5/5

Each tool maps to a clearly distinct action and resource: market data, orders, deposits, and withdrawals are all separated. The similar-sounding pairs like GET_DEPOSIT vs GET_DEPOSIT_ADDRESS describe different objects, and GET_ORDER vs GET_ORDERS clearly distinguish single vs list operations.

Naming Consistency5/5

All tool names use UPPER_SNAKE_CASE with a consistent VERB_NOUN pattern: LIST for collections, GET for single items, and CREATE/CANCEL for lifecycle actions. There is no mixing of camelCase or inconsistent verb styles.

Tool Count4/5

At 19 tools, the server is slightly above the typical 3-15 tool sweet spot, but the count is justified by the breadth of exchange functionality: market data, orders, deposits, deposit addresses, and withdrawals. Each tool appears useful and non-redundant.

Completeness4/5

Core workflows are well covered: market reads, order lifecycle, deposit lifecycle, withdrawal lifecycle, and address management. Minor gaps include no market listing or candlestick/historical data endpoint and no withdrawal-chance check, but these are workable gaps rather than critical dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues