sootool 0.1.1__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 (193) hide show
  1. sootool-0.1.1/LICENSE +21 -0
  2. sootool-0.1.1/PKG-INFO +238 -0
  3. sootool-0.1.1/README.md +178 -0
  4. sootool-0.1.1/pyproject.toml +105 -0
  5. sootool-0.1.1/src/sootool/__init__.py +11 -0
  6. sootool-0.1.1/src/sootool/__main__.py +245 -0
  7. sootool-0.1.1/src/sootool/core/__init__.py +0 -0
  8. sootool-0.1.1/src/sootool/core/audit.py +42 -0
  9. sootool-0.1.1/src/sootool/core/batch.py +129 -0
  10. sootool-0.1.1/src/sootool/core/calc.py +748 -0
  11. sootool-0.1.1/src/sootool/core/cast.py +99 -0
  12. sootool-0.1.1/src/sootool/core/decimal_ops.py +44 -0
  13. sootool-0.1.1/src/sootool/core/determinism.py +63 -0
  14. sootool-0.1.1/src/sootool/core/errors.py +68 -0
  15. sootool-0.1.1/src/sootool/core/locale_kr.py +157 -0
  16. sootool-0.1.1/src/sootool/core/pipeline.py +295 -0
  17. sootool-0.1.1/src/sootool/core/registry.py +86 -0
  18. sootool-0.1.1/src/sootool/core/rounding.py +38 -0
  19. sootool-0.1.1/src/sootool/core/types.py +47 -0
  20. sootool-0.1.1/src/sootool/core/units.py +32 -0
  21. sootool-0.1.1/src/sootool/middleware/__init__.py +5 -0
  22. sootool-0.1.1/src/sootool/middleware/auth.py +55 -0
  23. sootool-0.1.1/src/sootool/middleware/cors.py +23 -0
  24. sootool-0.1.1/src/sootool/middleware/locale.py +62 -0
  25. sootool-0.1.1/src/sootool/middleware/logging.py +56 -0
  26. sootool-0.1.1/src/sootool/middleware/request_id.py +25 -0
  27. sootool-0.1.1/src/sootool/modules/__init__.py +0 -0
  28. sootool-0.1.1/src/sootool/modules/accounting/README.md +37 -0
  29. sootool-0.1.1/src/sootool/modules/accounting/__init__.py +25 -0
  30. sootool-0.1.1/src/sootool/modules/accounting/bookkeeping.py +52 -0
  31. sootool-0.1.1/src/sootool/modules/accounting/cashflow.py +99 -0
  32. sootool-0.1.1/src/sootool/modules/accounting/depreciation.py +277 -0
  33. sootool-0.1.1/src/sootool/modules/accounting/dupont.py +151 -0
  34. sootool-0.1.1/src/sootool/modules/accounting/income_statement.py +100 -0
  35. sootool-0.1.1/src/sootool/modules/accounting/ratios.py +110 -0
  36. sootool-0.1.1/src/sootool/modules/accounting/vat.py +137 -0
  37. sootool-0.1.1/src/sootool/modules/crypto/README.md +59 -0
  38. sootool-0.1.1/src/sootool/modules/crypto/__init__.py +9 -0
  39. sootool-0.1.1/src/sootool/modules/crypto/advanced.py +255 -0
  40. sootool-0.1.1/src/sootool/modules/crypto/arithmetic.py +167 -0
  41. sootool-0.1.1/src/sootool/modules/crypto/hash_ops.py +56 -0
  42. sootool-0.1.1/src/sootool/modules/crypto/primes.py +125 -0
  43. sootool-0.1.1/src/sootool/modules/datetime_/README.md +42 -0
  44. sootool-0.1.1/src/sootool/modules/datetime_/__init__.py +16 -0
  45. sootool-0.1.1/src/sootool/modules/datetime_/age.py +136 -0
  46. sootool-0.1.1/src/sootool/modules/datetime_/business_days.py +145 -0
  47. sootool-0.1.1/src/sootool/modules/datetime_/day_count.py +138 -0
  48. sootool-0.1.1/src/sootool/modules/datetime_/fiscal.py +264 -0
  49. sootool-0.1.1/src/sootool/modules/datetime_/lunar.py +440 -0
  50. sootool-0.1.1/src/sootool/modules/datetime_/timezone_ops.py +83 -0
  51. sootool-0.1.1/src/sootool/modules/engineering/README.md +93 -0
  52. sootool-0.1.1/src/sootool/modules/engineering/__init__.py +91 -0
  53. sootool-0.1.1/src/sootool/modules/engineering/control.py +325 -0
  54. sootool-0.1.1/src/sootool/modules/engineering/electrical.py +316 -0
  55. sootool-0.1.1/src/sootool/modules/engineering/electrical_ac.py +830 -0
  56. sootool-0.1.1/src/sootool/modules/engineering/equivalent_circuit.py +143 -0
  57. sootool-0.1.1/src/sootool/modules/engineering/fluid.py +555 -0
  58. sootool-0.1.1/src/sootool/modules/engineering/gear_bearing.py +230 -0
  59. sootool-0.1.1/src/sootool/modules/engineering/materials.py +264 -0
  60. sootool-0.1.1/src/sootool/modules/engineering/mechanical.py +313 -0
  61. sootool-0.1.1/src/sootool/modules/engineering/reliability.py +234 -0
  62. sootool-0.1.1/src/sootool/modules/engineering/si_prefix.py +106 -0
  63. sootool-0.1.1/src/sootool/modules/engineering/structural.py +398 -0
  64. sootool-0.1.1/src/sootool/modules/engineering/thermal.py +306 -0
  65. sootool-0.1.1/src/sootool/modules/finance/README.md +76 -0
  66. sootool-0.1.1/src/sootool/modules/finance/__init__.py +35 -0
  67. sootool-0.1.1/src/sootool/modules/finance/bond.py +261 -0
  68. sootool-0.1.1/src/sootool/modules/finance/derivatives.py +259 -0
  69. sootool-0.1.1/src/sootool/modules/finance/loan.py +214 -0
  70. sootool-0.1.1/src/sootool/modules/finance/metrics.py +274 -0
  71. sootool-0.1.1/src/sootool/modules/finance/option.py +191 -0
  72. sootool-0.1.1/src/sootool/modules/finance/risk.py +318 -0
  73. sootool-0.1.1/src/sootool/modules/finance/tvm.py +158 -0
  74. sootool-0.1.1/src/sootool/modules/geometry/README.md +69 -0
  75. sootool-0.1.1/src/sootool/modules/geometry/__init__.py +9 -0
  76. sootool-0.1.1/src/sootool/modules/geometry/area.py +183 -0
  77. sootool-0.1.1/src/sootool/modules/geometry/distance.py +102 -0
  78. sootool-0.1.1/src/sootool/modules/geometry/matrix_ops.py +233 -0
  79. sootool-0.1.1/src/sootool/modules/geometry/vector_ops.py +148 -0
  80. sootool-0.1.1/src/sootool/modules/geometry/volume.py +138 -0
  81. sootool-0.1.1/src/sootool/modules/math/__init__.py +22 -0
  82. sootool-0.1.1/src/sootool/modules/math/differentiation.py +116 -0
  83. sootool-0.1.1/src/sootool/modules/math/fft.py +123 -0
  84. sootool-0.1.1/src/sootool/modules/math/integration.py +147 -0
  85. sootool-0.1.1/src/sootool/modules/math/interpolation.py +144 -0
  86. sootool-0.1.1/src/sootool/modules/math/polynomial.py +114 -0
  87. sootool-0.1.1/src/sootool/modules/medical/README.md +84 -0
  88. sootool-0.1.1/src/sootool/modules/medical/__init__.py +16 -0
  89. sootool-0.1.1/src/sootool/modules/medical/body.py +172 -0
  90. sootool-0.1.1/src/sootool/modules/medical/dose.py +92 -0
  91. sootool-0.1.1/src/sootool/modules/medical/egfr.py +150 -0
  92. sootool-0.1.1/src/sootool/modules/medical/pregnancy.py +115 -0
  93. sootool-0.1.1/src/sootool/modules/medical/qt_correction.py +179 -0
  94. sootool-0.1.1/src/sootool/modules/medical/risk_scores.py +260 -0
  95. sootool-0.1.1/src/sootool/modules/payroll/__init__.py +9 -0
  96. sootool-0.1.1/src/sootool/modules/payroll/kr_salary.py +184 -0
  97. sootool-0.1.1/src/sootool/modules/pm/__init__.py +14 -0
  98. sootool-0.1.1/src/sootool/modules/pm/cpm.py +169 -0
  99. sootool-0.1.1/src/sootool/modules/pm/earned_schedule.py +150 -0
  100. sootool-0.1.1/src/sootool/modules/pm/evm.py +115 -0
  101. sootool-0.1.1/src/sootool/modules/pm/monte_carlo.py +153 -0
  102. sootool-0.1.1/src/sootool/modules/pm/pert.py +106 -0
  103. sootool-0.1.1/src/sootool/modules/probability/__init__.py +16 -0
  104. sootool-0.1.1/src/sootool/modules/probability/bayes.py +78 -0
  105. sootool-0.1.1/src/sootool/modules/probability/combinatorics.py +140 -0
  106. sootool-0.1.1/src/sootool/modules/probability/distributions.py +806 -0
  107. sootool-0.1.1/src/sootool/modules/probability/expected.py +91 -0
  108. sootool-0.1.1/src/sootool/modules/realestate/README.md +89 -0
  109. sootool-0.1.1/src/sootool/modules/realestate/__init__.py +23 -0
  110. sootool-0.1.1/src/sootool/modules/realestate/acquisition_tax.py +150 -0
  111. sootool-0.1.1/src/sootool/modules/realestate/kr_comprehensive.py +129 -0
  112. sootool-0.1.1/src/sootool/modules/realestate/kr_property_tax.py +106 -0
  113. sootool-0.1.1/src/sootool/modules/realestate/ratios.py +250 -0
  114. sootool-0.1.1/src/sootool/modules/realestate/rental_yield.py +105 -0
  115. sootool-0.1.1/src/sootool/modules/realestate/transfer_tax.py +63 -0
  116. sootool-0.1.1/src/sootool/modules/science/__init__.py +14 -0
  117. sootool-0.1.1/src/sootool/modules/science/chemistry.py +312 -0
  118. sootool-0.1.1/src/sootool/modules/science/electrochemistry.py +188 -0
  119. sootool-0.1.1/src/sootool/modules/science/optics.py +282 -0
  120. sootool-0.1.1/src/sootool/modules/science/periodic_table.py +53 -0
  121. sootool-0.1.1/src/sootool/modules/science/physics.py +102 -0
  122. sootool-0.1.1/src/sootool/modules/science/thermo.py +149 -0
  123. sootool-0.1.1/src/sootool/modules/stats/README.md +41 -0
  124. sootool-0.1.1/src/sootool/modules/stats/__init__.py +31 -0
  125. sootool-0.1.1/src/sootool/modules/stats/anova.py +129 -0
  126. sootool-0.1.1/src/sootool/modules/stats/bootstrap.py +114 -0
  127. sootool-0.1.1/src/sootool/modules/stats/ci.py +87 -0
  128. sootool-0.1.1/src/sootool/modules/stats/descriptive.py +85 -0
  129. sootool-0.1.1/src/sootool/modules/stats/effect_size.py +153 -0
  130. sootool-0.1.1/src/sootool/modules/stats/inference.py +283 -0
  131. sootool-0.1.1/src/sootool/modules/stats/nonparametric.py +180 -0
  132. sootool-0.1.1/src/sootool/modules/stats/regression.py +118 -0
  133. sootool-0.1.1/src/sootool/modules/tax/README.md +41 -0
  134. sootool-0.1.1/src/sootool/modules/tax/__init__.py +25 -0
  135. sootool-0.1.1/src/sootool/modules/tax/capital_gains.py +146 -0
  136. sootool-0.1.1/src/sootool/modules/tax/kr_corporate.py +137 -0
  137. sootool-0.1.1/src/sootool/modules/tax/kr_gift.py +118 -0
  138. sootool-0.1.1/src/sootool/modules/tax/kr_income.py +87 -0
  139. sootool-0.1.1/src/sootool/modules/tax/kr_inheritance.py +140 -0
  140. sootool-0.1.1/src/sootool/modules/tax/kr_withholding.py +180 -0
  141. sootool-0.1.1/src/sootool/modules/tax/progressive.py +205 -0
  142. sootool-0.1.1/src/sootool/modules/units/README.md +57 -0
  143. sootool-0.1.1/src/sootool/modules/units/__init__.py +13 -0
  144. sootool-0.1.1/src/sootool/modules/units/convert.py +69 -0
  145. sootool-0.1.1/src/sootool/modules/units/currency.py +235 -0
  146. sootool-0.1.1/src/sootool/modules/units/extended.py +269 -0
  147. sootool-0.1.1/src/sootool/modules/units/temperature.py +120 -0
  148. sootool-0.1.1/src/sootool/observability/__init__.py +1 -0
  149. sootool-0.1.1/src/sootool/observability/health.py +28 -0
  150. sootool-0.1.1/src/sootool/observability/log_format.py +36 -0
  151. sootool-0.1.1/src/sootool/policies/__init__.py +161 -0
  152. sootool-0.1.1/src/sootool/policies/payroll/__init__.py +0 -0
  153. sootool-0.1.1/src/sootool/policies/payroll/kr_4insurance_2026.yaml +43 -0
  154. sootool-0.1.1/src/sootool/policies/realestate/__init__.py +0 -0
  155. sootool-0.1.1/src/sootool/policies/realestate/kr_acquisition_2026.yaml +24 -0
  156. sootool-0.1.1/src/sootool/policies/realestate/kr_comprehensive_2026.yaml +45 -0
  157. sootool-0.1.1/src/sootool/policies/realestate/kr_dsr_ltv_2026.yaml +14 -0
  158. sootool-0.1.1/src/sootool/policies/realestate/kr_property_tax_2026.yaml +22 -0
  159. sootool-0.1.1/src/sootool/policies/tax/__init__.py +0 -0
  160. sootool-0.1.1/src/sootool/policies/tax/kr_capital_gains_2026.yaml +100 -0
  161. sootool-0.1.1/src/sootool/policies/tax/kr_corporate_2026.yaml +29 -0
  162. sootool-0.1.1/src/sootool/policies/tax/kr_gift_2026.yaml +25 -0
  163. sootool-0.1.1/src/sootool/policies/tax/kr_income_2026.yaml +24 -0
  164. sootool-0.1.1/src/sootool/policies/tax/kr_inheritance_2026.yaml +23 -0
  165. sootool-0.1.1/src/sootool/policies/tax/kr_withholding_2026.yaml +50 -0
  166. sootool-0.1.1/src/sootool/policy_mgmt/__init__.py +10 -0
  167. sootool-0.1.1/src/sootool/policy_mgmt/audit.py +106 -0
  168. sootool-0.1.1/src/sootool/policy_mgmt/diff.py +144 -0
  169. sootool-0.1.1/src/sootool/policy_mgmt/drafts.py +154 -0
  170. sootool-0.1.1/src/sootool/policy_mgmt/loader.py +201 -0
  171. sootool-0.1.1/src/sootool/policy_mgmt/paths.py +79 -0
  172. sootool-0.1.1/src/sootool/policy_mgmt/schemas.py +177 -0
  173. sootool-0.1.1/src/sootool/policy_mgmt/signatures.py +69 -0
  174. sootool-0.1.1/src/sootool/policy_mgmt/tools.py +577 -0
  175. sootool-0.1.1/src/sootool/policy_mgmt/trace_ext.py +74 -0
  176. sootool-0.1.1/src/sootool/policy_mgmt/validators.py +353 -0
  177. sootool-0.1.1/src/sootool/server.py +310 -0
  178. sootool-0.1.1/src/sootool/skill_guide/__init__.py +8 -0
  179. sootool-0.1.1/src/sootool/skill_guide/anti_patterns.py +97 -0
  180. sootool-0.1.1/src/sootool/skill_guide/examples.py +187 -0
  181. sootool-0.1.1/src/sootool/skill_guide/guide.py +67 -0
  182. sootool-0.1.1/src/sootool/skill_guide/hints.py +142 -0
  183. sootool-0.1.1/src/sootool/skill_guide/locale.py +75 -0
  184. sootool-0.1.1/src/sootool/skill_guide/playbooks.py +395 -0
  185. sootool-0.1.1/src/sootool/skill_guide/session_state.py +143 -0
  186. sootool-0.1.1/src/sootool/skill_guide/triggers.py +297 -0
  187. sootool-0.1.1/src/sootool/transports/__init__.py +1 -0
  188. sootool-0.1.1/src/sootool/transports/base.py +8 -0
  189. sootool-0.1.1/src/sootool/transports/http.py +98 -0
  190. sootool-0.1.1/src/sootool/transports/sse_legacy.py +127 -0
  191. sootool-0.1.1/src/sootool/transports/stdio.py +14 -0
  192. sootool-0.1.1/src/sootool/transports/unix.py +206 -0
  193. sootool-0.1.1/src/sootool/transports/websocket.py +253 -0
