meritz-codegen
OfficialThis server generates Python code for calling the Meritz Securities Open API (109 REST + 14 realtime endpoints) — it never calls the API itself, so no app key is needed.
List categories —
list_categories()returns the API categories and how many APIs each contains.Search APIs in natural language —
search_api(keyword, category)finds APIs from Korean phrases like "삼성전자 현재가" or "실시간 체결통보", optionally narrowed by category (account, domestic_market, overseas_market, trading, forex, reference, realtime, oauth2).Inspect API details —
get_api_detail(api_type)shows path, parameters, response fields, and caveats for a given API.Generate call code —
generate_code(api_type)produces Python code: REST with token issuance/reuse and response validation (not just HTTP 200), realtime WebSocket subscription code, and token-only code whenapi_type='token'.Built-in safety — order and FX code won't send until
confirm=Trueis passed, and raisesMeritzWarningwhendata.warn_cls_codeindicates the order wasn't accepted.Conventions reference —
api_conventions()returns auth procedure, calling conventions, response codes, and known issues; ameritz_code_promptprompt guides search-to-code workflow.Local & zero-config — runs as a single executable on your own machine with no Python/uv install and no app key.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meritz-codegen Generate Python code to get real-time stock price for Samsung Electronics."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
메리츠증권 Open API 코드 생성 MCP
메리츠증권 Open API를 호출하는 파이썬 코드를 만들어 주는 MCP 서버입니다. API를 직접 호출하지 않으므로 앱키가 필요 없습니다. 내 PC에서 도는 로컬 서버이고, 단일 실행 파일이라 Python이나 uv를 따로 설치하지 않으셔도 됩니다.
REST 109건과 실시간 14건 전부를 다룹니다. 카탈로그는 개발자 포털 등록 명세에서 만듭니다.
설치
파일은 릴리스 페이지에서 받으십시오. 쓰시는 것 하나만 받으시면 됩니다. 앱키를 넣는 자리는 없습니다.
쓰시는 도구 | 방법 |
Claude Desktop | OS에 맞는 |
아무 도구나 — 자동 설치 |
|
Claude Code |
|
Codex CLI · ChatGPT 데스크톱 |
|
Gemini CLI |
|
Cursor · VS Code | 각 앱의 MCP 설정 파일에 JSON 을 넣습니다 — |
실행 파일은 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 써?도구
도구 | 하는 일 |
| 분류와 API 개수 |
| 자연어 검색. 한글 표현도 알아듣습니다 |
| 경로·파라미터·응답 필드·주의사항 |
| 호출 코드 (REST·실시간) |
| 인증·호출 규약·응답 코드 |
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 — |
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가 세 플랫폼을 빌드해 올립니다.
사용 전 확인해 주세요
생성된 코드는 운영 서버를 향합니다. 실행하시면 실계좌에 영향을 줍니다
주문 코드의 확인 단계를 지우시면 확인 없이 전송됩니다. 남겨 두시길 권합니다
라이선스
MIT — LICENSE
실행 파일에 함께 들어가는 오픈소스의 라이선스 전문은 THIRD-PARTY-NOTICES.txt 에 있습니다.
문의는 개발자 포털을 이용해 주세요.
Available Tools
5 toolsapi_conventionsARead-onlyIdempotent
인증 절차·호출 규약·응답 코드·알려진 문제를 반환합니다.
Inputs: no named parameters. Returns: object
generate_codeARead-onlyIdempotent
api_type 을 호출하는 Python 코드를 만듭니다. REST 는 토큰 발급·요청·응답 판정까지, 실시간은 웹소켓 구독 코드를 만듭니다. 주문·환전은 confirm=True 전까지 전송하지 않는 안전장치가 들어갑니다. api_type='token' 이면 토큰 발급 코드만 만듭니다.
Inputs: api_type (required). Returns: object
get_api_detailARead-onlyIdempotent
api_type 의 상세를 반환합니다 — 경로·파라미터·응답 필드·주의사항.
Inputs: api_type (required). Returns: object
list_categoriesBRead-onlyIdempotent
분류와 API 개수를 반환합니다.
Inputs: no named parameters. Returns: object
search_apiARead-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
Scored across 5 tools
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.
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.
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.
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
Related MCP Connectors
Powerful OpenDART API-based Korean corporate disclosure tools for accounting professionals
API discovery and x402 paid execution via MCP. Search by natural-language, call with USDC payment on Arbitrum, Base, BNB, Solana, SEI
Korea-native MCP gateway: Korean commerce, payments, messaging, gov & finance APIs for AI agents.
Pay-per-call APIs for trading agents: market data, indicators, insider trades, on-chain tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.11Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides 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.-
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered analysis of Korean stock market data and corporate disclosures using official DART and KRX APIs.ISC
- FlicenseNot gradedqualityDmaintenanceEnables 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-