mydb-kingbase-mcp 0.3.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 (97) hide show
  1. mydb_kingbase_mcp-0.3.0/.gitignore +24 -0
  2. mydb_kingbase_mcp-0.3.0/.workbuddy/memory/2026-09-27.md +94 -0
  3. mydb_kingbase_mcp-0.3.0/LICENSE +201 -0
  4. mydb_kingbase_mcp-0.3.0/NOTICE +17 -0
  5. mydb_kingbase_mcp-0.3.0/PKG-INFO +622 -0
  6. mydb_kingbase_mcp-0.3.0/README.md +605 -0
  7. mydb_kingbase_mcp-0.3.0/connector/.codebuddy-plugin/marketplace.json +16 -0
  8. mydb_kingbase_mcp-0.3.0/connector/README.md +104 -0
  9. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/.codebuddy-plugin/plugin.json +70 -0
  10. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/README.md +128 -0
  11. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/ai.workbuddy/assets/icon.svg +23 -0
  12. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/mcp.json +19 -0
  13. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/skills/kingbase-kes/SKILL.md +92 -0
  14. mydb_kingbase_mcp-0.3.0/connector/kingbase-kes/skills/kingbase-kes/references/mcp-tools-reference.md +88 -0
  15. mydb_kingbase_mcp-0.3.0/connector/tools/mcp_handshake_test.py +121 -0
  16. mydb_kingbase_mcp-0.3.0/connector/tools/mcp_live_test.py +140 -0
  17. mydb_kingbase_mcp-0.3.0/imgs/readme_config_trae_01.png +0 -0
  18. mydb_kingbase_mcp-0.3.0/imgs/readme_config_trae_02.png +0 -0
  19. mydb_kingbase_mcp-0.3.0/imgs/readme_config_trae_03.png +0 -0
  20. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_01.png +0 -0
  21. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_02.png +0 -0
  22. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_03.png +0 -0
  23. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_04.png +0 -0
  24. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_05.png +0 -0
  25. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_06.png +0 -0
  26. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_07.png +0 -0
  27. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_08.png +0 -0
  28. mydb_kingbase_mcp-0.3.0/imgs/readme_example_trae_09.png +0 -0
  29. mydb_kingbase_mcp-0.3.0/imgs/readme_framework.drawio.png +0 -0
  30. mydb_kingbase_mcp-0.3.0/imgs/readme_framework.drawio.svg +4 -0
  31. mydb_kingbase_mcp-0.3.0/justfile +15 -0
  32. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/SECURITY-AUDIT.md +319 -0
  33. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/design.md +699 -0
  34. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/proposal.md +107 -0
  35. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/README.md +21 -0
  36. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/audit-observability/spec.md +77 -0
  37. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/diagnostic-tools/spec.md +104 -0
  38. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/engineering-standards/spec.md +109 -0
  39. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/http-transport-security/spec.md +89 -0
  40. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/query-resource-limits/spec.md +99 -0
  41. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/secret-redaction/spec.md +76 -0
  42. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/specs/server-capability-introspection/spec.md +49 -0
  43. mydb_kingbase_mcp-0.3.0/openspec/changes/harden-and-extend-kes-mcp/tasks.md +187 -0
  44. mydb_kingbase_mcp-0.3.0/openspec/project.md +80 -0
  45. mydb_kingbase_mcp-0.3.0/openspec/specs/server-capability-introspection/spec.md +52 -0
  46. mydb_kingbase_mcp-0.3.0/pyproject.toml +93 -0
  47. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/__init__.py +37 -0
  48. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/__main__.py +13 -0
  49. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/artifacts.py +323 -0
  50. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/__init__.py +4 -0
  51. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/buffer_health_calc.py +58 -0
  52. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/connection_health_calc.py +76 -0
  53. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/constraint_health_calc.py +101 -0
  54. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/database_health.py +145 -0
  55. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/index_health_calc.py +350 -0
  56. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/init.sql +1 -0
  57. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/replication_calc.py +165 -0
  58. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/sequence_health_calc.py +183 -0
  59. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/database_health/vacuum_health_calc.py +102 -0
  60. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/db_config/__init__.py +3 -0
  61. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/db_config/config_analyzer.py +290 -0
  62. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/explain/__init__.py +7 -0
  63. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/explain/explain_plan.py +248 -0
  64. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/index/dta_calc.py +966 -0
  65. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/index/index_opt_base.py +790 -0
  66. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/index/llm_opt.py +397 -0
  67. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/index/presentation.py +288 -0
  68. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/server.py +855 -0
  69. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/__init__.py +31 -0
  70. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/bind_params.py +816 -0
  71. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/extension_utils.py +237 -0
  72. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/index.py +52 -0
  73. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/safe_sql.py +1294 -0
  74. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/sql/sql_driver.py +423 -0
  75. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/top_queries/__init__.py +4 -0
  76. mydb_kingbase_mcp-0.3.0/src/kingbase_mcp/top_queries/top_queries_calc.py +200 -0
  77. mydb_kingbase_mcp-0.3.0/tests/conftest.py +23 -0
  78. mydb_kingbase_mcp-0.3.0/tests/unit/database_health/test_database_health_tool.py +163 -0
  79. mydb_kingbase_mcp-0.3.0/tests/unit/database_health/test_sequence_health_calc.py +201 -0
  80. mydb_kingbase_mcp-0.3.0/tests/unit/explain/test_explain_plan.py +495 -0
  81. mydb_kingbase_mcp-0.3.0/tests/unit/explain/test_explain_plan_real_db.py +265 -0
  82. mydb_kingbase_mcp-0.3.0/tests/unit/explain/test_server.py +131 -0
  83. mydb_kingbase_mcp-0.3.0/tests/unit/explain/test_server_integration.py +160 -0
  84. mydb_kingbase_mcp-0.3.0/tests/unit/index/test_dta_calc.py +1518 -0
  85. mydb_kingbase_mcp-0.3.0/tests/unit/index/test_workload_diagnostics.py +384 -0
  86. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_db_conn_pool.py +160 -0
  87. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_injection_boundaries.py +150 -0
  88. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_kingbase_syntax_compat.py +173 -0
  89. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_obfuscate_password.py +104 -0
  90. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_readonly_enforcement.py +75 -0
  91. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_safe_sql.py +958 -0
  92. mydb_kingbase_mcp-0.3.0/tests/unit/sql/test_sql_driver.py +502 -0
  93. mydb_kingbase_mcp-0.3.0/tests/unit/test_access_mode.py +114 -0
  94. mydb_kingbase_mcp-0.3.0/tests/unit/test_server_metadata.py +163 -0
  95. mydb_kingbase_mcp-0.3.0/tests/unit/test_transport.py +137 -0
  96. mydb_kingbase_mcp-0.3.0/tests/unit/top_queries/test_top_queries_calc.py +228 -0
  97. mydb_kingbase_mcp-0.3.0/uv.lock +1961 -0
