Skip to main content
Glama
meritz-codegen

meritz-codegen

Official

메리츠증권 Open API 코드 생성 MCP

개발자 포털 · API 신청 · API 문서 · 문의

test release python license

메리츠증권 Open API를 호출하는 파이썬 코드를 만들어 주는 MCP 서버입니다. API를 직접 호출하지 않으므로 앱키가 필요 없습니다. 내 PC에서 도는 로컬 서버이고, 단일 실행 파일이라 Python이나 uv를 따로 설치하지 않으셔도 됩니다.

REST 109건과 실시간 14건 전부를 다룹니다. 카탈로그는 개발자 포털 등록 명세에서 만듭니다.

설치

파일은 릴리스 페이지에서 받으십시오. 쓰시는 것 하나만 받으시면 됩니다. 앱키를 넣는 자리는 없습니다.

쓰시는 도구

방법

Claude Desktop

OS에 맞는 .mcpb 파일을 내려받아 더블클릭 — Mac Apple 칩 · Mac Intel · Windows

아무 도구나 — 자동 설치

git clone 후 python3 install.py(Mac) · python install.py(Windows) — 실행 파일을 내려받고 등록 명령까지 만들어 줍니다

Claude Code

claude mcp add meritz-codegen -- <실행 파일 경로>

Codex CLI · ChatGPT 데스크톱

codex mcp add meritz-codegen -- <실행 파일 경로>

Gemini CLI

gemini mcp add meritz-codegen <실행 파일 경로>

Cursor · VS Code

각 앱의 MCP 설정 파일에 JSON 을 넣습니다 — docs/install.md

실행 파일은 meritz-codegen-mcp-darwin-arm64 · meritz-codegen-mcp-darwin-x64 · meritz-codegen-mcp-win32-x64.exe 입니다.

Mac에서 직접 내려받으셨다면 실행 권한과 격리 속성 해제가 필요합니다.

chmod +x ~/Downloads/meritz-codegen-mcp-darwin-arm64
xattr -d com.apple.quarantine ~/Downloads/meritz-codegen-mcp-darwin-arm64

격리 속성이 남아 있으면 서버가 아무 메시지 없이 종료되어 도구 목록에 나타나지 않습니다. Windows 는 .exe 를 받아 둔 전체 경로(예 C:\Users\hong\meritz\meritz-codegen-mcp.exe)를 <실행 파일 경로> 자리에 넣으시면 됩니다. 첫 실행의 SmartScreen 경고는 코드서명이 없어 뜨는 것입니다. OS 보안 경고, 체크섬 대조, 기동 대기 시간, Claude 웹·ChatGPT 웹용 터널 연결은 docs/install.md에 있습니다.

Related MCP server: Kiwoom API MCP Server

써 보기

설치하고 클라이언트를 다시 시작하면 도구 다섯 개가 뜹니다. 그대로 물어보시면 됩니다.

삼성전자 현재가 조회하는 파이썬 코드 만들어 줘
해외 주문 취소는 어떤 API 써?

도구

도구

하는 일

list_categories()

분류와 API 개수

search_api(keyword, category)

자연어 검색. 한글 표현도 알아듣습니다

get_api_detail(api_type)

경로·파라미터·응답 필드·주의사항

generate_code(api_type)

호출 코드 (REST·실시간)

api_conventions()

인증·호출 규약·응답 코드

meritz_code_prompt(task) 프롬프트도 함께 제공합니다. 검색부터 코드 생성까지의 순서를 안내합니다.

어떤 코드를 만드는지

  • 토큰 발급·재사용, 요청, 응답 판정까지 들어갑니다. HTTP 200만 보고 넘기지 않습니다

  • 연속 조회로 다음 페이지를 받는 방법을 주석으로 적어 줍니다

  • 실시간은 웹소켓 구독 코드를 만듭니다. 접속점은 하나이고 tr_cd가 무엇을 받을지 정합니다

  • 주문·환전 코드는 confirm=True를 넘기기 전까지 전송하지 않는 형태로 만듭니다

  • 주문 코드에는 경고 확인 흐름이 들어갑니다. 응답이 성공이어도 data.warn_cls_code가 0이 아니면 접수되지 않은 상태이므로, 생성된 코드가 MeritzWarning을 던집니다

