DART MCP — 금융감독원 전자공시(DART OpenAPI) 래핑 MCP 서버. 공시 검색·본문·재무제표 조회를 Claude에서 자연어로.
Project description
DART MCP Server
금융감독원 전자공시(DART) OpenAPI를 Claude에서 자연어로 조회할 수 있게 해주는 MCP 서버입니다.
"삼성전자 최근 분기보고서 요약해줘", "카카오 최근 1개월 공시 목록", "LG에너지솔루션 영업이익 추이"
자매 프로젝트 stocklens-mcp(네이버 증권 기반 시세·차트·수급)와 독립입니다. Claude가 두 MCP를 조합해 종목 분석을 수행합니다.
빠른 시작
pip install stocklens-dart-mcp
dartmcp-setup
dartmcp-setup은:
- DART API 키를 입력받아 유효성 검증한 뒤
- Claude Desktop의
claude_desktop_config.json에 자동 등록
API 키가 없다면 먼저 DART OpenAPI 발급 (무료, 분당 1,000건 / 일 20,000건).
설치 후 Claude Desktop을 완전히 종료했다가 다시 실행하세요.
키 보관 정책
dartmcp-setup은 DART API 키를 claude_desktop_config.json에 평문으로 박지 않습니다.
- 기본: 키를 OS 키체인에 저장
- Windows → Credential Manager (DPAPI · 사용자 계정 단위 자동 암호화)
- macOS → Keychain
- Linux → Secret Service (GNOME Keyring / KDE Wallet)
- config 파일에는
mcpServers.dart-mcp.command만 들어가고 키는 들어가지 않음 - 서버는 부팅 시
DART_API_KEY환경변수를 먼저 보고, 없으면 키체인에서 자동 조회
기존 v0.1.0에서 평문으로 박혀있던 키는 dartmcp-setup을 다시 실행하면 자동으로 키체인으로 이전되고 JSON에서 제거됩니다.
평문 모드 (헤드리스 환경 fallback)
OS 키체인을 쓸 수 없는 환경(서버, 일부 WSL/Docker)에서는 --plaintext로 명시적 옵트아웃:
dartmcp-setup --plaintext <KEY>
이 경우 기존처럼 env.DART_API_KEY가 JSON에 평문 저장됩니다.
도구
| 도구 | 목적 |
|---|---|
search_company |
종목명/종목코드 → corp_code + 기업개황 |
list_disclosures |
기간·유형별 공시 목록 (rcept_no 반환) |
get_disclosure_detail |
rcept_no → 본문 발췌 + DART viewer URL + 첨부 목록 |
get_major_accounts |
정기보고서 핵심 재무 (매출/영업이익/순이익/자산/부채/자본 — 당기·전기·전전기 비교) |
get_full_financial |
전체 재무제표. sj_div(BS/IS/CIS/CF/SCE) 필수 |
get_major_holders |
5%룰 대량보유 변동 — 외인/펀드/행동주의 진입 추적 |
get_insider_trades |
임원·주요주주 특정증권 소유 — 내부자 매매 시그널 |
권장 워크플로우
# 공시 흐름
search_company("삼성전자") → corp_code "00126380"
list_disclosures(corp_code="00126380", days=30) → rcept_no 목록
get_disclosure_detail(rcept_no="20240315001234") → 본문 발췌
# 재무 흐름
search_company("삼성전자") → corp_code
get_major_accounts(corp_code, bsns_year=2024, reprt_code="annual") → 핵심 수치
get_full_financial(corp_code, bsns_year=2024, reprt_code="annual",
fs_div="CFS", sj_div="IS") → 손익 전체
원칙
- DART OpenAPI만 사용합니다. 네이버·다음 등 스크래핑 일절 없음.
- 시세·차트·수급은 stocklens가, 공시·재무제표 정형 데이터는 dart-mcp가 담당.
- 두 서버는 서로 호출하지 않습니다. Claude가 조정자입니다.
- 투자 추천·매매 시그널을 만들지 않습니다. 데이터 제공만.
라이선스
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stocklens_dart_mcp-0.2.1.tar.gz.
File metadata
- Download URL: stocklens_dart_mcp-0.2.1.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd297c8b9afa2cdccb1b611d1b3bca14d13acc64fb6107064e4fd363ff1b74c
|
|
| MD5 |
329e3d03945c60f7f264dc93f012a7d5
|
|
| BLAKE2b-256 |
bb46c966b4a8d501268b423e86eeb5620363dc400e69748671248d4571cc0186
|
File details
Details for the file stocklens_dart_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: stocklens_dart_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1e01847ca9b786bcc66e880668fd6eb5205ff051c5a185a2bea1a3b936c4d4
|
|
| MD5 |
1eef682396a359f810695d8f6cb90643
|
|
| BLAKE2b-256 |
f4fc03178b14d935e994c2dd8789ef9e608979a219561f11bd8a7cc097f0182c
|