@@ -0,0 +1,24 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.pyd
6
+
7
+ # Virtual environment
8
+ .venv/
9
+ .venv*/
10
+ venv/
11
+
12
+ # Tool caches
13
+ .ruff_cache/
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+
17
+ # Editor swap files
18
+ *.swp
19
+ *.swo
20
+ *~
21
+
22
+ # IDE
23
+ .vscode/
24
+ .idea/
@@ -0,0 +1,94 @@
1
+ # 2026-09-27 工作日志
2
+
3
+ ## 基于 KES MCP 创建 WorkBuddy 金仓数据库连接器
4
+
5
+ 将 `mydb-kes-mcp`(KingbaseES MCP Server v0.3.0)包装为 WorkBuddy 可用的连接器 `kingbase-kes`。
6
+
7
+ ### 产出
8
+
9
+ - `connector/kingbase-kes/` — 连接器插件包(plugin.json / mcp.json / icon.svg / skills)
10
+ - `connector/.codebuddy-plugin/marketplace.json` — 本地 marketplace 清单(名称 `mydb-connectors`)
11
+ - `connector/mcp_handshake_test.py` — stdio 握手冒烟测试脚本
12
+ - `~/.workbuddy/mcp.json` — 新增 `kingbase-kes` stdio MCP 服务器
13
+ - `~/.workbuddy/plugins/known_marketplaces.json` — 注册本地目录 marketplace `mydb-connectors`
14
+
15
+ ### 环境
16
+
17
+ - `uv venv --python 3.12` → `.venv`(Python 3.12.14)
18
+ - `uv pip install .` 首次因网络超时失败(`typing-extensions` 下载中断);
19
+ 改用 `UV_HTTP_TIMEOUT=180 UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple` 成功
20
+ - ksycopg2 2.9.1(for Python3.12 Kingbase V9)验证导入正常
21
+ - 启动命令:`.venv/Scripts/python.exe -m kingbase_mcp --access-mode restricted`
22
+
23
+ ### 验证结果
24
+
25
+ stdio 握手通过:协议 2025-06-18,暴露 10 个工具(list_schemas、list_objects、
26
+ get_object_details、explain_query、analyze_workload_indexes、analyze_query_indexes、
27
+ analyze_db_health、get_top_queries、analyze_db_config、execute_sql)与 2 个资源
28
+ (kingbase://server/info、kingbase://schema/overview)。
29
+ 未配置真实数据库时服务器仍会启动,仅打印连接失败告警。
30
+
31
+ ### 真实连接测试(2026-09-27 08:38)
32
+
33
+ 使用真实连接串 `kingbase://mcp_demo:***@192.168.59.20:54321/kingbase` 跑通端到端:
34
+ - 实例版本 **KingbaseES V009R200C013PS002**,库名 kingbase
35
+ - list_schemas:9 个 schema(含 public、sys_catalog、pg_catalog 等)
36
+ - list_objects(public,table):demo_customers / demo_orders / demo_products
37
+ - execute_sql(SELECT 1):正常返回
38
+ - analyze_db_health 逐项(buffer/index/connection/vacuum/sequence/replication/constraint)
39
+ 全部 OK;其中发现若干重复索引(kwr_* 表),缓冲区命中率 99.5%
40
+
41
+ 注意:`DATABASE_URI` 已写入 `~/.workbuddy/mcp.json`,**明文包含密码**,
42
+ 生产/交付前建议替换为环境变量或轮换该账号密码。
43
+
44
+ 已知限制:restricted 模式连接池上限 5;一次性跑 `all` 或多类合并
45
+ (如 `buffer,index`)偶发 "connection pool exhausted",逐类单独调用稳定通过。
46
+
47
+ ### 待办
48
+
49
+ - 连接器需在 WorkBuddy 连接器管理页「信任」启用
50
+ - 明文密码安全:建议环境变量化或轮换 mcp_demo 账号密码
51
+ - **开放平台上架前置**:需先将 `kingbase-mcp` 发布到 PyPI(`uv build` + `twine upload`),
52
+ 否则 `uvx kingbase-mcp` 在用户侧拉取不到
53
+
54
+ ### 经验
55
+
56
+ WorkBuddy 连接器包结构:`mcp.json`(`$schema` 指向 agent-plugins.org 1.0.0 mcp.schema.json,
57
+ `mcpServers` 下声明 type/command/args/env)+ `.codebuddy-plugin/plugin.json`
58
+ (`extensions.ai.workbuddy.display` 提供中英文名称/描述/示例,`policy.visible_in` 控制可见范围)
59
+ + `ai.workbuddy/assets/icon.svg`(64x64)+ 可选 `skills/`。
60
+
61
+ ### 整理产物 → 开放平台发布就绪(2026-09-27 08:48)
62
+
63
+ - 重构目录:测试脚本移入 `connector/tools/`;`kingbase-kes/` 作为**上传单元**保持干净
64
+ (mcp.json / plugin.json / icon.svg / skills / README)。
65
+ - `mcp.json` 改为可移植 `uvx kingbase-mcp`(对齐官方 zwcad-mcp 本地 Python 模式),
66
+ `DATABASE_URI` 用 `${DATABASE_URI}` 占位,平台启用时自动弹窗配置。
67
+ - `plugin.json` 补充 `setup.runtime`(`python >=3.12`)、keywords 增 `人大金仓`/`postgresql`/`sql`;
68
+ 中英文 display 已齐。
69
+ - 配套 `SKILL.md` frontmatter 补全发布元数据(author=少安事务所、display_name、category=开发工具、
70
+ website、avatar、version),与 mydb-kingbase-skills / mydb-yashandb-skills 同规范。
71
+ - 新增 `kingbase-kes/README.md`(总览/安装/配置/工具/安全/FAQ)与 `connector/README.md`
72
+ (打包与 open.workbuddy.cn 上传指南 + 10 项检查清单)。
73
+ - 注:本地已验证的 `~/.workbuddy/mcp.json` 仍用 venv 绝对路径 + 真实连接串(开发模式),
74
+ 与上传包 `uvx` 写法不同;切勿将含密码的明文配置提交到仓库/平台。
75
+
76
+ 开放平台连接器可移植性结论:本地 Python 连接器标准做法是用 `uvx <pypi包>` 而非本机绝对路径;
77
+ 变量替换 `${VAR}` 在 env/url 模板中有效,用于收集用户配置(如 dcs-cloud 的 `${DCS_PAT}`)。
78
+
79
+ ### PyPI 包名重命名(2026-09-27 11:36,方案①)
80
+
81
+ 为避免商标敏感并统一 mydb-* 品牌,将 PyPI 分发名与控制台脚本由 `kingbase-mcp` 改为
82
+ `mydb-kingbase-mcp`:
83
+ - `pyproject.toml`:`name=mydb-kingbase-mcp`、`authors=少安事务所 <shawnyan@shawnyan.cn>`、
84
+ `[project.scripts] mydb-kingbase-mcp = "kingbase_mcp:main"`、已知首方 `kingbase_mcp`。
85
+ - `connector/kingbase-kes/mcp.json`:`args[0]` → `mydb-kingbase-mcp`(uvx 拉取名)。
86
+ - 文档(root README + connector 两份 README)中 `kingbase-mcp` → `mydb-kingbase-mcp`。
87
+ - **未改**:内部模块名 `kingbase_mcp`、MCP 服务器自报名 `kingbase-mcp`(server.py)、
88
+ 连接器名 `kingbase-kes`、safe_sql 注释前缀 `/* kingbase-mcp */`、tests/openspec。
89
+ - 已 `uv build` 重建(dist 现含 `mydb_kingbase_mcp-0.3.0.{whl,tar.gz}`),
90
+ venv 重新安装为 `mydb-kingbase-mcp==0.3.0`,控制台脚本 `mydb-kingbase-mcp --help` 正常,
91
+ `python -m kingbase_mcp` 与本地握手测试(10 工具)均通过。
92
+ - 顺手修复:测试脚本移入 `connector/tools/` 后 `PROJECT` 路径少算一级,已改为 `parent*3`。
93
+ - 待办:发布到 PyPI 时包名即 `mydb-kingbase-mcp`;下次发版递增版本号。
94
+ - 备注:Apache-2.0 派生自 Johann Schleier-Smith 的 kingbase-mcp,应保留许可证并可加 NOTICE 注明来源。
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,17 @@
1
+ mydb-kingbase-mcp
2
+ Copyright 2026 少安事务所 (Shawn Yan) <shawnyan@shawnyan.cn>
3
+ https://shawnyan.cn
4
+
5
+ This product includes software derived from the "kingbase-mcp" project.
6
+
7
+ Original work:
8
+ Copyright 2025 Johann Schleier-Smith <jssmith@crystal.cloud>
9
+ Copyright 2025 Kingbase
10
+ Originally licensed under the Apache License, Version 2.0.
11
+
12
+ The original "kingbase-mcp" project and this derivative are both distributed
13
+ under the Apache License, Version 2.0 (see the accompanying LICENSE file).
14
+ This NOTICE file is included per Section 4(d) of the Apache License 2.0 to
15
+ preserve attribution notices from the original work.
16
+
17
+ Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0