daol-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. daol_mcp-0.1.0/.gitignore +41 -0
  2. daol_mcp-0.1.0/LICENSE +202 -0
  3. daol_mcp-0.1.0/PKG-INFO +106 -0
  4. daol_mcp-0.1.0/README.md +80 -0
  5. daol_mcp-0.1.0/pyproject.toml +56 -0
  6. daol_mcp-0.1.0/src/daol_local_mcp/__init__.py +3 -0
  7. daol_mcp-0.1.0/src/daol_local_mcp/__main__.py +6 -0
  8. daol_mcp-0.1.0/src/daol_local_mcp/api/__init__.py +6 -0
  9. daol_mcp-0.1.0/src/daol_local_mcp/api/client.py +332 -0
  10. daol_mcp-0.1.0/src/daol_local_mcp/api/models.py +38 -0
  11. daol_mcp-0.1.0/src/daol_local_mcp/api/token.py +96 -0
  12. daol_mcp-0.1.0/src/daol_local_mcp/cli.py +400 -0
  13. daol_mcp-0.1.0/src/daol_local_mcp/config.py +80 -0
  14. daol_mcp-0.1.0/src/daol_local_mcp/context.py +59 -0
  15. daol_mcp-0.1.0/src/daol_local_mcp/hostconfig.py +284 -0
  16. daol_mcp-0.1.0/src/daol_local_mcp/ordersafety.py +72 -0
  17. daol_mcp-0.1.0/src/daol_local_mcp/py.typed +0 -0
  18. daol_mcp-0.1.0/src/daol_local_mcp/secrets.py +72 -0
  19. daol_mcp-0.1.0/src/daol_local_mcp/server.py +69 -0
  20. daol_mcp-0.1.0/src/daol_local_mcp/tools/__init__.py +17 -0
  21. daol_mcp-0.1.0/src/daol_local_mcp/tools/accounts.py +26 -0
  22. daol_mcp-0.1.0/src/daol_local_mcp/tools/orders.py +223 -0
  23. daol_mcp-0.1.0/src/daol_local_mcp/tools/quotes.py +29 -0
  24. daol_mcp-0.1.0/src/daol_local_mcp/ui.py +151 -0
  25. daol_mcp-0.1.0/tests/test_client_guards.py +22 -0
  26. daol_mcp-0.1.0/tests/test_context_call.py +69 -0
  27. daol_mcp-0.1.0/tests/test_dev_no_auth.py +73 -0
  28. daol_mcp-0.1.0/tests/test_hostconfig.py +106 -0
  29. daol_mcp-0.1.0/tests/test_installer.py +95 -0
  30. daol_mcp-0.1.0/tests/test_oauth_compat.py +80 -0
  31. daol_mcp-0.1.0/tests/test_ordersafety.py +65 -0
  32. daol_mcp-0.1.0/tests/test_retry.py +74 -0
  33. daol_mcp-0.1.0/tests/test_update_notice.py +103 -0
