Skip to main content
Glama
DrFirstLee

KIMP MCP Server

by DrFirstLee

get_kimp

Calculate real-time Kimchi Premium (KIMP) for cryptocurrencies by comparing Korean exchange prices with international markets using Bithumb KRW prices and Naver exchange rates.

Instructions

김치 프리미엄(KIMP)을 계산합니다. Bithumb의 KRW 가격과 Naver 환율 정보를 사용하여 실시간 김프를 계산합니다. USDT, USDC 같은 스테이블코인의 김프를 확인할 수 있습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo암호화폐 심볼 (예: USDT, USDC, BTC, ETH)USDT

Implementation Reference

  • MCP tool handler for 'get_kimp': processes the request, calls calculateKimp, formats the kimchi premium result into a readable text response.
    case 'get_kimp': {
      const symbol = args?.symbol || 'USDT';
      result = await calculateKimp(symbol);
      
      // 결과를 읽기 쉽게 포맷
      let text = `📊 ${result.symbol} 김치 프리미엄 분석\n\n`;
      
      if (result.success) {
        text += `💰 Bithumb 가격: ${result.krwPrice.toLocaleString('ko-KR')} KRW\n`;
        text += `💱 현재 환율: ${result.exchangeRate.toLocaleString('ko-KR', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} KRW/USD\n`;
        text += `💵 달러 환산 가격: $${result.usdPrice.toFixed(4)}\n\n`;
        
        if (result.kimp !== null) {
          const kimpSign = result.kimp >= 0 ? '+' : '';
          text += `🔥 김치 프리미엄: ${kimpSign}${result.kimp.toFixed(2)}%\n`;
          text += `📈 차익: ${kimpSign}$${result.kimchiPremium.toFixed(4)}\n`;
        } else {
          text += `ℹ️ ${result.symbol}의 정확한 김프 계산을 위해서는 해외 거래소 가격이 필요합니다.\n`;
        }
        
        text += `\n⏰ 조회 시간: ${new Date(result.timestamp).toLocaleString('ko-KR')}`;
      } else {
        text += `❌ 오류: ${result.error}`;
      }
      
      return {
        content: [
          {
            type: 'text',
            text: text,
          },
        ],
      };
    }
  • Input schema definition for the 'get_kimp' tool, specifying an optional 'symbol' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        symbol: {
          type: 'string',
          description: '암호화폐 심볼 (예: USDT, USDC, BTC, ETH)',
          default: 'USDT',
        },
      },
      required: [],
    },
  • index.js:130-146 (registration)
    Registration of the 'get_kimp' tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_kimp',
      description:
        '김치 프리미엄(KIMP)을 계산합니다. Bithumb의 KRW 가격과 Naver 환율 정보를 사용하여 실시간 김프를 계산합니다. USDT, USDC 같은 스테이블코인의 김프를 확인할 수 있습니다.',
      inputSchema: {
        type: 'object',
        properties: {
          symbol: {
            type: 'string',
            description: '암호화폐 심볼 (예: USDT, USDC, BTC, ETH)',
            default: 'USDT',
          },
        },
        required: [],
      },
    },
    {
  • Core helper function that fetches Bithumb price and exchange rate, calculates USD equivalent and kimchi premium for stablecoins.
    async function calculateKimp(symbol = 'USDT') {
      try {
        // 1. Bithumb에서 KRW 가격 조회
        const krwPrice = await bithumbPrice(symbol, 'KRW');
    
        // 2. 환율 조회
        const exchangeRate = await getExchangeRate();
    
        // 3. 달러 기준 가격 계산 (KRW 가격 / 환율)
        const usdPrice = krwPrice / exchangeRate;
    
        // 4. 김치 프리미엄 계산
        // USDT/USDC는 1달러 기준, 다른 코인은 해외 거래소 가격 필요
        let kimp, kimchiPremium;
        
        if (symbol.toUpperCase() === 'USDT' || symbol.toUpperCase() === 'USDC') {
          // 스테이블코인: 1달러 대비 프리미엄
          kimp = ((usdPrice - 1) / 1) * 100;
          kimchiPremium = usdPrice - 1;
        } else {
          // 다른 코인: 해외 가격 정보 없이 환율 기준만 표시
          kimp = null;
          kimchiPremium = null;
        }
    
        return {
          success: true,
          symbol: symbol.toUpperCase(),
          krwPrice: krwPrice,
          exchangeRate: exchangeRate,
          usdPrice: usdPrice,
          kimp: kimp,
          kimchiPremium: kimchiPremium,
          timestamp: new Date().toISOString(),
        };
      } catch (error) {
        return {
          success: false,
          error: error.message,
          timestamp: new Date().toISOString(),
        };
      }
    }
  • Helper function to fetch cryptocurrency closing price from Bithumb API.
    async function bithumbPrice(symbol = 'BTC', fiat = 'KRW') {
      const pair = `${symbol.toUpperCase()}_${fiat.toUpperCase()}`;
      const url = `https://api.bithumb.com/public/ticker/${pair}`;
    
      try {
        const response = await axios.get(url, { timeout: 5000 });
        const data = response.data;
    
        if (data.status !== '0000') {
          throw new Error(`Bithumb error: ${JSON.stringify(data)}`);
        }
    
        const price = data.data.closing_price;
        return parseFloat(price);
      } catch (error) {
        throw new Error(`Bithumb API 오류: ${error.message}`);
      }
    }
  • Helper function to fetch current USD/KRW exchange rate from Naver API.
    async function getExchangeRate() {
      const url =
        'https://m.search.naver.com/p/csearch/content/qapirender.nhn?key=calculator&pkid=141&q=%ED%99%98%EC%9C%A8&where=m&u1=keb&u6=standardUnit&u7=0&u3=USD&u4=KRW&u8=down&u2=1';
    
      try {
        const response = await axios.get(url, { timeout: 5000 });
        const data = response.data;
    
        // 환율 값 추출 (콤마 제거)
        const krwValue = parseFloat(data.country[1].value.replace(/,/g, ''));
        return krwValue;
      } catch (error) {
        throw new Error(`환율 API 오류: ${error.message}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions real-time calculation ('실시간 김프를 계산합니다') but lacks details on rate limits, error handling, authentication needs, or what the output format looks like. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three concise sentences. It's front-loaded with the core purpose, followed by implementation details and usage examples. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (calculating KIMP using multiple data sources), no annotations, and no output schema, the description is somewhat complete but lacks details on output format, error conditions, and behavioral constraints. It covers the what and how but not the full operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single parameter 'symbol' with examples. The description adds value by clarifying that the tool works with stablecoins like USDT and USDC, which helps interpret the parameter's purpose beyond the schema's basic description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('계산합니다', '확인할 수 있습니다') and resources ('김치 프리미엄(KIMP)', 'Bithumb의 KRW 가격', 'Naver 환율 정보', 'USDT, USDC 같은 스테이블코인'). It distinguishes from sibling tools by focusing on KIMP calculation rather than general price or exchange rate retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning specific data sources (Bithumb, Naver) and cryptocurrency types (stablecoins like USDT, USDC). However, it doesn't explicitly state when to use this tool versus alternatives like get_crypto_price or get_exchange_rate, nor does it provide exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/DrFirstLee/kimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server