mcp-win-stdio-db 0.3.0__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mcp-win-stdio-db
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Unified Database Model Context Protocol (MCP) server for PostgreSQL & MySQL: 20 tools for multi-server querying, DBA operations (create, drop, clone, dump, terminate), and cross-schema auto-resolution.
5
5
  Author: Mohan Kumar Indala
6
6
  License-Expression: MIT
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
19
  Classifier: Topic :: Database
20
20
  Requires-Python: >=3.10
21
- Requires-Dist: mcp-win-stdio>=0.3.0
21
+ Requires-Dist: mcp-win-stdio>=0.3.2
22
22
  Requires-Dist: mcp>=1.2.0
23
23
  Requires-Dist: psycopg2-binary>=2.9.0
24
24
  Requires-Dist: pymysql>=1.1.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mcp-win-stdio-db"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "Unified Database Model Context Protocol (MCP) server for PostgreSQL & MySQL: 20 tools for multi-server querying, DBA operations (create, drop, clone, dump, terminate), and cross-schema auto-resolution."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -29,7 +29,7 @@ classifiers = [
29
29
  ]
30
30
 
31
31
  dependencies = [
32
- "mcp-win-stdio>=0.3.0",
32
+ "mcp-win-stdio>=0.3.2",
33
33
  "mcp>=1.2.0",
34
34
  "psycopg2-binary>=2.9.0",
35
35
  "pymysql>=1.1.0",
@@ -41,3 +41,6 @@ mws-db = "mcp_win_stdio.db.cli:main"
41
41
 
42
42
  [tool.hatch.build.targets.wheel]
43
43
  packages = ["src/mcp_win_stdio"]
44
+
45
+ [tool.uv.sources]
46
+ mcp-win-stdio = { workspace = true }
@@ -2,4 +2,4 @@
2
2
  Unified Database MCP Server for mcp-win-stdio (PostgreSQL & MySQL).
3
3
  """
4
4
 
5
- __version__ = "0.3.0"
5
+ __version__ = "0.3.2"
@@ -1780,7 +1780,7 @@ def read_query(
1780
1780
  sql: str,
1781
1781
  params: Optional[List[Any]] = None,
1782
1782
  limit: int = 50,
1783
- max_cell_chars: int = 500,
1783
+ max_cell_chars: int = 2000,
1784
1784
  connection: Optional[str] = None,
1785
1785
  server: Optional[str] = None,
1786
1786
  ) -> Dict[str, Any]:
@@ -1792,7 +1792,7 @@ def read_query(
1792
1792
  sql: SELECT SQL query.
1793
1793
  params: Optional query parameters.
1794
1794
  limit: Max rows to return (default 50, max 200).
1795
- max_cell_chars: Max characters per cell (default 500).
1795
+ max_cell_chars: Max characters per cell (default 2000, increase up to 50000 for large string_agg/JSON values).
1796
1796
  connection: Optional target database connection or server alias.
1797
1797
  server: Optional server or connection alias.
1798
1798
  """
@@ -1931,18 +1931,32 @@ def execute_query(
1931
1931
 
1932
1932
  rowcount = cur.rowcount
1933
1933
  status = cur.statusmessage or "SUCCESS"
1934
+ returned_rows = None
1935
+ if cur.description:
1936
+ try:
1937
+ raw_fetched = cur.fetchmany(100)
1938
+ returned_rows = [_truncate_row(r, 2000) for r in raw_fetched]
1939
+ except Exception:
1940
+ pass
1941
+
1934
1942
  if dry_run:
1935
1943
  conn.rollback()
1936
- return {
1944
+ res_obj = {
1937
1945
  "connection": info["name"],
1938
1946
  "dryRun": True,
1939
1947
  "status": "SUCCESS (ROLLED BACK)",
1940
1948
  "rowCount": rowcount,
1941
1949
  "statusMessage": status,
1942
1950
  }
1951
+ if returned_rows is not None:
1952
+ res_obj["returned_rows"] = returned_rows
1953
+ return res_obj
1943
1954
  else:
1944
1955
  conn.commit()
1945
- return {"connection": info["name"], "status": status, "rowCount": rowcount}
1956
+ res_obj = {"connection": info["name"], "status": status, "rowCount": rowcount}
1957
+ if returned_rows is not None:
1958
+ res_obj["returned_rows"] = returned_rows
1959
+ return res_obj
1946
1960
  except Exception as e:
1947
1961
  try:
1948
1962
  conn.rollback()