@@ -0,0 +1,41 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ dist/
6
+ build/
7
+ *.egg-info/
8
+
9
+ # 테스트/도구
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .mypy_cache/
13
+
14
+ # 민감/로컬 상태 — 절대 커밋 금지
15
+ # (gitignore 는 인라인 주석을 지원하지 않으므로 설명은 패턴과 별도 줄에 둔다)
16
+ *.bak
17
+ .env
18
+ .env.*
19
+ # 브릿지 비밀값(세션토큰·내부 IP·usrId) — 코드는 추적해도 이건 제외
20
+ dev/internal/.env
21
+ state.json
22
+ # Cloudflare 캐시(계정 ID·이메일 포함) — 어떤 경로든 제외
23
+ .wrangler/
24
+ # 내부 제출 문서(담당자 실명 등) — 공개 리포 반입 금지
25
+ *.docx
26
+
27
+ # 내부 브릿지: 코드·문서는 추적(개인 비공개 레포 전제), 비밀값(.env)·캐시는 위에서 제외
28
+ # ⚠ 이 레포를 공개로 전환하려면 dev/internal/ 전체를 다시 ignore 하고 history 를 정리할 것
29
+
30
+ # 로컬 도구 설정
31
+ .claude/
32
+
33
+ # macOS
34
+ .DS_Store
35
+ dev/internal/live_api_calls.log
36
+
37
+ # 시간별 오류 프로파일러 런타임 산출물
38
+ dev/internal/probe_metrics.jsonl
39
+ dev/internal/probe_report.csv
40
+ dev/internal/probe_cron.out
41
+ dev/internal/probe_cron.err
daol_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: daol-mcp
3
+ Version: 0.1.0
4
+ Summary: 다올투자증권 Local MCP 서버 — AI 도구에서 본인 계좌를 안전하게 조회·주문
5
+ Project-URL: Homepage, https://mcp.daolfn.com
6
+ Project-URL: Repository, https://github.com/daol-securities/daol-mcp
7
+ Project-URL: Issues, https://github.com/daol-securities/daol-mcp/issues
8
+ Author: DAOL Investment & Securities
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: ai,claude,daol,mcp,stock,trading
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Financial and Insurance Industry
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Office/Business :: Financial :: Investment
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: fastmcp==3.4.4
20
+ Requires-Dist: httpx==0.28.1
21
+ Requires-Dist: keyring==25.7.0
22
+ Requires-Dist: pydantic==2.13.4
23
+ Requires-Dist: secretstorage==3.5.0; sys_platform == 'linux'
24
+ Requires-Dist: typer==0.26.8
25
+ Description-Content-Type: text/markdown
26
+
27
+ # 다올투자증권 MCP
28
+
29
+ 다올투자증권 계좌를 MCP 호환 **AI 도구에서 본인 키로 직접**
30
+ 조회·주문할 수 있게 해 주는 로컬 MCP 서버입니다.
31
+
32
+ > AI와 증권 계좌를 한 줄로 연결하다. [mcp.daolfn.com](https://mcp.daolfn.com)
33
+
34
+ ## 지원 기능
35
+
36
+ AI에게 자연어로 요청하면 아래를 대신 수행합니다. 주문류는 **미리보기 → 확인 → 실행**
37
+ 순서로만 움직여, 예상 체결금액·수수료·위험 안내를 먼저 보여 주고 확인한 주문만 전송합니다.
38
+
39
+ **조회 도구**
40
+ - **계좌·잔고**: 예수금·평가금액·총자산·평가손익, 보유 종목(마스킹된 계좌번호)
41
+ - **시세**: 종목 현재가·등락률·거래량·호가
42
+ - **주문 내역**: 체결·미체결 주문 목록과 개별 주문 상세
43
+
44
+ **주문 도구** (미리보기 → 확인 후 실행)
45
+ - **매수·매도**: 지정가·시장가 주문
46
+ - **정정·취소**: 미체결 주문 정정·취소
47
+
48
+ 현재는 **국내주식을 우선 지원**하며, **해외주식은 지원 예정**입니다.
49
+
50
+ ## 설치
51
+
52
+ 먼저 다올투자증권 **Fi 앱 → 고객 서비스 → MCP 이용 신청**에서
53
+ **App Key / App Secret** 을 발급받으세요.
54
+
55
+ **macOS / Linux**
56
+ ```bash
57
+ curl -fsSL https://mcp.daolfn.com/install.sh | sh
58
+ ```
59
+
60
+ **Windows (PowerShell)**
61
+ ```powershell
62
+ irm https://mcp.daolfn.com/install.ps1 | iex
63
+ ```
64
+
65
+ 설치가 끝나면 **설치 도우미**가 떠서 App Key / App Secret 을 입력받습니다.
66
+ 이어서 연결할 AI 도구를 고르면 등록까지 끝나고, 해당 앱을 재시작하면 바로 사용할 수 있습니다.
67
+
68
+
69
+ ### 지원 환경
70
+
71
+ - **macOS**: Intel·Apple Silicon의 일반 사용자 터미널
72
+ - **Windows 10/11**: Windows PowerShell 또는 PowerShell 7의 일반 사용자 세션
73
+ - **Linux**: GNOME Keyring·KWallet 등 Secret Service와 사용자 D-Bus 세션이 실행 중인 데스크톱
74
+
75
+ WSL 안에 설치한 MCP는 Windows용 Claude Desktop/Cursor 설정과 자동으로 공유되지 않습니다.
76
+ Windows GUI 앱에서 사용할 때는 WSL이 아니라 Windows PowerShell에서 설치하세요. 헤드리스 Linux는
77
+ 키체인을 별도로 구성해야 하므로 1차 일반 사용자 지원 대상이 아닙니다.
78
+
79
+ AI 도구를 찾지 못했다는 안내가 나오면 Claude Desktop/Cursor 등을 한 번 실행해 설정 디렉터리를
80
+ 만든 뒤 `daol-mcp setup`을 다시 실행하세요.
81
+
82
+ ## 명령어
83
+
84
+ | 명령 | 설명 |
85
+ |---|---|
86
+ | `daol-mcp setup` | 설치 도우미(키 입력·검증·AI 도구 등록) 재실행 |
87
+ | `daol-mcp doctor` | 설치/연결 상태 점검 |
88
+ | `daol-mcp accounts` | 부여된 권한·계좌 확인 |
89
+ | `daol-mcp serve` | MCP 서버 실행 (보통 AI 도구가 자동 실행) |
90
+ | `daol-mcp update` | 최신 공개 버전으로 업데이트 |
91
+ | `daol-mcp logout` | 키체인 비밀값 삭제 + 토큰 폐기 + 등록 제거 |
92
+
93
+ ## 보안
94
+
95
+ - **비밀값은 OS 키체인에만.** 평문 파일·로그·AI 도구 설정에 App Secret 을 저장하지 않습니다.
96
+ - **모든 서버 통신은 HTTPS 강제.**
97
+ - **MCP 서버는 로컬 stdio 로만 동작**: 네트워크 포트를 열지 않습니다.
98
+ - 설치 시 검증된 공개 릴리스 버전을 정확히 지정해 설치합니다.
99
+
100
+ ## 제거
101
+
102
+ 완전히 제거하려면 먼저 `daol-mcp logout`을 실행한 다음 아래 명령을 실행하세요.
103
+
104
+ ```bash
105
+ uv tool uninstall daol-mcp
106
+ ```
@@ -0,0 +1,80 @@
1
+ # 다올투자증권 MCP
2
+
3
+ 다올투자증권 계좌를 MCP 호환 **AI 도구에서 본인 키로 직접**
4
+ 조회·주문할 수 있게 해 주는 로컬 MCP 서버입니다.
5
+
6
+ > AI와 증권 계좌를 한 줄로 연결하다. [mcp.daolfn.com](https://mcp.daolfn.com)
7
+
8
+ ## 지원 기능
9
+
10
+ AI에게 자연어로 요청하면 아래를 대신 수행합니다. 주문류는 **미리보기 → 확인 → 실행**
11
+ 순서로만 움직여, 예상 체결금액·수수료·위험 안내를 먼저 보여 주고 확인한 주문만 전송합니다.
12
+
13
+ **조회 도구**
14
+ - **계좌·잔고**: 예수금·평가금액·총자산·평가손익, 보유 종목(마스킹된 계좌번호)
15
+ - **시세**: 종목 현재가·등락률·거래량·호가
16
+ - **주문 내역**: 체결·미체결 주문 목록과 개별 주문 상세
17
+
18
+ **주문 도구** (미리보기 → 확인 후 실행)
19
+ - **매수·매도**: 지정가·시장가 주문
20
+ - **정정·취소**: 미체결 주문 정정·취소
21
+
22
+ 현재는 **국내주식을 우선 지원**하며, **해외주식은 지원 예정**입니다.
23
+
24
+ ## 설치
25
+
26
+ 먼저 다올투자증권 **Fi 앱 → 고객 서비스 → MCP 이용 신청**에서
27
+ **App Key / App Secret** 을 발급받으세요.
28
+
29
+ **macOS / Linux**
30
+ ```bash
31
+ curl -fsSL https://mcp.daolfn.com/install.sh | sh
32
+ ```
33
+
34
+ **Windows (PowerShell)**
35
+ ```powershell
36
+ irm https://mcp.daolfn.com/install.ps1 | iex
37
+ ```
38
+
39
+ 설치가 끝나면 **설치 도우미**가 떠서 App Key / App Secret 을 입력받습니다.
40
+ 이어서 연결할 AI 도구를 고르면 등록까지 끝나고, 해당 앱을 재시작하면 바로 사용할 수 있습니다.
41
+
42
+
43
+ ### 지원 환경
44
+
45
+ - **macOS**: Intel·Apple Silicon의 일반 사용자 터미널
46
+ - **Windows 10/11**: Windows PowerShell 또는 PowerShell 7의 일반 사용자 세션
47
+ - **Linux**: GNOME Keyring·KWallet 등 Secret Service와 사용자 D-Bus 세션이 실행 중인 데스크톱
48
+
49
+ WSL 안에 설치한 MCP는 Windows용 Claude Desktop/Cursor 설정과 자동으로 공유되지 않습니다.
50
+ Windows GUI 앱에서 사용할 때는 WSL이 아니라 Windows PowerShell에서 설치하세요. 헤드리스 Linux는
51
+ 키체인을 별도로 구성해야 하므로 1차 일반 사용자 지원 대상이 아닙니다.
52
+
53
+ AI 도구를 찾지 못했다는 안내가 나오면 Claude Desktop/Cursor 등을 한 번 실행해 설정 디렉터리를
54
+ 만든 뒤 `daol-mcp setup`을 다시 실행하세요.
55
+
56
+ ## 명령어
57
+
58
+ | 명령 | 설명 |
59
+ |---|---|
60
+ | `daol-mcp setup` | 설치 도우미(키 입력·검증·AI 도구 등록) 재실행 |
61
+ | `daol-mcp doctor` | 설치/연결 상태 점검 |
62
+ | `daol-mcp accounts` | 부여된 권한·계좌 확인 |
63
+ | `daol-mcp serve` | MCP 서버 실행 (보통 AI 도구가 자동 실행) |
64
+ | `daol-mcp update` | 최신 공개 버전으로 업데이트 |
65
+ | `daol-mcp logout` | 키체인 비밀값 삭제 + 토큰 폐기 + 등록 제거 |
66
+
67
+ ## 보안
68
+
69
+ - **비밀값은 OS 키체인에만.** 평문 파일·로그·AI 도구 설정에 App Secret 을 저장하지 않습니다.
70
+ - **모든 서버 통신은 HTTPS 강제.**
71
+ - **MCP 서버는 로컬 stdio 로만 동작**: 네트워크 포트를 열지 않습니다.
72
+ - 설치 시 검증된 공개 릴리스 버전을 정확히 지정해 설치합니다.
73
+
74
+ ## 제거
75
+
76
+ 완전히 제거하려면 먼저 `daol-mcp logout`을 실행한 다음 아래 명령을 실행하세요.
77
+
78
+ ```bash
79
+ uv tool uninstall daol-mcp
80
+ ```
@@ -0,0 +1,56 @@
1
+ [project]
2
+ name = "daol-mcp"
3
+ version = "0.1.0"
4
+ description = "다올투자증권 Local MCP 서버 — AI 도구에서 본인 계좌를 안전하게 조회·주문"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "DAOL Investment & Securities" }]
10
+ keywords = ["mcp", "daol", "trading", "stock", "ai", "claude"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Intended Audience :: Financial and Insurance Industry",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Topic :: Office/Business :: Financial :: Investment",
18
+ ]
19
+ dependencies = [
20
+ "fastmcp==3.4.4",
21
+ "httpx==0.28.1",
22
+ "pydantic==2.13.4",
23
+ "keyring==25.7.0",
24
+ "secretstorage==3.5.0; sys_platform == 'linux'",
25
+ "typer==0.26.8",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://mcp.daolfn.com"
30
+ Repository = "https://github.com/daol-securities/daol-mcp"
31
+ Issues = "https://github.com/daol-securities/daol-mcp/issues"
32
+
33
+ [project.scripts]
34
+ daol-mcp = "daol_local_mcp.cli:app"
35
+
36
+ [build-system]
37
+ requires = ["hatchling==1.31.0"]
38
+ build-backend = "hatchling.build"
39
+
40
+ [tool.hatch.build.targets.wheel]
41
+ packages = ["src/daol_local_mcp"]
42
+
43
+ # sdist 는 화이트리스트만 — 기본값(전체 워킹트리)이면 내부 문서·캐시가 딸려 들어간다
44
+ [tool.hatch.build.targets.sdist]
45
+ include = ["/src", "/tests", "/README.md", "/LICENSE"]
46
+ exclude = ["/tests/live"]
47
+
48
+ [dependency-groups]
49
+ dev = ["pytest>=8.0"]
50
+
51
+ [tool.pytest.ini_options]
52
+ pythonpath = ["src"]
53
+ testpaths = ["tests"]
54
+ markers = [
55
+ "adversarial: 위조 해시/미존재 preview/preview 재사용/멱등키 replay — 서버 결함(S-14/S-15) 경로로 실주문이 생길 수 있어 기본 러너에서 제외",
56
+ ]
@@ -0,0 +1,3 @@
1
+ """다올 Local MCP. 고객 PC에서 본인 키로 다올 OpenAPI를 호출하는 MCP 서버."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,6 @@
1
+ """`python -m daol_local_mcp` 진입점."""
2
+
3
+ from .cli import app
4
+
5
+ if __name__ == "__main__":
6
+ app()
@@ -0,0 +1,6 @@
1
+ """다올 OpenAPI 연동 계층."""
2
+
3
+ from .client import DaolApiError, DaolClient
4
+ from .token import DevTokenManager, TokenManager
5
+
6
+ __all__ = ["DaolApiError", "DaolClient", "DevTokenManager", "TokenManager"]