sootool-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 최진호
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
sootool-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,238 @@
1
+ Metadata-Version: 2.3
2
+ Name: sootool
3
+ Version: 0.1.1
4
+ Summary: LLM이 확률 추론으로 산수를 틀리는 구조적 한계를 차단하는 정밀 계산 MCP 서버. Decimal 전용 커널, 15개 계산 도메인 236개 기본 도구 + 10개 admin 정책 도구, 5종 전송(stdio/HTTP/SSE/WebSocket/Unix).
5
+ Keywords: mcp,llm,decimal,calculation,tax,finance,accounting,engineering,korean-tax
6
+ Author: 최진호
7
+ Author-email: 최진호 <jinho.von.choi@nerdvana.kr>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 최진호
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ Classifier: Development Status :: 4 - Beta
30
+ Classifier: Intended Audience :: Developers
31
+ Classifier: Intended Audience :: Financial and Insurance Industry
32
+ Classifier: Intended Audience :: Healthcare Industry
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Topic :: Scientific/Engineering
38
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
39
+ Classifier: Topic :: Office/Business :: Financial :: Accounting
40
+ Requires-Dist: holidays>=0.95
41
+ Requires-Dist: mcp[cli]>=1.2
42
+ Requires-Dist: mpmath>=1.4.1
43
+ Requires-Dist: numpy>=2.0
44
+ Requires-Dist: numpy-financial>=1.0.0
45
+ Requires-Dist: pint>=0.25.3
46
+ Requires-Dist: pydantic>=2.13.3
47
+ Requires-Dist: python-dateutil>=2.9.0.post0
48
+ Requires-Dist: pyyaml>=6.0.3
49
+ Requires-Dist: scipy>=1.13
50
+ Requires-Dist: statsmodels>=0.14.6
51
+ Requires-Dist: workalendar>=17.0.0
52
+ Requires-Dist: uvicorn[standard]>=0.33
53
+ Requires-Dist: starlette>=0.47
54
+ Requires-Dist: websockets>=14
55
+ Requires-Python: >=3.12
56
+ Project-URL: Homepage, https://github.com/JinHo-von-Choi/SooTool
57
+ Project-URL: Repository, https://github.com/JinHo-von-Choi/SooTool
58
+ Project-URL: Issues, https://github.com/JinHo-von-Choi/SooTool/issues
59
+ Description-Content-Type: text/markdown
60
+
61
+ # SooTool
62
+
63
+ LLM이 확률 추론으로 산수를 틀리는 구조적 한계를 차단하는 정밀 계산 MCP 서버. Python 3.12 · FastMCP · Decimal 전용 커널 위에 16개 계산 도메인 236개 기본 도구 + admin 10개 정책 도구, 5종 전송(stdio/HTTP/SSE/WebSocket/Unix), 감사 트레이스·정책 외부화·배치·파이프라인을 얹었다.
64
+
65
+ ## 왜 필요한가
66
+
67
+ LLM은 숫자를 토큰 시퀀스로 생성한다. 부가세 역산, 복리 이자, 누진세 구간, 양도소득세 장기보유특별공제, 이항분포 CDF 같은 실무 계산에서 반올림 방향·구간 경계·정책 해석이 미묘하게 어긋난다. 검증 없이 LLM 산출을 그대로 쓰면 세무 신고·재무 의사결정·의료 용량·공학 설계에서 치명적 오차가 누적된다.
68
+
69
+ 문제의 층위는 두 겹이다. 첫째, 모델 자체가 산술을 수행하지 않는다. 확률 추론으로 그럴듯한 숫자를 내놓을 뿐이라 회계·세무·약제 용량 현장에서 잘못된 수치가 그대로 보고서·전표·처방에 남는다. 검증 여력이 빠듯한 전문직 실무에서는 오차 한 건이 신고 오류·환불·의료 사고로 직결된다.
70
+
71
+ 둘째, 최신 대형 LLM은 내부에 계산기·Python 인터프리터를 내장하고 있지만 그 도구를 호출할지는 여전히 모델 재량이다. MCP 도구도 같은 제약을 공유한다. 구조적 한계가 단일 방어막 하나로는 닫히지 않는다는 뜻이다. SooTool은 모델 내장 도구와 독립된 두 번째 층의 MCP 서버로서 결정적 Decimal 경로, 외부화된 정책 데이터, 감사 가능한 트레이스를 제공해 방어 깊이를 늘린다. 호출 여부 자체는 AI 재량으로 남지만, 불리면 결과는 산술적으로 정확하다는 점이 보증된다.
72
+
73
+ SooTool은 그 경로를 원천 차단한다.
74
+
75
+ - Decimal 전용 커널. 입력 JSON은 `parse_float=Decimal`로 파싱되어 float이 도메인 내부로 유입되지 못한다.
76
+ - 반올림 정책 6종(HALF_EVEN · HALF_UP · DOWN · UP · FLOOR · CEIL)을 enum으로 고정하고 도구 기본값을 금지한다. 호출자가 반드시 선택한다(ADR-002).
77
+ - 세법·부동산 규제 데이터를 `src/sootool/policies/{domain}/{key}_{year}.yaml`로 외부화하고 SHA-256 무결성 검증 + lru_cache로 로드한다(ADR-009).
78
+ - 모든 응답은 `trace.{tool, formula, inputs, steps, output}` 필드를 포함한다. 계산 근거를 사용자에게 직접 보여줄 수 있다(ADR-003).
79
+ - 결정론. ThreadPool 결과는 입력 id 순으로 재정렬하고, 비결정 허용 시 `non_deterministic:true` 플래그를 강제한다(ADR-011).
80
+
81
+ ## 설치
82
+
83
+ ```
84
+ cd SooTool
85
+ uv sync
86
+ ```
87
+
88
+ ## 실행
89
+
90
+ 기본(stdio, MCP 클라이언트 연동):
91
+ ```
92
+ uv run python -m sootool
93
+ ```
94
+
95
+ 전송별 단일 기동:
96
+ ```
97
+ uv run python -m sootool --transport http --port 10535
98
+ uv run python -m sootool --transport sse-legacy --port 10536
99
+ uv run python -m sootool --transport websocket --port 10537
100
+ uv run python -m sootool --transport unix --socket /tmp/sootool.sock
101
+ ```
102
+
103
+ 다중 전송 동시 기동:
104
+ ```
105
+ uv run python -m sootool --transports stdio,http,websocket
106
+ ```
107
+
108
+ 기본 바인딩은 `127.0.0.1`. 외부 노출은 `--host 0.0.0.0` + Bearer 토큰이 의무다(ADR-014).
109
+
110
+ ## Claude Code 연동
111
+
112
+ 저장소 루트의 `.mcp.json`을 그대로 두면 Claude Code가 자동 인식한다. 수동 등록:
113
+ ```
114
+ claude mcp add sootool -- uv run python -m sootool
115
+ ```
116
+
117
+ ## 도구 카탈로그 (236개 기본 + 10개 admin, 16 계산 도메인 + sootool 운영 도구)
118
+
119
+ |Namespace|Count|대표 도구|
120
+ |-|-|-|
121
+ |core|7|add, sub, mul, div, batch, pipeline, pipeline_resume|
122
+ |accounting|11|vat_extract, vat_add, balance, depreciation 3종, interest_compound 외|
123
+ |finance|15|pv, fv, npv, irr, loan_schedule, bond_ytm, bond_duration, black_scholes, var_parametric, sharpe 외|
124
+ |tax|7|progressive, kr_income, kr_withholding_simple, capital_gains_kr 외|
125
+ |realestate|8|kr_ltv, kr_dti, kr_dsr, kr_acquisition_tax, kr_transfer_tax, rental_yield 외|
126
+ |stats|14|descriptive, ttest 3종, chi_square_independence, ci_mean, regression_linear, anova, correlation 외|
127
+ |probability|30|normal/binomial/poisson, gamma, beta, exponential, lognormal, chi_square, F, bayes, factorial, nCr, nPr, expected_value|
128
+ |datetime|14|add/count_business_days, day_count, age, diff, tz_convert, solar↔lunar, solar_terms, lunar_holiday, fiscal_year, fiscal_quarter, tax_period_kr, payroll_period|
129
+ |math|10|integrate_simpson, integrate_gauss_legendre, diff_central, diff_five_point, interpolate_linear, interpolate_cubic_spline, polynomial_roots, polynomial_horner, fft, ifft|
130
+ |geometry|15|area·volume 7종, vector dot/cross/norm, matrix 4종, haversine|
131
+ |engineering|56|electrical_*, electrical_ac 11종, fluid, thermal, mechanical, structural, control 5종, si_prefix_convert|
132
+ |units|8|convert (pint), fx_convert, fx_triangulate, temperature, energy_convert, pressure_convert, data_size_convert, time_small_convert|
133
+ |medical|12|bmi, bsa, dose_weight_based, egfr, pregnancy_weeks, cha2ds2_vasc, has_bled, framingham_cvd_10y, qtc_bazett/fridericia/framingham/hodges|
134
+ |science|11|half_life, ideal_gas, molar_mass, stoichiometry, nernst, faraday_electrolysis, battery_capacity, snell_law, thin_lens, bragg, intensity|
135
+ |crypto|10|gcd, lcm, hash, is_prime, modinv, modpow, egcd, crt, euler_totient, carmichael_lambda|
136
+ |pm|5|critical_path (CPM), evm, pert, earned_schedule, monte_carlo_schedule|
137
+ |payroll|1|kr_net_monthly|
138
+ |sootool|1+10|skill_guide (항시) + policy_mgmt 10종 (admin 모드)|
139
+
140
+ 전체 도구 사양은 `docs/user_guide.md` 및 `sootool.skill_guide` MCP 호출로 조회한다.
141
+
142
+ ## 실전 예시
143
+
144
+ 세무 체인 파이프라인. 월급 3,000,000원을 연소득으로 환산한 뒤 2026년 한국 소득세를 계산한다.
145
+ ```json
146
+ {
147
+ "name": "core.pipeline",
148
+ "arguments": {
149
+ "steps": [
150
+ {"id": "annual", "tool": "core.mul", "args": {"operands": ["3000000", "12"]}},
151
+ {"id": "tax", "tool": "tax.kr_income", "args": {"taxable_income": "${annual.result.result}", "year": 2026}}
152
+ ]
153
+ }
154
+ }
155
+ ```
156
+
157
+ 재무 시나리오 비교 배치. 동일 현금흐름에 대해 할인율 3종 NPV를 동시 산출한다.
158
+ ```json
159
+ {
160
+ "name": "core.batch",
161
+ "arguments": {
162
+ "items": [
163
+ {"id": "s1", "tool": "finance.npv", "args": {"rate": "0.05", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}},
164
+ {"id": "s2", "tool": "finance.npv", "args": {"rate": "0.08", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}},
165
+ {"id": "s3", "tool": "finance.npv", "args": {"rate": "0.10", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}}
166
+ ]
167
+ }
168
+ }
169
+ ```
170
+
171
+ 공학 레이놀즈 수. 밀도·속도·특성길이·점성으로 층류/전이/난류 영역을 판정하고 trace에 공식을 남긴다.
172
+ ```json
173
+ {
174
+ "name": "engineering.fluid_reynolds",
175
+ "arguments": {"density": "1000", "velocity": "2", "length": "0.05", "viscosity": "0.001"}
176
+ }
177
+ ```
178
+
179
+ 통계 회귀 + 신뢰구간 배치. 단일 왕복으로 선형회귀 계수·p-value와 평균 95% 신뢰구간을 동시 반환한다.
180
+ ```json
181
+ {
182
+ "name": "core.batch",
183
+ "arguments": {
184
+ "items": [
185
+ {"id": "reg", "tool": "stats.regression_linear", "args": {"X": [[1],[2],[3],[4]], "y": [2.1, 4.0, 6.2, 8.1]}},
186
+ {"id": "ci", "tool": "stats.ci_mean", "args": {"data": [2.1, 4.0, 6.2, 8.1], "confidence": 0.95}}
187
+ ]
188
+ }
189
+ }
190
+ ```
191
+
192
+ ## 배치와 파이프라인
193
+
194
+ - `core.batch` — N개 독립 연산을 ThreadPoolExecutor로 병렬 실행. id 중복 거부, per-item 격리(`ok|error|timeout|skipped`), 최대 500 items, per-item 10s, batch 60s 제한. 결과는 입력 id 순으로 결정적 재정렬된다(ADR-011).
195
+ - `core.pipeline` — `graphlib.TopologicalSorter` 기반 DAG 실행기. `${step_id.result.field}` 참조 문법으로 단계 간 데이터 전달. max_steps=50, max_depth=10, step_timeout_s=2.0, pipeline_timeout_s=30.0(ADR-006).
196
+ - `core.pipeline_resume` — 실패한 스텝을 TTL 10분 in-memory 캐시로부터 부분 재실행.
197
+
198
+ ## 전송 지원
199
+
200
+ |Transport|용도|Flag|
201
+ |-|-|-|
202
+ |stdio|Claude Code·Desktop 기본|--transport stdio|
203
+ |http|Streamable HTTP, 권장 원격|--transport http|
204
+ |sse-legacy|2024-11 프로토콜 호환|--transport sse-legacy|
205
+ |websocket|저지연 양방향|--transport websocket|
206
+ |unix|로컬 고처리|--transport unix --socket PATH|
207
+ |multi|동시 기동|--transports stdio,http,...|
208
+
209
+ 모든 HTTP 계열 전송은 Bearer 인증, `Accept-Language` 기반 로케일 감지(ko 기본), 전 도구 `_meta.hints` 자동 주입, CORS 화이트리스트를 공통 미들웨어로 적용한다(ADR-014).
210
+
211
+ ## 개발
212
+
213
+ - 테스트: `make test` (pytest 1097건, 97% 커버리지)
214
+ - 린트: `make lint` (ruff)
215
+ - 타입체크: `make typecheck` (mypy)
216
+ - 포맷: `make format`
217
+ - 전송 스모크: `uv run python scripts/mcp_smoke_{stdio,http,sse,ws,unix}.py`
218
+
219
+ 새 도메인 도구 추가는 `src/sootool/modules/<domain>/<tool>.py`에 `@REGISTRY.tool(namespace, name, description, version)` 데코레이터로 구현하고 도메인 `__init__.py`에서 import하면 런타임 자동 등록된다(ADR-004).
220
+
221
+ ## 아키텍처
222
+
223
+ 설계 결정과 근거는 `docs/architecture.md` ADR-001~017에 기록되어 있다. 핵심 invariant:
224
+
225
+ - Decimal-only 경계 · 명시적 rounding · 감사 트레이스 · 모듈 stateless / batch-safe
226
+ - 자료형 이원화: 회계·세무·금융은 전 구간 Decimal, 통계·기하·확률은 내부 float64 + 경계 Decimal 직렬화(ADR-008)
227
+ - 정책 YAML 외부화 + SHA-256 무결성(ADR-009)
228
+ - trace_level none·summary·full + SOOTOOL_MAX_PAYLOAD_KB(기본 512KB) 초과 시 trace.steps tail 절단(ADR-010)
229
+ - KRWMoney는 Decimal 상속 대신 합성(ADR-013)
230
+ - 도메인별 `*_bulk` 도구 금지, `core.batch` 일반해로 통일(ADR-006)
231
+
232
+ ## 스킬 가이드
233
+
234
+ 에이전트가 언제 어떤 도구를 호출해야 하는지 기술한 트리거 테이블·예시·플레이북은 `sootool.skill_guide` MCP 도구를 호출하여 조회한다. 섹션은 `triggers | examples | anti_patterns | playbooks | all`, 언어는 `ko | en`.
235
+
236
+ ## 라이선스
237
+
238
+ `LICENSE` 파일 참조.
@@ -0,0 +1,178 @@
1
+ # SooTool
2
+
3
+ LLM이 확률 추론으로 산수를 틀리는 구조적 한계를 차단하는 정밀 계산 MCP 서버. Python 3.12 · FastMCP · Decimal 전용 커널 위에 16개 계산 도메인 236개 기본 도구 + admin 10개 정책 도구, 5종 전송(stdio/HTTP/SSE/WebSocket/Unix), 감사 트레이스·정책 외부화·배치·파이프라인을 얹었다.
4
+
5
+ ## 왜 필요한가
6
+
7
+ LLM은 숫자를 토큰 시퀀스로 생성한다. 부가세 역산, 복리 이자, 누진세 구간, 양도소득세 장기보유특별공제, 이항분포 CDF 같은 실무 계산에서 반올림 방향·구간 경계·정책 해석이 미묘하게 어긋난다. 검증 없이 LLM 산출을 그대로 쓰면 세무 신고·재무 의사결정·의료 용량·공학 설계에서 치명적 오차가 누적된다.
8
+
9
+ 문제의 층위는 두 겹이다. 첫째, 모델 자체가 산술을 수행하지 않는다. 확률 추론으로 그럴듯한 숫자를 내놓을 뿐이라 회계·세무·약제 용량 현장에서 잘못된 수치가 그대로 보고서·전표·처방에 남는다. 검증 여력이 빠듯한 전문직 실무에서는 오차 한 건이 신고 오류·환불·의료 사고로 직결된다.
10
+
11
+ 둘째, 최신 대형 LLM은 내부에 계산기·Python 인터프리터를 내장하고 있지만 그 도구를 호출할지는 여전히 모델 재량이다. MCP 도구도 같은 제약을 공유한다. 구조적 한계가 단일 방어막 하나로는 닫히지 않는다는 뜻이다. SooTool은 모델 내장 도구와 독립된 두 번째 층의 MCP 서버로서 결정적 Decimal 경로, 외부화된 정책 데이터, 감사 가능한 트레이스를 제공해 방어 깊이를 늘린다. 호출 여부 자체는 AI 재량으로 남지만, 불리면 결과는 산술적으로 정확하다는 점이 보증된다.
12
+
13
+ SooTool은 그 경로를 원천 차단한다.
14
+
15
+ - Decimal 전용 커널. 입력 JSON은 `parse_float=Decimal`로 파싱되어 float이 도메인 내부로 유입되지 못한다.
16
+ - 반올림 정책 6종(HALF_EVEN · HALF_UP · DOWN · UP · FLOOR · CEIL)을 enum으로 고정하고 도구 기본값을 금지한다. 호출자가 반드시 선택한다(ADR-002).
17
+ - 세법·부동산 규제 데이터를 `src/sootool/policies/{domain}/{key}_{year}.yaml`로 외부화하고 SHA-256 무결성 검증 + lru_cache로 로드한다(ADR-009).
18
+ - 모든 응답은 `trace.{tool, formula, inputs, steps, output}` 필드를 포함한다. 계산 근거를 사용자에게 직접 보여줄 수 있다(ADR-003).
19
+ - 결정론. ThreadPool 결과는 입력 id 순으로 재정렬하고, 비결정 허용 시 `non_deterministic:true` 플래그를 강제한다(ADR-011).
20
+
21
+ ## 설치
22
+
23
+ ```
24
+ cd SooTool
25
+ uv sync
26
+ ```
27
+
28
+ ## 실행
29
+
30
+ 기본(stdio, MCP 클라이언트 연동):
31
+ ```
32
+ uv run python -m sootool
33
+ ```
34
+
35
+ 전송별 단일 기동:
36
+ ```
37
+ uv run python -m sootool --transport http --port 10535
38
+ uv run python -m sootool --transport sse-legacy --port 10536
39
+ uv run python -m sootool --transport websocket --port 10537
40
+ uv run python -m sootool --transport unix --socket /tmp/sootool.sock
41
+ ```
42
+
43
+ 다중 전송 동시 기동:
44
+ ```
45
+ uv run python -m sootool --transports stdio,http,websocket
46
+ ```
47
+
48
+ 기본 바인딩은 `127.0.0.1`. 외부 노출은 `--host 0.0.0.0` + Bearer 토큰이 의무다(ADR-014).
49
+
50
+ ## Claude Code 연동
51
+
52
+ 저장소 루트의 `.mcp.json`을 그대로 두면 Claude Code가 자동 인식한다. 수동 등록:
53
+ ```
54
+ claude mcp add sootool -- uv run python -m sootool
55
+ ```
56
+
57
+ ## 도구 카탈로그 (236개 기본 + 10개 admin, 16 계산 도메인 + sootool 운영 도구)
58
+
59
+ |Namespace|Count|대표 도구|
60
+ |-|-|-|
61
+ |core|7|add, sub, mul, div, batch, pipeline, pipeline_resume|
62
+ |accounting|11|vat_extract, vat_add, balance, depreciation 3종, interest_compound 외|
63
+ |finance|15|pv, fv, npv, irr, loan_schedule, bond_ytm, bond_duration, black_scholes, var_parametric, sharpe 외|
64
+ |tax|7|progressive, kr_income, kr_withholding_simple, capital_gains_kr 외|
65
+ |realestate|8|kr_ltv, kr_dti, kr_dsr, kr_acquisition_tax, kr_transfer_tax, rental_yield 외|
66
+ |stats|14|descriptive, ttest 3종, chi_square_independence, ci_mean, regression_linear, anova, correlation 외|
67
+ |probability|30|normal/binomial/poisson, gamma, beta, exponential, lognormal, chi_square, F, bayes, factorial, nCr, nPr, expected_value|
68
+ |datetime|14|add/count_business_days, day_count, age, diff, tz_convert, solar↔lunar, solar_terms, lunar_holiday, fiscal_year, fiscal_quarter, tax_period_kr, payroll_period|
69
+ |math|10|integrate_simpson, integrate_gauss_legendre, diff_central, diff_five_point, interpolate_linear, interpolate_cubic_spline, polynomial_roots, polynomial_horner, fft, ifft|
70
+ |geometry|15|area·volume 7종, vector dot/cross/norm, matrix 4종, haversine|
71
+ |engineering|56|electrical_*, electrical_ac 11종, fluid, thermal, mechanical, structural, control 5종, si_prefix_convert|
72
+ |units|8|convert (pint), fx_convert, fx_triangulate, temperature, energy_convert, pressure_convert, data_size_convert, time_small_convert|
73
+ |medical|12|bmi, bsa, dose_weight_based, egfr, pregnancy_weeks, cha2ds2_vasc, has_bled, framingham_cvd_10y, qtc_bazett/fridericia/framingham/hodges|
74
+ |science|11|half_life, ideal_gas, molar_mass, stoichiometry, nernst, faraday_electrolysis, battery_capacity, snell_law, thin_lens, bragg, intensity|
75
+ |crypto|10|gcd, lcm, hash, is_prime, modinv, modpow, egcd, crt, euler_totient, carmichael_lambda|
76
+ |pm|5|critical_path (CPM), evm, pert, earned_schedule, monte_carlo_schedule|
77
+ |payroll|1|kr_net_monthly|
78
+ |sootool|1+10|skill_guide (항시) + policy_mgmt 10종 (admin 모드)|
79
+
80
+ 전체 도구 사양은 `docs/user_guide.md` 및 `sootool.skill_guide` MCP 호출로 조회한다.
81
+
82
+ ## 실전 예시
83
+
84
+ 세무 체인 파이프라인. 월급 3,000,000원을 연소득으로 환산한 뒤 2026년 한국 소득세를 계산한다.
85
+ ```json
86
+ {
87
+ "name": "core.pipeline",
88
+ "arguments": {
89
+ "steps": [
90
+ {"id": "annual", "tool": "core.mul", "args": {"operands": ["3000000", "12"]}},
91
+ {"id": "tax", "tool": "tax.kr_income", "args": {"taxable_income": "${annual.result.result}", "year": 2026}}
92
+ ]
93
+ }
94
+ }
95
+ ```
96
+
97
+ 재무 시나리오 비교 배치. 동일 현금흐름에 대해 할인율 3종 NPV를 동시 산출한다.
98
+ ```json
99
+ {
100
+ "name": "core.batch",
101
+ "arguments": {
102
+ "items": [
103
+ {"id": "s1", "tool": "finance.npv", "args": {"rate": "0.05", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}},
104
+ {"id": "s2", "tool": "finance.npv", "args": {"rate": "0.08", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}},
105
+ {"id": "s3", "tool": "finance.npv", "args": {"rate": "0.10", "cashflows": ["-100","30","40","50"], "rounding": "HALF_EVEN", "decimals": 2}}
106
+ ]
107
+ }
108
+ }
109
+ ```
110
+
111
+ 공학 레이놀즈 수. 밀도·속도·특성길이·점성으로 층류/전이/난류 영역을 판정하고 trace에 공식을 남긴다.
112
+ ```json
113
+ {
114
+ "name": "engineering.fluid_reynolds",
115
+ "arguments": {"density": "1000", "velocity": "2", "length": "0.05", "viscosity": "0.001"}
116
+ }
117
+ ```
118
+
119
+ 통계 회귀 + 신뢰구간 배치. 단일 왕복으로 선형회귀 계수·p-value와 평균 95% 신뢰구간을 동시 반환한다.
120
+ ```json
121
+ {
122
+ "name": "core.batch",
123
+ "arguments": {
124
+ "items": [
125
+ {"id": "reg", "tool": "stats.regression_linear", "args": {"X": [[1],[2],[3],[4]], "y": [2.1, 4.0, 6.2, 8.1]}},
126
+ {"id": "ci", "tool": "stats.ci_mean", "args": {"data": [2.1, 4.0, 6.2, 8.1], "confidence": 0.95}}
127
+ ]
128
+ }
129
+ }
130
+ ```
131
+
132
+ ## 배치와 파이프라인
133
+
134
+ - `core.batch` — N개 독립 연산을 ThreadPoolExecutor로 병렬 실행. id 중복 거부, per-item 격리(`ok|error|timeout|skipped`), 최대 500 items, per-item 10s, batch 60s 제한. 결과는 입력 id 순으로 결정적 재정렬된다(ADR-011).
135
+ - `core.pipeline` — `graphlib.TopologicalSorter` 기반 DAG 실행기. `${step_id.result.field}` 참조 문법으로 단계 간 데이터 전달. max_steps=50, max_depth=10, step_timeout_s=2.0, pipeline_timeout_s=30.0(ADR-006).
136
+ - `core.pipeline_resume` — 실패한 스텝을 TTL 10분 in-memory 캐시로부터 부분 재실행.
137
+
138
+ ## 전송 지원
139
+
140
+ |Transport|용도|Flag|
141
+ |-|-|-|
142
+ |stdio|Claude Code·Desktop 기본|--transport stdio|
143
+ |http|Streamable HTTP, 권장 원격|--transport http|
144
+ |sse-legacy|2024-11 프로토콜 호환|--transport sse-legacy|
145
+ |websocket|저지연 양방향|--transport websocket|
146
+ |unix|로컬 고처리|--transport unix --socket PATH|
147
+ |multi|동시 기동|--transports stdio,http,...|
148
+
149
+ 모든 HTTP 계열 전송은 Bearer 인증, `Accept-Language` 기반 로케일 감지(ko 기본), 전 도구 `_meta.hints` 자동 주입, CORS 화이트리스트를 공통 미들웨어로 적용한다(ADR-014).
150
+
151
+ ## 개발
152
+
153
+ - 테스트: `make test` (pytest 1097건, 97% 커버리지)
154
+ - 린트: `make lint` (ruff)
155
+ - 타입체크: `make typecheck` (mypy)
156
+ - 포맷: `make format`
157
+ - 전송 스모크: `uv run python scripts/mcp_smoke_{stdio,http,sse,ws,unix}.py`
158
+
159
+ 새 도메인 도구 추가는 `src/sootool/modules/<domain>/<tool>.py`에 `@REGISTRY.tool(namespace, name, description, version)` 데코레이터로 구현하고 도메인 `__init__.py`에서 import하면 런타임 자동 등록된다(ADR-004).
160
+
161
+ ## 아키텍처
162
+
163
+ 설계 결정과 근거는 `docs/architecture.md` ADR-001~017에 기록되어 있다. 핵심 invariant:
164
+
165
+ - Decimal-only 경계 · 명시적 rounding · 감사 트레이스 · 모듈 stateless / batch-safe
166
+ - 자료형 이원화: 회계·세무·금융은 전 구간 Decimal, 통계·기하·확률은 내부 float64 + 경계 Decimal 직렬화(ADR-008)
167
+ - 정책 YAML 외부화 + SHA-256 무결성(ADR-009)
168
+ - trace_level none·summary·full + SOOTOOL_MAX_PAYLOAD_KB(기본 512KB) 초과 시 trace.steps tail 절단(ADR-010)
169
+ - KRWMoney는 Decimal 상속 대신 합성(ADR-013)
170
+ - 도메인별 `*_bulk` 도구 금지, `core.batch` 일반해로 통일(ADR-006)
171
+
172
+ ## 스킬 가이드
173
+
174
+ 에이전트가 언제 어떤 도구를 호출해야 하는지 기술한 트리거 테이블·예시·플레이북은 `sootool.skill_guide` MCP 도구를 호출하여 조회한다. 섹션은 `triggers | examples | anti_patterns | playbooks | all`, 언어는 `ko | en`.
175
+
176
+ ## 라이선스
177
+
178
+ `LICENSE` 파일 참조.
@@ -0,0 +1,105 @@
1
+ [project]
2
+ name = "sootool"
3
+ version = "0.1.1"
4
+ description = "LLM이 확률 추론으로 산수를 틀리는 구조적 한계를 차단하는 정밀 계산 MCP 서버. Decimal 전용 커널, 15개 계산 도메인 236개 기본 도구 + 10개 admin 정책 도구, 5종 전송(stdio/HTTP/SSE/WebSocket/Unix)."
5
+ readme = "README.md"
6
+ license = { file = "LICENSE" }
7
+ authors = [
8
+ { name = "최진호", email = "jinho.von.choi@nerdvana.kr" }
9
+ ]
10
+ keywords = [
11
+ "mcp",
12
+ "llm",
13
+ "decimal",
14
+ "calculation",
15
+ "tax",
16
+ "finance",
17
+ "accounting",
18
+ "engineering",
19
+ "korean-tax",
20
+ ]
21
+ classifiers = [
22
+ "Development Status :: 4 - Beta",
23
+ "Intended Audience :: Developers",
24
+ "Intended Audience :: Financial and Insurance Industry",
25
+ "Intended Audience :: Healthcare Industry",
26
+ "License :: OSI Approved :: MIT License",
27
+ "Operating System :: OS Independent",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Topic :: Scientific/Engineering",
31
+ "Topic :: Scientific/Engineering :: Mathematics",
32
+ "Topic :: Office/Business :: Financial :: Accounting",
33
+ ]
34
+ requires-python = ">=3.12"
35
+ dependencies = [
36
+ "holidays>=0.95",
37
+ "mcp[cli]>=1.2",
38
+ "mpmath>=1.4.1",
39
+ "numpy>=2.0",
40
+ "numpy-financial>=1.0.0",
41
+ "pint>=0.25.3",
42
+ "pydantic>=2.13.3",
43
+ "python-dateutil>=2.9.0.post0",
44
+ "pyyaml>=6.0.3",
45
+ "scipy>=1.13",
46
+ "statsmodels>=0.14.6",
47
+ "workalendar>=17.0.0",
48
+ "uvicorn[standard]>=0.33",
49
+ "starlette>=0.47",
50
+ "websockets>=14",
51
+ ]
52
+
53
+ [project.urls]
54
+ Homepage = "https://github.com/JinHo-von-Choi/SooTool"
55
+ Repository = "https://github.com/JinHo-von-Choi/SooTool"
56
+ Issues = "https://github.com/JinHo-von-Choi/SooTool/issues"
57
+
58
+ [project.scripts]
59
+ sootool = "sootool.__main__:main"
60
+
61
+ [build-system]
62
+ requires = ["uv_build>=0.10.0,<0.11.0"]
63
+ build-backend = "uv_build"
64
+
65
+ [dependency-groups]
66
+ dev = [
67
+ "hypothesis>=6.152.1",
68
+ "mypy>=1.20.2",
69
+ "pytest>=9.0.3",
70
+ "pytest-cov>=7.1.0",
71
+ "ruff>=0.15.11",
72
+ "types-python-dateutil>=2.9.0.20260408",
73
+ ]
74
+
75
+ [tool.ruff]
76
+ line-length = 100
77
+ target-version = "py312"
78
+
79
+ [tool.ruff.lint]
80
+ select = ["E", "F", "I", "B", "UP", "S"]
81
+ ignore = ["E501", "S101"]
82
+
83
+ [tool.mypy]
84
+ python_version = "3.12"
85
+ strict = true
86
+ disallow_untyped_defs = false
87
+ ignore_missing_imports = true
88
+ exclude = ["tests/"]
89
+ # NOTE: deliberate relaxations from full strict mode:
90
+ # disallow_untyped_defs=false — pint/mpmath lack py.typed; function signatures
91
+ # throughout units.py/cast.py use runtime Quantity objects that mypy cannot type.
92
+ # ignore_missing_imports=true — pint, mpmath, mcp have no bundled stubs.
93
+ # __main__.py FastMCP.run kwargs (host/port) are not in the mcp package's type stubs.
94
+ # Deviation documented: ADR-011 (tooling gates).
95
+
96
+ [[tool.mypy.overrides]]
97
+ module = ["pint.*", "mpmath.*", "mcp.*", "yaml.*", "dateutil.*", "holidays.*", "workalendar.*"]
98
+ ignore_missing_imports = true
99
+
100
+ [tool.pytest.ini_options]
101
+ addopts = "--strict-markers"
102
+ testpaths = ["tests"]
103
+
104
+ [tool.coverage.run]
105
+ source = ["src/sootool"]
@@ -0,0 +1,11 @@
1
+ from importlib.metadata import PackageNotFoundError
2
+ from importlib.metadata import version as _v
3
+
4
+ try:
5
+ __version__ = _v("sootool")
6
+ except PackageNotFoundError:
7
+ __version__ = "0.0.0+unknown"
8
+
9
+
10
+ def main() -> None:
11
+ print("Hello from sootool!")