응답 판정 규칙과 오류 코드 해석은 llms.txt에, 코드표는 open-api 저장소의 docs/errors.md에 있습니다.

저장소가 네 개입니다

하고 싶으신 일

여기로

호출 코드를 받아 쓰기

이 저장소

파이썬으로 직접 호출해 보기

open-api — 실행 예제

터미널에서 조회·주문하기

open-api-studio — meritz CLI

AI 클라이언트에 붙이기

open-api-mcp — MCP 서버

개발

uv sync
uv run pytest tests/ -q

./build_binary.sh                    # bin/meritz-codegen-mcp — PyInstaller 단일 실행 파일
python3 make_bundle.py darwin-arm64  # dist/meritz-open-api-codegen-darwin-arm64.mcpb

릴리스는 태그를 밀면 GitHub Actions가 세 플랫폼을 빌드해 올립니다.

사용 전 확인해 주세요

  • 생성된 코드는 운영 서버를 향합니다. 실행하시면 실계좌에 영향을 줍니다

  • 주문 코드의 확인 단계를 지우시면 확인 없이 전송됩니다. 남겨 두시길 권합니다

  • DISCLAIMER.md · CONTRIBUTING.md · SECURITY.md

라이선스

MIT — LICENSE

실행 파일에 함께 들어가는 오픈소스의 라이선스 전문은 THIRD-PARTY-NOTICES.txt 에 있습니다.

문의는 개발자 포털을 이용해 주세요.

Available Tools

5 tools
api_conventionsA
Read-onlyIdempotent

인증 절차·호출 규약·응답 코드·알려진 문제를 반환합니다.

Inputs: no named parameters. Returns: object

generate_codeA
Read-onlyIdempotent

api_type 을 호출하는 Python 코드를 만듭니다. REST 는 토큰 발급·요청·응답 판정까지, 실시간은 웹소켓 구독 코드를 만듭니다. 주문·환전은 confirm=True 전까지 전송하지 않는 안전장치가 들어갑니다. api_type='token' 이면 토큰 발급 코드만 만듭니다.

Inputs: api_type (required). Returns: object

get_api_detailA
Read-onlyIdempotent

api_type 의 상세를 반환합니다 — 경로·파라미터·응답 필드·주의사항.

Inputs: api_type (required). Returns: object

list_categoriesB
Read-onlyIdempotent

분류와 API 개수를 반환합니다.

Inputs: no named parameters. Returns: object

search_apiA
Read-onlyIdempotent

자연어로 API 를 찾습니다. 예: search_api('삼성전자 현재가'), search_api('매수'), search_api('실시간 체결통보'). category 로 좁힐 수 있습니다 (account·domestic_market·overseas_market·trading·forex·reference·realtime·oauth2). 인증(접근토큰 발급·폐기)은 '토큰'·'인증'·'oauth'·'revoke' 로 찾습니다.

Inputs: keyword (required), category. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct role: search_api discovers APIs via natural language, get_api_detail provides specific API details, api_conventions offers general conventions, generate_code produces code, and list_categories gives a categorical overview. No overlapping purposes.

    Naming Consistency4/5

    Four tools follow the verb_noun pattern (search_api, get_api_detail, generate_code, list_categories), but api_conventions deviates by being a noun phrase. The snake_case style is consistent, and the deviation is minor.

    Tool Count5/5

    With 5 tools, the server is well-scoped for its code generation purpose. Each tool contributes to the discovery-to-code pipeline without redundancy or bloat.

    Completeness5/5

    The tool surface covers the full workflow: finding APIs, inspecting details, understanding conventions, generating code, and exploring categories. No obvious gaps for the intended code generation functionality.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables exploration and interaction with South Korea's Public Data Portal (OpenAPI) through keyword search, standard documentation retrieval, and direct API endpoint calls with automatic service key injection.
      11
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides tools to search and retrieve detailed documentation for the Kiwoom REST API, including parameters, categories, and code examples. It enables LLMs to generate request snippets in multiple programming languages to facilitate financial trading API integration.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-powered analysis of Korean stock market data and corporate disclosures using official DART and KRX APIs.
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables users to search for Korea Investment & Securities APIs using natural language queries, returning structured responses with API details such as function name, API name, and category.
      21
      -