mcp-dbutils 0.2.11__tar.gz → 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 (35) hide show
  1. mcp_dbutils-0.3.0/.github/workflows/release.yml +49 -0
  2. mcp_dbutils-0.3.0/CHANGELOG.md +601 -0
  3. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/PKG-INFO +4 -4
  4. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/README.md +3 -3
  5. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/README_CN.md +3 -3
  6. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/pyproject.toml +14 -1
  7. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/__init__.py +7 -5
  8. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/base.py +29 -10
  9. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/log.py +3 -3
  10. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/postgres/handler.py +6 -1
  11. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/postgres/server.py +6 -2
  12. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/sqlite/handler.py +6 -1
  13. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/sqlite/server.py +6 -2
  14. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/tests/integration/test_postgres.py +5 -1
  15. mcp_dbutils-0.3.0/tests/integration/test_prompts.py +117 -0
  16. mcp_dbutils-0.2.11/.github/workflows/publish.yml +0 -33
  17. mcp_dbutils-0.2.11/CHANGELOG.md +0 -158
  18. mcp_dbutils-0.2.11/tests/integration/test_prompts.py +0 -41
  19. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/.coveragerc +0 -0
  20. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/.github/workflows/test.yml +0 -0
  21. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/.gitignore +0 -0
  22. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/Dockerfile +0 -0
  23. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/LICENSE +0 -0
  24. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/config.yaml.example +0 -0
  25. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/smithery.yaml +0 -0
  26. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/config.py +0 -0
  27. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/postgres/__init__.py +0 -0
  28. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/postgres/config.py +0 -0
  29. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/sqlite/__init__.py +0 -0
  30. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/sqlite/config.py +0 -0
  31. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/src/mcp_dbutils/stats.py +0 -0
  32. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/tests/conftest.py +0 -0
  33. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/tests/integration/test_monitoring.py +0 -0
  34. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/tests/integration/test_sqlite.py +0 -0
  35. {mcp_dbutils-0.2.11 → mcp_dbutils-0.3.0}/tests/unit/test_stats.py +0 -0
@@ -0,0 +1,49 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ concurrency: release
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/p/mcp-dbutils
15
+ permissions:
16
+ id-token: write
17
+ contents: write
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v4
26
+ with:
27
+ python-version: '3.10'
28
+
29
+ - name: Install tools
30
+ run: |
31
+ curl -LsSf https://astral.sh/uv/install.sh | sh
32
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
33
+
34
+ - name: Determine Version and Create Release
35
+ id: version
36
+ uses: python-semantic-release/python-semantic-release@master
37
+ with:
38
+ github_token: ${{ secrets.GITHUB_TOKEN }}
39
+ build: false
40
+
41
+ - name: Build Package
42
+ if: steps.version.outputs.released == 'true'
43
+ run: |
44
+ which uv
45
+ uv build
46
+
47
+ - name: Publish to PyPI
48
+ if: steps.version.outputs.released == 'true'
49
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,601 @@
1
+ # CHANGELOG
2
+
3
+
4
+ ## v0.3.0 (2025-02-16)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Fix pkg_meta reference error in DatabaseServer
9
+ ([`9bcc607`](https://github.com/donghao1393/mcp-dbutils/commit/9bcc607378df09fee8ef301c1ce0247f419c2dab))
10
+
11
+ - Move pkg_meta initialization before its usage - Add comment to clarify the purpose of pkg_meta -
12
+ Fix the variable reference error that caused server startup failure
13
+
14
+ - Fix prompts/list timeout by using correct decorator pattern
15
+ ([`227f86d`](https://github.com/donghao1393/mcp-dbutils/commit/227f86db4c050439a382118df1bc62944f35aea4))
16
+
17
+ - Update Server initialization with version - Simplify list_prompts handler to return raw data - Add
18
+ comprehensive error handling in tests - Add debug logging for better traceability
19
+
20
+ - Unify logger naming across the project
21
+ ([`088e60b`](https://github.com/donghao1393/mcp-dbutils/commit/088e60becb7112dc0a5da256b56d0f79ed1db223))
22
+
23
+ - Use package metadata for logger names - Add consistent naming hierarchy: - Root: mcp-dbutils -
24
+ Server: mcp-dbutils.server - Handler: mcp-dbutils.handler.<database> - Database:
25
+ mcp-dbutils.db.<type> - Remove hardcoded server names
26
+
27
+ - Unify prompts handler registration and remove duplicate init options
28
+ ([`6031592`](https://github.com/donghao1393/mcp-dbutils/commit/60315922b052f252005ed77fd3978d8cff085056))
29
+
30
+ - Use package metadata for server name and version
31
+ ([`7f48a6d`](https://github.com/donghao1393/mcp-dbutils/commit/7f48a6df50830d58c534495fc7bfc9198e9fbcc5))
32
+
33
+ - Replace hardcoded server name and version with values from pyproject.toml - Add importlib.metadata
34
+ to read package information - Ensure consistent versioning across the project
35
+
36
+ ### Build System
37
+
38
+ - Simplify semantic-release configuration
39
+ ([`0f37153`](https://github.com/donghao1393/mcp-dbutils/commit/0f37153a0d7205238d0f43c16c97a390a3e368df))
40
+
41
+ - Remove __version__ variable reference - Change build command to use uv build - Keep version
42
+ management in pyproject.toml only
43
+
44
+ ### Code Style
45
+
46
+ - Unify log timestamp format with MCP framework
47
+ ([`c341fb1`](https://github.com/donghao1393/mcp-dbutils/commit/c341fb1d05144c5c925fed25bfcd69be55ee7803))
48
+
49
+ - Use milliseconds precision in log timestamps to match MCP framework
50
+ ([`2aae2fd`](https://github.com/donghao1393/mcp-dbutils/commit/2aae2fd06bf9b505105fd6b0671d70ba7dfef0f5))
51
+
52
+ ### Continuous Integration
53
+
54
+ - Add automatic release
55
+ ([`b69e242`](https://github.com/donghao1393/mcp-dbutils/commit/b69e2429857824f0807eb76baccbbdf855c89e45))
56
+
57
+ - Add GitHub Actions workflow for automatic releases - Configure release triggers - Set up
58
+ permissions - Use python-semantic-release action
59
+
60
+ - Add uv installation to release workflow
61
+ ([`62e0362`](https://github.com/donghao1393/mcp-dbutils/commit/62e036254cc1af6d1a1a3028838652365a528c53))
62
+
63
+ - Install uv before running semantic-release - Add uv binary to GitHub PATH - Ensure build command
64
+ can be executed
65
+
66
+ - Improve release workflow
67
+ ([`07128a0`](https://github.com/donghao1393/mcp-dbutils/commit/07128a0ea7687963531e1aada24cc4083540272f))
68
+
69
+ - Separate version determination and build steps - Use actions/setup-python for Python environment -
70
+ Disable automatic build in semantic-release - Add manual build step using uv - Fix invalid action
71
+ parameters
72
+
73
+ - Improve release workflow reliability
74
+ ([`4dac367`](https://github.com/donghao1393/mcp-dbutils/commit/4dac36749917b0d3fec94de5bcce1b5b0295e94f))
75
+
76
+ - Disable build in semantic-release - Add debug command to verify uv installation - Keep using uv
77
+ for package building - Ensure PATH is properly set
78
+
79
+ - Integrate PyPI publishing into release workflow
80
+ ([`2ebd3f3`](https://github.com/donghao1393/mcp-dbutils/commit/2ebd3f327748fc78dd7e33e366517120260b3d3b))
81
+
82
+ - Add upload_to_pypi option to semantic-release action - Enable build in semantic-release - Remove
83
+ separate publish workflow - Simplify release process
84
+
85
+ - Update publish workflow trigger
86
+ ([`26a6d79`](https://github.com/donghao1393/mcp-dbutils/commit/26a6d79eb8940cde6fb61ebe601754a1d8f22f0b))
87
+
88
+ - Add 'created' event type to release trigger - Support automatic PyPI publishing when
89
+ semantic-release creates a release - Keep 'published' event for manual releases
90
+
91
+ - Update release workflow for trusted publishing
92
+ ([`8297cb8`](https://github.com/donghao1393/mcp-dbutils/commit/8297cb88b496c55d1f84355ed1a015ebf80a2c42))
93
+
94
+ - Add PyPI environment configuration - Use correct PyPI publish action version - Configure trusted
95
+ publishing permissions - Add PyPI project URL
96
+
97
+ ### Documentation
98
+
99
+ - Unify server name in configuration examples
100
+ ([`5380898`](https://github.com/donghao1393/mcp-dbutils/commit/538089864e1cef72b0560ff369f30530f4358944))
101
+
102
+ - Change server name from 'dbutils' to 'mcp-dbutils' in all examples - Keep consistent with package
103
+ name and version in pyproject.toml - Update both English and Chinese documentation
104
+
105
+ ### Features
106
+
107
+ - Add database type to error messages
108
+ ([`cf8d53b`](https://github.com/donghao1393/mcp-dbutils/commit/cf8d53baaee247fa6313ab6d0766144f9a3f0024))
109
+
110
+ - Add database type to query results
111
+ ([`0cebfd9`](https://github.com/donghao1393/mcp-dbutils/commit/0cebfd99ffc9201c82a85d0b8e82ba59fa4a958e))
112
+
113
+ - Add version info to startup log
114
+ ([`dc06741`](https://github.com/donghao1393/mcp-dbutils/commit/dc06741fce536884c1aeebd19838877c5901a546))
115
+
116
+
117
+ ## v0.2.11 (2025-02-15)
118
+
119
+ ### Chores
120
+
121
+ - Bump version to 0.2.11
122
+ ([`96b023f`](https://github.com/donghao1393/mcp-dbutils/commit/96b023ff6bae3a643401b639c86403e7ac31df07))
123
+
124
+ ### Features
125
+
126
+ - Implement basic prompts support and list handler
127
+ ([`397e71a`](https://github.com/donghao1393/mcp-dbutils/commit/397e71abca7286626c4eec4482e13ead83871e3a))
128
+
129
+
130
+ ## v0.2.10 (2025-02-15)
131
+
132
+ ### Documentation
133
+
134
+ - Update CHANGELOG for version 0.2.10
135
+ ([`f3a6d4e`](https://github.com/donghao1393/mcp-dbutils/commit/f3a6d4ef0ce8c5fcbb0abf9b0b210447c40ce2c4))
136
+
137
+ ### Features
138
+
139
+ - Add resource monitoring system
140
+ ([`f3ff859`](https://github.com/donghao1393/mcp-dbutils/commit/f3ff859a57c7bb046725a6ee9dd746e06bb488ff))
141
+
142
+ - Add ResourceStats for resource usage tracking - Improve database handlers using template method
143
+ pattern - Implement connection lifecycle monitoring - Add error pattern analysis - Output
144
+ monitoring data through stderr
145
+
146
+ ### Testing
147
+
148
+ - Add tests for resource monitoring system
149
+ ([`ab9a644`](https://github.com/donghao1393/mcp-dbutils/commit/ab9a644bdae750831a9792bda157813eb9ab5ed1))
150
+
151
+ - Add unit tests for ResourceStats - Add integration tests for monitoring - Adjust base handler for
152
+ better testability
153
+
154
+
155
+ ## v0.2.9 (2025-02-15)
156
+
157
+ ### Bug Fixes
158
+
159
+ - Fix logger function calls
160
+ ([`9b9fe45`](https://github.com/donghao1393/mcp-dbutils/commit/9b9fe45b60c74c7e14d7978b011f5c8b2399892d))
161
+
162
+ - Update logger calls to match create_logger function interface - Fix debug log calls in get_handler
163
+ method
164
+
165
+ - Fix logging and variable initialization
166
+ ([`8f68320`](https://github.com/donghao1393/mcp-dbutils/commit/8f68320f13b7e5ca9bf6bb669a0212d0f705367b))
167
+
168
+ - Rename log to logger in DatabaseServer for consistency - Initialize handler variable before try
169
+ block to avoid UnboundLocalError - Fix logger reference in cleanup code
170
+
171
+ - Update handlers to use custom exceptions
172
+ ([`02eb55c`](https://github.com/donghao1393/mcp-dbutils/commit/02eb55c8e4305043b09d8dc1ee4ece78a50c187c))
173
+
174
+ - Update PostgreSQL handler to use DatabaseError - Update SQLite handler to use DatabaseError - Add
175
+ specific error messages for non-SELECT queries - Improve error handling and logging
176
+
177
+ ### Documentation
178
+
179
+ - Update changelog for v0.2.9
180
+ ([`0ccc28e`](https://github.com/donghao1393/mcp-dbutils/commit/0ccc28e926e54d7fad84f74dce36fcad75bfd7f0))
181
+
182
+ ### Features
183
+
184
+ - Optimize database type handling and error system
185
+ ([`045b62d`](https://github.com/donghao1393/mcp-dbutils/commit/045b62d9a325304248252a86294766debc97590e))
186
+
187
+ - Remove redundant type detection based on path/dbname - Use explicit 'type' field from
188
+ configuration - Add custom exception hierarchy - Enhance logging system
189
+
190
+ ### Testing
191
+
192
+ - Update test cases for custom exceptions
193
+ ([`93ef088`](https://github.com/donghao1393/mcp-dbutils/commit/93ef0889e00b37aaeedc83f4e3ba8debcb897100))
194
+
195
+ - Update test_postgres.py to use DatabaseError - Update test_sqlite.py to use DatabaseError - Fix
196
+ error message assertions for non-SELECT queries
197
+
198
+
199
+ ## v0.2.8 (2025-02-15)
200
+
201
+ ### Bug Fixes
202
+
203
+ - Properly remove all await on mcp_config
204
+ ([`6153277`](https://github.com/donghao1393/mcp-dbutils/commit/6153277f06f404fbd8b8cd851f54024d706b4c05))
205
+
206
+ - Remove await on mcp_config in tests
207
+ ([`e917226`](https://github.com/donghao1393/mcp-dbutils/commit/e917226b5dd23c6eb07200912e7d25f6c73135a2))
208
+
209
+ - Fix type error 'dict' object is not an async iterator - Update both postgres and sqlite tests -
210
+ Remove unnecessary awaits on mcp_config fixture
211
+
212
+ - Remove custom event_loop fixture
213
+ ([`159f9e9`](https://github.com/donghao1393/mcp-dbutils/commit/159f9e9b86c7979061ffca3cf466ae81f642d67a))
214
+
215
+ - Remove custom event_loop fixture to use pytest-asyncio's default - Revert pyproject.toml changes
216
+ to minimize modifications - Fix pytest-asyncio deprecation warning
217
+
218
+ - Use pytest_asyncio.fixture for async fixtures
219
+ ([`ea08512`](https://github.com/donghao1393/mcp-dbutils/commit/ea0851208b5c84331df50c6a1261acc24dbe7070))
220
+
221
+ - Replace @pytest.fixture with @pytest_asyncio.fixture for async fixtures - Keep original
222
+ @pytest.fixture for non-async event_loop - Fix pytest-asyncio deprecation warnings
223
+
224
+ ### Chores
225
+
226
+ - Bump version to 0.2.8
227
+ ([`d72cf52`](https://github.com/donghao1393/mcp-dbutils/commit/d72cf5272324cdb5164291b91139e537a07980db))
228
+
229
+ - Update version in pyproject.toml - Add 0.2.8 changelog entry for test improvements - Document
230
+ pytest-asyncio configuration changes
231
+
232
+ - Configure pytest-asyncio fixture loop scope
233
+ ([`d8ca223`](https://github.com/donghao1393/mcp-dbutils/commit/d8ca22318609cff81fa2b1bd0a308cf97d3a7558))
234
+
235
+ - Set asyncio_mode to strict - Set asyncio_default_fixture_loop_scope to function - Fix
236
+ pytest-asyncio configuration warning
237
+
238
+ - Configure pytest-asyncio mode to auto
239
+ ([`7898f61`](https://github.com/donghao1393/mcp-dbutils/commit/7898f61b960f74c4a3ca42366eb6004a6ca6d070))
240
+
241
+ - Add pytest config to remove asyncio warning - Set asyncio_mode to auto in tool.pytest.ini_options
242
+
243
+
244
+ ## v0.2.7 (2025-02-15)
245
+
246
+ ### Bug Fixes
247
+
248
+ - Add venv creation in CI workflow
249
+ ([`386faec`](https://github.com/donghao1393/mcp-dbutils/commit/386faec3213a7cd4ce7e14a43225f005f3f28702))
250
+
251
+ - Update coverage badge configuration
252
+ ([`c6bc9bd`](https://github.com/donghao1393/mcp-dbutils/commit/c6bc9bdee4006fc8dd2d3e4dcf9111ce4ad104b0))
253
+
254
+ - Update to dynamic-badges-action v1.7.0 - Ensure integer percentage value - Add proper quotes to
255
+ parameters
256
+
257
+ ### Features
258
+
259
+ - Add coverage badge to README
260
+ ([`20435d8`](https://github.com/donghao1393/mcp-dbutils/commit/20435d87c657413d656cf61abb5e16bcf6fc0300))
261
+
262
+ - Added coverage badge generation in CI workflow - Added coverage badge to README - Updated
263
+ CHANGELOG.md
264
+
265
+ - Add Github Actions workflow for automated testing
266
+ ([`355a863`](https://github.com/donghao1393/mcp-dbutils/commit/355a863193ead9d21d928c21453e64c67e71d760))
267
+
268
+ - Added GitHub Actions workflow for test automation - Added PostgreSQL service in CI environment -
269
+ Added detailed test and coverage reporting - Bump version to 0.2.7
270
+
271
+
272
+ ## v0.2.6 (2025-02-12)
273
+
274
+ ### Features
275
+
276
+ - Add test coverage reporting
277
+ ([`93fe2f7`](https://github.com/donghao1393/mcp-dbutils/commit/93fe2f73dc472c8e8b5e7eb0a1b65879c806aa8a))
278
+
279
+ - Added pytest-cov for test coverage tracking - Added .coveragerc configuration - HTML coverage
280
+ report generation - Updated .gitignore for coverage files - Updated CHANGELOG.md - Bump version to
281
+ 0.2.6
282
+
283
+
284
+ ## v0.2.5 (2025-02-12)
285
+
286
+ ### Documentation
287
+
288
+ - Enhance Docker documentation with database connection details
289
+ ([`af42c97`](https://github.com/donghao1393/mcp-dbutils/commit/af42c97259eb9a5f5f2d135f8bac9690029fa843))
290
+
291
+ - Add examples for SQLite database file mapping - Document host PostgreSQL connection from container
292
+ - Provide configuration examples for different OS environments - Add notes about
293
+ host.docker.internal and network settings
294
+
295
+ - Show real-time chart on readme
296
+ ([`704e5fd`](https://github.com/donghao1393/mcp-dbutils/commit/704e5fde808b996f00b51c1f534073e262c94384))
297
+
298
+ - Update changelog for v0.2.5
299
+ ([`cb71c83`](https://github.com/donghao1393/mcp-dbutils/commit/cb71c831193c7b0758592075271d90ff48b00c94))
300
+
301
+ ### Features
302
+
303
+ - Add initial automated tests
304
+ ([`935a77b`](https://github.com/donghao1393/mcp-dbutils/commit/935a77b0d5076fe141a92128eeabc249ff3489c8))
305
+
306
+ - Add integration tests for PostgreSQL and SQLite handlers: * Table listing and schema querying *
307
+ SELECT query execution and result formatting * Non-SELECT query rejection * Error handling for
308
+ invalid queries - Configure test fixtures and environments in conftest.py - Set up pytest
309
+ configurations in pyproject.toml - Update .gitignore to exclude memory-bank folder for cline
310
+
311
+ Tests verify core functionality while adhering to read-only requirements.
312
+
313
+
314
+ ## v0.2.4 (2025-02-09)
315
+
316
+ ### Documentation
317
+
318
+ - Major documentation improvements and version 0.2.4
319
+ ([`7a9404a`](https://github.com/donghao1393/mcp-dbutils/commit/7a9404ad513d4b1f65f9c74f6a3eac0ea43058c9))
320
+
321
+ - Unified server configuration name to "dbutils" - Added architecture diagrams in both English and
322
+ Chinese - Enhanced installation instructions with environment variables - Added contributing
323
+ guidelines - Added acknowledgments section - Updated badges and improved formatting - Bump version
324
+ to 0.2.4
325
+
326
+
327
+ ## v0.2.3 (2025-02-09)
328
+
329
+ ### Bug Fixes
330
+
331
+ - Remove uv cache dependency in GitHub Actions
332
+ ([`a68f32e`](https://github.com/donghao1393/mcp-dbutils/commit/a68f32e5515ca6b6253442d74a5b9112e7ebf852))
333
+
334
+ - Remove cache-dependency-glob parameter - Disable uv cache to avoid dependency on uv.lock file
335
+
336
+ ### Chores
337
+
338
+ - Bump version to 0.2.3
339
+ ([`771e01e`](https://github.com/donghao1393/mcp-dbutils/commit/771e01efcf8ecb32c85b133836d5f179a0f2ce08))
340
+
341
+ - Update version in pyproject.toml - Add version 0.2.3 to CHANGELOG.md - Document installation
342
+ guides, internationalization, and CI/CD additions
343
+
344
+ ### Continuous Integration
345
+
346
+ - Add PyPI publishing workflow
347
+ ([`ae5f334`](https://github.com/donghao1393/mcp-dbutils/commit/ae5f334190091207302a258311172804fd25ac16))
348
+
349
+ - Create .github/workflows/publish.yml - Configure uv environment using astral-sh/setup-uv@v4 - Set
350
+ up automatic build and PyPI publishing - Enable trusted publishing mechanism
351
+
352
+ ### Documentation
353
+
354
+ - Add MIT license and update project metadata
355
+ ([`f98e656`](https://github.com/donghao1393/mcp-dbutils/commit/f98e656804d279bb53e193bfa87bfd1cd240e0db))
356
+
357
+ - Update installation guide and add English README
358
+ ([`a4e60e0`](https://github.com/donghao1393/mcp-dbutils/commit/a4e60e0e792e34a4f327fe8a49e1a24a430b2abb))
359
+
360
+ - Add installation methods (uvx/pip/docker) - Update configuration examples for each installation
361
+ method - Create English README with badges - Update project name to mcp-dbutils - Add
362
+ cross-references between Chinese and English docs
363
+
364
+ - Update version to 0.2.2 and add CHANGELOG
365
+ ([`381c69b`](https://github.com/donghao1393/mcp-dbutils/commit/381c69bf31af5f58d96f871de0088214cc77ca48))
366
+
367
+ - 添加中文readme文档
368
+ ([`a3737b9`](https://github.com/donghao1393/mcp-dbutils/commit/a3737b995857b414c5ba40f1958f2b7b9b2aa65d))
369
+
370
+ - 添加README_CN.md详细说明项目功能和使用方法 - 重点解释抽象层设计理念和架构 - 包含配置示例和使用示范 - 提供完整的API文档
371
+
372
+
373
+ ## v0.2.2 (2025-02-09)
374
+
375
+ ### Bug Fixes
376
+
377
+ - Add missing Path import in sqlite server
378
+ ([`fb35c1a`](https://github.com/donghao1393/mcp-dbutils/commit/fb35c1a56531456ca27319922b20efe14381b38d))
379
+
380
+ - Add pathlib import for Path usage in SQLite server - Fix code formatting
381
+
382
+ - Automatic database type detection from config
383
+ ([`9b69882`](https://github.com/donghao1393/mcp-dbutils/commit/9b698824acc721cd697325ff0c601e11cd68ef33))
384
+
385
+ - Remove --type argument and detect db type from config - Unify configuration handling for both
386
+ postgres and sqlite - Detect db type based on config parameters - Update SqliteServer to match
387
+ PostgresServer interface
388
+
389
+ ### Features
390
+
391
+ - Add explicit database type declaration and awareness
392
+ ([`2d47804`](https://github.com/donghao1393/mcp-dbutils/commit/2d47804ca917e2f59b0832a7a6c92789fc97f0b8))
393
+
394
+ 1. Add required 'type' field to configs to explicitly declare database type 2. Standardize field
395
+ naming, rename 'db_path' to 'path' 3. Include database type and config name in query results 4.
396
+ Restructure response format to unify normal results and error messages
397
+
398
+ This change enables LLMs to be aware of the database type in use, allowing them to auto-correct when
399
+ incorrect SQL syntax is detected.
400
+
401
+ - Add password support for sqlite databases
402
+ ([`537f1dc`](https://github.com/donghao1393/mcp-dbutils/commit/537f1dc96291ed57dbe7a52c9c7a80a868270152))
403
+
404
+ - Support password-protected SQLite databases in config - Use URI connection string for SQLite with
405
+ password - Update connection handling and parameter passing - Add password masking in logs
406
+
407
+ - Remove required --database argument and enhance logging
408
+ ([`9b49ac7`](https://github.com/donghao1393/mcp-dbutils/commit/9b49ac70e88a8c1d0469cdb36ae8608fd01ccaaa))
409
+
410
+ - Remove mandatory --database argument - Add connection status monitoring for all databases - Add
411
+ automatic retry mechanism with configurable interval - Add MCP_DB_RETRY_INTERVAL environment
412
+ variable (default: 1800s) - Add proper MCP_DEBUG support - Remove duplicated code - Improve
413
+ logging for connection status changes
414
+
415
+ - Standardize logging
416
+ ([`df264b5`](https://github.com/donghao1393/mcp-dbutils/commit/df264b55aed6341778f860e05072306cbb24388d))
417
+
418
+ - Use standardized logging mechanism from log.py
419
+
420
+ - **sqlite**: Add support for dynamic database switching
421
+ ([`3f71de0`](https://github.com/donghao1393/mcp-dbutils/commit/3f71de0d220eca8252f325b264ccaa401fd71646))
422
+
423
+ - Add config_path parameter to SQLite server initialization - Add optional database parameter to
424
+ query tool - Implement dynamic database switching in call_tool method - Keep interface consistent
425
+ with PostgreSQL server
426
+
427
+ ### Refactoring
428
+
429
+ - Redesign database server architecture for dynamic database switching
430
+ ([`7f0a7b9`](https://github.com/donghao1393/mcp-dbutils/commit/7f0a7b92561baf357b67aa5596b6842659a934bb))
431
+
432
+ - Add DatabaseHandler base class for individual database connections - Move database operations from
433
+ server to handlers - Implement on-demand database handler creation and cleanup - Simplify server
434
+ initialization and configuration - Make database parameter required in query tool - Remove the
435
+ remaining mcp_postgres directories and files
436
+
437
+ - Remove default database connection behavior
438
+ ([`45fe01c`](https://github.com/donghao1393/mcp-dbutils/commit/45fe01c1ae27cde43843e410c45826565a18fe50))
439
+
440
+ - Remove default database concept from base implementation - Require explicit database specification
441
+ for all operations - Convert PostgreSQL handler from connection pool to per-operation connections
442
+ - Remove immediate connection testing in handlers - Fix resource cleanup in PostgreSQL handler
443
+
444
+
445
+ ## v0.2.1 (2025-02-09)
446
+
447
+ ### Bug Fixes
448
+
449
+ - Correct stdio transport initialization in base class
450
+ ([`e9558c2`](https://github.com/donghao1393/mcp-dbutils/commit/e9558c20523d157461054442f8e3dedfb4cb930e))
451
+
452
+ - Remove non-existent create_stdio_transport method - Use stdio_server directly from
453
+ mcp.server.stdio
454
+
455
+ ### Features
456
+
457
+ - Add base classes and shared configurations
458
+ ([`bd82bfc`](https://github.com/donghao1393/mcp-dbutils/commit/bd82bfc1a5145df4664758b87c35ecd917f99f1a))
459
+
460
+ - Add DatabaseServer abstract base class - Add DatabaseConfig abstract base class - Update main
461
+ entry point to support multiple database types - Implement shared configuration utilities
462
+
463
+ - Add sqlite database support
464
+ ([`7d0afb3`](https://github.com/donghao1393/mcp-dbutils/commit/7d0afb37d9711c627761699fe04185e1735969b0))
465
+
466
+ - Add SqliteConfig for SQLite configuration - Add SqliteServer implementation with basic query
467
+ features - Support table schema inspection and listing - Match existing PostgreSQL feature set
468
+ where applicable
469
+
470
+ ### Refactoring
471
+
472
+ - Update postgres code to use base classes
473
+ ([`51146f4`](https://github.com/donghao1393/mcp-dbutils/commit/51146f4882ff028705565ba8410f4bbd6c61c67e))
474
+
475
+ - Inherit PostgresConfig from base DatabaseConfig - Implement abstract methods in PostgresServer -
476
+ Move postgres-specific code to postgres module - Update connection and query handling
477
+
478
+
479
+ ## v0.2.0 (2025-02-08)
480
+
481
+ ### Refactoring
482
+
483
+ - Rename project to mcp-dbutils and restructure directories
484
+ ([`ddf3cea`](https://github.com/donghao1393/mcp-dbutils/commit/ddf3cea41d9368eed11cb5b7a3551b1abd058c9e))
485
+
486
+ - Rename project from mcp-postgres to mcp-dbutils - Update project description to reflect
487
+ multi-database support - Create directories for postgres and sqlite modules - Move existing files
488
+ to new structure
489
+
490
+
491
+ ## v0.1.1 (2025-02-08)
492
+
493
+
494
+ ## v0.1.0 (2025-02-08)
495
+
496
+ ### Bug Fixes
497
+
498
+ - Adjust database connection handling
499
+ ([`060354a`](https://github.com/donghao1393/mcp-dbutils/commit/060354a5f681ba67da46488705f877a8ac9fc45f))
500
+
501
+ - Split connection parameters to fix VPN connection issue - Refactor connection pool creation based
502
+ on working example - Add better error logging for connection failures - Remove trailing spaces
503
+
504
+ - Correct logger function usage
505
+ ([`cbace7c`](https://github.com/donghao1393/mcp-dbutils/commit/cbace7cf8226d87c36bc5bf3aadda383e0f1abff))
506
+
507
+ - Fix logger function calls to match the custom logger implementation - Change logger.warning/warn
508
+ to direct function calls with level parameter - Maintain consistent logging format across the
509
+ application
510
+
511
+ This fixes the AttributeError related to logger function calls
512
+
513
+ - Correct package installation and command line args
514
+ ([`dfba347`](https://github.com/donghao1393/mcp-dbutils/commit/dfba34759393090c4fa728b4a72ad2d34d18f70c))
515
+
516
+ - Add proper pyproject.toml configuration - Fix module import path issues - Update argument handling
517
+ in server
518
+
519
+ - Remove required db-name parameter and add auto-selection
520
+ ([`482cfa3`](https://github.com/donghao1393/mcp-dbutils/commit/482cfa336e31f417187c255ebbcaa45c1a8ba4e9))
521
+
522
+ - Remove required flag from db-name argument - Add auto-selection of first available database when
523
+ db-name not specified - Keep connection check for all configured databases - Add logging for
524
+ database connection status - Maintain backwards compatibility with manual db selection
525
+
526
+ ### Features
527
+
528
+ - Add connection check for all configured databases
529
+ ([`162b5ba`](https://github.com/donghao1393/mcp-dbutils/commit/162b5baabe851f690406a60b4f349abb402bfc7d))
530
+
531
+ - Add connection check for all databases at startup - Continue if some databases fail but at least
532
+ one succeeds - Add detailed connection status logging - Make database name parameter required -
533
+ Improve error messages with connection status details
534
+
535
+ - Initialize Postgres MCP server
536
+ ([`f91a8bc`](https://github.com/donghao1393/mcp-dbutils/commit/f91a8bc6d16a2d53bdf53ccc05229cade8e9e573))
537
+
538
+ - Support local host override for VPN environments - Add connection pool management - Implement
539
+ schema inspection and read-only query tools - Add configuration separation for better
540
+ maintainability
541
+
542
+ - Support multiple database configurations in YAML
543
+ ([`cdeaa02`](https://github.com/donghao1393/mcp-dbutils/commit/cdeaa024eac5469caeb978d0ab455bb264006c4b))
544
+
545
+ - Restructure YAML format to support multiple database targets - Add database selection by name
546
+ (dev-db, test-db etc) - Support default database configuration - Add validation for database
547
+ configuration selection
548
+
549
+ ### Refactoring
550
+
551
+ - Combine database tools into single query_db tool
552
+ ([`78437c7`](https://github.com/donghao1393/mcp-dbutils/commit/78437c79ec3f1da65e3e96622f1df02c9b7d56da))
553
+
554
+ - Merge database profile selection and SQL query into one tool - Add database_profile as required
555
+ parameter for query_db tool - Remove separate profile selection step - Simplify tool interaction
556
+ flow - Add proper error handling and validation
557
+
558
+ - Combine database tools into single query_db tool
559
+ ([`602cbd8`](https://github.com/donghao1393/mcp-dbutils/commit/602cbd88407d7faf86ec97d18665ee449f500e61))
560
+
561
+ - Merge database profile selection and SQL query into one tool - Add database_profile as required
562
+ parameter for query_db tool - Remove separate profile selection step - Simplify tool interaction
563
+ flow - Add proper error handling and validation
564
+
565
+ This change simplifies the tool interface while maintaining explicit database selection requirement.
566
+
567
+ - Remove default database config
568
+ ([`9ceaa2f`](https://github.com/donghao1393/mcp-dbutils/commit/9ceaa2f7eefceb0b423325f30b6ec181126cd91f))
569
+
570
+ - Remove default database configuration from YAML - Make database name parameter mandatory - Add
571
+ available database names in error message - Simplify configuration structure
572
+
573
+ This change enforces explicit database selection for better clarity and prevents accidental use of
574
+ wrong database environments.
575
+
576
+ - Reorganize project structure
577
+ ([`dc2eace`](https://github.com/donghao1393/mcp-dbutils/commit/dc2eace23b0a5f23227a7d7599d2bec2836a6338))
578
+
579
+ - Rename package from 'postgres' to 'mcp_postgres' - Add logging support - Improve code organization
580
+
581
+ - Simplify and improve server code
582
+ ([`c56a0a0`](https://github.com/donghao1393/mcp-dbutils/commit/c56a0a011052d4419e5dd4ed1b9173a37fff35c1))
583
+
584
+ - Merge duplicate tool handlers into a single unified handler - Add YAML configuration support with
585
+ multiple database profiles - Improve connection management with proper pool handling - Add masked
586
+ logging for sensitive connection information - Refactor command line arguments for better
587
+ usability
588
+
589
+ - Split database tools and enforce explicit database selection
590
+ ([`2d6bfa3`](https://github.com/donghao1393/mcp-dbutils/commit/2d6bfa3e0779ef42e07dbc8884f2153230ad4f5c))
591
+
592
+ - Add set_database_profile tool with proper decorator - Split handle_call_tool into separate
593
+ handlers for each tool - Add validation for database selection before SQL execution - Update tool
594
+ handlers to return proper MCP response types - Add current database profile tracking
595
+
596
+ - Support YAML config for database connection
597
+ ([`35ac49c`](https://github.com/donghao1393/mcp-dbutils/commit/35ac49c7d9a93e0d5bbd9d741a5660cbc73004d0))
598
+
599
+ - Add YAML config support as an alternative to database URL - Implement PostgresConfig class with
600
+ both YAML and URL parsing - Use anyio for better async compatibility - Keep backward compatibility
601
+ with URL-based configuration - Improve connection parameter handling for special characters
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-dbutils
3
- Version: 0.2.11
3
+ Version: 0.3.0
4
4
  Summary: MCP Database Utilities Service
5
5
  Author: Dong Hao
6
6
  License-Expression: MIT
@@ -62,7 +62,7 @@ uvx mcp-dbutils --config /path/to/config.yaml
62
62
  Add to Claude configuration:
63
63
  ```json
64
64
  "mcpServers": {
65
- "dbutils": {
65
+ "mcp-dbutils": {
66
66
  "command": "uvx",
67
67
  "args": [
68
68
  "mcp-dbutils",
@@ -84,7 +84,7 @@ pip install mcp-dbutils
84
84
  Add to Claude configuration:
85
85
  ```json
86
86
  "mcpServers": {
87
- "dbutils": {
87
+ "mcp-dbutils": {
88
88
  "command": "python",
89
89
  "args": [
90
90
  "-m",
@@ -111,7 +111,7 @@ docker run -i --rm \
111
111
  Add to Claude configuration:
112
112
  ```json
113
113
  "mcpServers": {
114
- "dbutils": {
114
+ "mcp-dbutils": {
115
115
  "command": "docker",
116
116
  "args": [
117
117
  "run",