sql-query-mcp 0.1.2__tar.gz → 0.1.4__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 (34) hide show
  1. {sql_query_mcp-0.1.2/sql_query_mcp.egg-info → sql_query_mcp-0.1.4}/PKG-INFO +40 -30
  2. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/README.md +39 -29
  3. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/pyproject.toml +1 -1
  4. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/__init__.py +1 -1
  5. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4/sql_query_mcp.egg-info}/PKG-INFO +40 -30
  6. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/LICENSE +0 -0
  7. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/setup.cfg +0 -0
  8. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/__main__.py +0 -0
  9. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/adapters/__init__.py +0 -0
  10. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/adapters/mysql.py +0 -0
  11. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/adapters/postgres.py +0 -0
  12. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/app.py +0 -0
  13. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/audit.py +0 -0
  14. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/config.py +0 -0
  15. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/errors.py +0 -0
  16. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/executor.py +0 -0
  17. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/introspection.py +0 -0
  18. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/namespace.py +0 -0
  19. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/registry.py +0 -0
  20. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/release_metadata.py +0 -0
  21. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp/validator.py +0 -0
  22. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp.egg-info/SOURCES.txt +0 -0
  23. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp.egg-info/dependency_links.txt +0 -0
  24. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp.egg-info/entry_points.txt +0 -0
  25. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp.egg-info/requires.txt +0 -0
  26. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/sql_query_mcp.egg-info/top_level.txt +0 -0
  27. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_audit.py +0 -0
  28. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_config.py +0 -0
  29. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_executor.py +0 -0
  30. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_metadata.py +0 -0
  31. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_namespace.py +0 -0
  32. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_registry.py +0 -0
  33. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_release_metadata.py +0 -0
  34. {sql_query_mcp-0.1.2 → sql_query_mcp-0.1.4}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-query-mcp
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Read-only SQL MCP server for PostgreSQL and MySQL.
5
5
  Author: Andy Wang
6
6
  License-Expression: MIT
@@ -102,51 +102,61 @@ implementation.
102
102
 
103
103
  ## Quick start
104
104
 
105
- If you want to get the server running first and explore the rest later, follow
106
- these steps.
105
+ `sql-query-mcp` supports two official PyPI-based setup modes. Both are intended
106
+ for real usage, not just local testing.
107
107
 
108
- 1. Create a virtual environment and install the project.
108
+ 1. Choose how you want your MCP client to start the server.
109
+
110
+ Use installed command mode if you want a simple local command after one
111
+ install.
109
112
 
110
113
  ```bash
111
- python3.10 -m venv .venv
112
- source .venv/bin/activate
113
- python -m pip install --upgrade pip
114
- pip install sql-query-mcp
114
+ pipx install sql-query-mcp
115
115
  ```
116
116
 
117
- Install a specific release with `pip install sql-query-mcp==X.Y.Z` if you want
118
- to pin a version. Published release artifacts are also attached to each GitHub
119
- Release.
120
-
121
- 2. Copy the example connection config.
117
+ Use managed launch mode if you want the package source declared directly in
118
+ your MCP client config.
122
119
 
123
120
  ```bash
124
- cp config/connections.example.json config/connections.json
121
+ pipx run --spec sql-query-mcp sql-query-mcp
125
122
  ```
126
123
 
127
- 3. Export your database DSNs as environment variables.
124
+ Pin a version with `pipx install 'sql-query-mcp==X.Y.Z'` or
125
+ `pipx run --spec 'sql-query-mcp==X.Y.Z' sql-query-mcp`. Upgrade installed
126
+ command mode with `pipx upgrade sql-query-mcp`.
128
127
 
129
- These example names match the copied `config/connections.example.json` file.
128
+ 2. Create a config file.
129
+
130
+ The server configuration should live outside the repository so the same file
131
+ works with either startup mode.
130
132
 
131
133
  ```bash
132
- export PG_CONN_CRM_PROD_MUQIAO_RO='postgresql://user:password@host:5432/dbname'
133
- export MYSQL_CONN_CRM_PROD_MUQIAO_RO='mysql://user:password@host:3306/crm'
134
- export SQL_QUERY_MCP_CONFIG='/absolute/path/to/sql-query-mcp/config/connections.json'
134
+ mkdir -p ~/.config/sql-query-mcp
135
135
  ```
136
136
 
137
- 4. Register the server in your MCP client.
137
+ Then save the example JSON later in this section as
138
+ `~/.config/sql-query-mcp/connections.json`.
139
+
140
+ 3. Register the server in your MCP client.
138
141
 
139
142
  - Codex: `docs/codex-setup.md` (Chinese)
140
143
  - OpenCode: `docs/opencode-setup.md` (Chinese)
141
144
 
145
+ Installed command mode means your client runs `sql-query-mcp` directly.
146
+ Managed launch mode means your client starts the server through `pipx run`.
147
+
148
+ In both modes, put `SQL_QUERY_MCP_CONFIG` and your real database DSNs in the
149
+ MCP client's environment block instead of exporting them in your shell.
150
+
142
151
  The console entry point is `sql-query-mcp`, which maps to
143
152
  `sql_query_mcp.app:main`.
144
153
 
145
154
  The PyPI install name is `sql-query-mcp`, and the Python package import path is
146
155
  `sql_query_mcp`.
147
156
 
148
- The default config path is `config/connections.json`. If you need a different
149
- location, set `SQL_QUERY_MCP_CONFIG`.
157
+ For `pipx install` and `pipx run`, set `SQL_QUERY_MCP_CONFIG` explicitly to
158
+ your config file path. The default `config/connections.json` path is mainly for
159
+ source checkouts and local development.
150
160
 
151
161
  The example config looks like this.
152
162
 
@@ -159,24 +169,24 @@ The example config looks like this.
159
169
  },
160
170
  "connections": [
161
171
  {
162
- "connection_id": "crm_prod_muqiao_ro",
172
+ "connection_id": "crm_prod_main_ro",
163
173
  "engine": "postgres",
164
- "label": "CRM PostgreSQL production / Muqiao / read-only",
174
+ "label": "CRM PostgreSQL production / Main / read-only",
165
175
  "env": "prod",
166
- "tenant": "muqiao",
176
+ "tenant": "main",
167
177
  "role": "ro",
168
- "dsn_env": "PG_CONN_CRM_PROD_MUQIAO_RO",
178
+ "dsn_env": "PG_CONN_CRM_PROD_MAIN_RO",
169
179
  "enabled": true,
170
180
  "default_schema": "public"
171
181
  },
172
182
  {
173
- "connection_id": "crm_mysql_prod_muqiao_ro",
183
+ "connection_id": "crm_mysql_prod_main_ro",
174
184
  "engine": "mysql",
175
- "label": "CRM MySQL production / Muqiao / read-only",
185
+ "label": "CRM MySQL production / Main / read-only",
176
186
  "env": "prod",
177
- "tenant": "muqiao",
187
+ "tenant": "main",
178
188
  "role": "ro",
179
- "dsn_env": "MYSQL_CONN_CRM_PROD_MUQIAO_RO",
189
+ "dsn_env": "MYSQL_CONN_CRM_PROD_MAIN_RO",
180
190
  "enabled": true,
181
191
  "default_database": "crm"
182
192
  }
@@ -72,51 +72,61 @@ implementation.
72
72
 
73
73
  ## Quick start
74
74
 
75
- If you want to get the server running first and explore the rest later, follow
76
- these steps.
75
+ `sql-query-mcp` supports two official PyPI-based setup modes. Both are intended
76
+ for real usage, not just local testing.
77
77
 
78
- 1. Create a virtual environment and install the project.
78
+ 1. Choose how you want your MCP client to start the server.
79
+
80
+ Use installed command mode if you want a simple local command after one
81
+ install.
79
82
 
80
83
  ```bash
81
- python3.10 -m venv .venv
82
- source .venv/bin/activate
83
- python -m pip install --upgrade pip
84
- pip install sql-query-mcp
84
+ pipx install sql-query-mcp
85
85
  ```
86
86
 
87
- Install a specific release with `pip install sql-query-mcp==X.Y.Z` if you want
88
- to pin a version. Published release artifacts are also attached to each GitHub
89
- Release.
90
-
91
- 2. Copy the example connection config.
87
+ Use managed launch mode if you want the package source declared directly in
88
+ your MCP client config.
92
89
 
93
90
  ```bash
94
- cp config/connections.example.json config/connections.json
91
+ pipx run --spec sql-query-mcp sql-query-mcp
95
92
  ```
96
93
 
97
- 3. Export your database DSNs as environment variables.
94
+ Pin a version with `pipx install 'sql-query-mcp==X.Y.Z'` or
95
+ `pipx run --spec 'sql-query-mcp==X.Y.Z' sql-query-mcp`. Upgrade installed
96
+ command mode with `pipx upgrade sql-query-mcp`.
98
97
 
99
- These example names match the copied `config/connections.example.json` file.
98
+ 2. Create a config file.
99
+
100
+ The server configuration should live outside the repository so the same file
101
+ works with either startup mode.
100
102
 
101
103
  ```bash
102
- export PG_CONN_CRM_PROD_MUQIAO_RO='postgresql://user:password@host:5432/dbname'
103
- export MYSQL_CONN_CRM_PROD_MUQIAO_RO='mysql://user:password@host:3306/crm'
104
- export SQL_QUERY_MCP_CONFIG='/absolute/path/to/sql-query-mcp/config/connections.json'
104
+ mkdir -p ~/.config/sql-query-mcp
105
105
  ```
106
106
 
107
- 4. Register the server in your MCP client.
107
+ Then save the example JSON later in this section as
108
+ `~/.config/sql-query-mcp/connections.json`.
109
+
110
+ 3. Register the server in your MCP client.
108
111
 
109
112
  - Codex: `docs/codex-setup.md` (Chinese)
110
113
  - OpenCode: `docs/opencode-setup.md` (Chinese)
111
114
 
115
+ Installed command mode means your client runs `sql-query-mcp` directly.
116
+ Managed launch mode means your client starts the server through `pipx run`.
117
+
118
+ In both modes, put `SQL_QUERY_MCP_CONFIG` and your real database DSNs in the
119
+ MCP client's environment block instead of exporting them in your shell.
120
+
112
121
  The console entry point is `sql-query-mcp`, which maps to
113
122
  `sql_query_mcp.app:main`.
114
123
 
115
124
  The PyPI install name is `sql-query-mcp`, and the Python package import path is
116
125
  `sql_query_mcp`.
117
126
 
118
- The default config path is `config/connections.json`. If you need a different
119
- location, set `SQL_QUERY_MCP_CONFIG`.
127
+ For `pipx install` and `pipx run`, set `SQL_QUERY_MCP_CONFIG` explicitly to
128
+ your config file path. The default `config/connections.json` path is mainly for
129
+ source checkouts and local development.
120
130
 
121
131
  The example config looks like this.
122
132
 
@@ -129,24 +139,24 @@ The example config looks like this.
129
139
  },
130
140
  "connections": [
131
141
  {
132
- "connection_id": "crm_prod_muqiao_ro",
142
+ "connection_id": "crm_prod_main_ro",
133
143
  "engine": "postgres",
134
- "label": "CRM PostgreSQL production / Muqiao / read-only",
144
+ "label": "CRM PostgreSQL production / Main / read-only",
135
145
  "env": "prod",
136
- "tenant": "muqiao",
146
+ "tenant": "main",
137
147
  "role": "ro",
138
- "dsn_env": "PG_CONN_CRM_PROD_MUQIAO_RO",
148
+ "dsn_env": "PG_CONN_CRM_PROD_MAIN_RO",
139
149
  "enabled": true,
140
150
  "default_schema": "public"
141
151
  },
142
152
  {
143
- "connection_id": "crm_mysql_prod_muqiao_ro",
153
+ "connection_id": "crm_mysql_prod_main_ro",
144
154
  "engine": "mysql",
145
- "label": "CRM MySQL production / Muqiao / read-only",
155
+ "label": "CRM MySQL production / Main / read-only",
146
156
  "env": "prod",
147
- "tenant": "muqiao",
157
+ "tenant": "main",
148
158
  "role": "ro",
149
- "dsn_env": "MYSQL_CONN_CRM_PROD_MUQIAO_RO",
159
+ "dsn_env": "MYSQL_CONN_CRM_PROD_MAIN_RO",
150
160
  "enabled": true,
151
161
  "default_database": "crm"
152
162
  }
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sql-query-mcp"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "Read-only SQL MCP server for PostgreSQL and MySQL."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.1.0"
5
+ __version__ = "0.1.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-query-mcp
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Read-only SQL MCP server for PostgreSQL and MySQL.
5
5
  Author: Andy Wang
6
6
  License-Expression: MIT
@@ -102,51 +102,61 @@ implementation.
102
102
 
103
103
  ## Quick start
104
104
 
105
- If you want to get the server running first and explore the rest later, follow
106
- these steps.
105
+ `sql-query-mcp` supports two official PyPI-based setup modes. Both are intended
106
+ for real usage, not just local testing.
107
107
 
108
- 1. Create a virtual environment and install the project.
108
+ 1. Choose how you want your MCP client to start the server.
109
+
110
+ Use installed command mode if you want a simple local command after one
111
+ install.
109
112
 
110
113
  ```bash
111
- python3.10 -m venv .venv
112
- source .venv/bin/activate
113
- python -m pip install --upgrade pip
114
- pip install sql-query-mcp
114
+ pipx install sql-query-mcp
115
115
  ```
116
116
 
117
- Install a specific release with `pip install sql-query-mcp==X.Y.Z` if you want
118
- to pin a version. Published release artifacts are also attached to each GitHub
119
- Release.
120
-
121
- 2. Copy the example connection config.
117
+ Use managed launch mode if you want the package source declared directly in
118
+ your MCP client config.
122
119
 
123
120
  ```bash
124
- cp config/connections.example.json config/connections.json
121
+ pipx run --spec sql-query-mcp sql-query-mcp
125
122
  ```
126
123
 
127
- 3. Export your database DSNs as environment variables.
124
+ Pin a version with `pipx install 'sql-query-mcp==X.Y.Z'` or
125
+ `pipx run --spec 'sql-query-mcp==X.Y.Z' sql-query-mcp`. Upgrade installed
126
+ command mode with `pipx upgrade sql-query-mcp`.
128
127
 
129
- These example names match the copied `config/connections.example.json` file.
128
+ 2. Create a config file.
129
+
130
+ The server configuration should live outside the repository so the same file
131
+ works with either startup mode.
130
132
 
131
133
  ```bash
132
- export PG_CONN_CRM_PROD_MUQIAO_RO='postgresql://user:password@host:5432/dbname'
133
- export MYSQL_CONN_CRM_PROD_MUQIAO_RO='mysql://user:password@host:3306/crm'
134
- export SQL_QUERY_MCP_CONFIG='/absolute/path/to/sql-query-mcp/config/connections.json'
134
+ mkdir -p ~/.config/sql-query-mcp
135
135
  ```
136
136
 
137
- 4. Register the server in your MCP client.
137
+ Then save the example JSON later in this section as
138
+ `~/.config/sql-query-mcp/connections.json`.
139
+
140
+ 3. Register the server in your MCP client.
138
141
 
139
142
  - Codex: `docs/codex-setup.md` (Chinese)
140
143
  - OpenCode: `docs/opencode-setup.md` (Chinese)
141
144
 
145
+ Installed command mode means your client runs `sql-query-mcp` directly.
146
+ Managed launch mode means your client starts the server through `pipx run`.
147
+
148
+ In both modes, put `SQL_QUERY_MCP_CONFIG` and your real database DSNs in the
149
+ MCP client's environment block instead of exporting them in your shell.
150
+
142
151
  The console entry point is `sql-query-mcp`, which maps to
143
152
  `sql_query_mcp.app:main`.
144
153
 
145
154
  The PyPI install name is `sql-query-mcp`, and the Python package import path is
146
155
  `sql_query_mcp`.
147
156
 
148
- The default config path is `config/connections.json`. If you need a different
149
- location, set `SQL_QUERY_MCP_CONFIG`.
157
+ For `pipx install` and `pipx run`, set `SQL_QUERY_MCP_CONFIG` explicitly to
158
+ your config file path. The default `config/connections.json` path is mainly for
159
+ source checkouts and local development.
150
160
 
151
161
  The example config looks like this.
152
162
 
@@ -159,24 +169,24 @@ The example config looks like this.
159
169
  },
160
170
  "connections": [
161
171
  {
162
- "connection_id": "crm_prod_muqiao_ro",
172
+ "connection_id": "crm_prod_main_ro",
163
173
  "engine": "postgres",
164
- "label": "CRM PostgreSQL production / Muqiao / read-only",
174
+ "label": "CRM PostgreSQL production / Main / read-only",
165
175
  "env": "prod",
166
- "tenant": "muqiao",
176
+ "tenant": "main",
167
177
  "role": "ro",
168
- "dsn_env": "PG_CONN_CRM_PROD_MUQIAO_RO",
178
+ "dsn_env": "PG_CONN_CRM_PROD_MAIN_RO",
169
179
  "enabled": true,
170
180
  "default_schema": "public"
171
181
  },
172
182
  {
173
- "connection_id": "crm_mysql_prod_muqiao_ro",
183
+ "connection_id": "crm_mysql_prod_main_ro",
174
184
  "engine": "mysql",
175
- "label": "CRM MySQL production / Muqiao / read-only",
185
+ "label": "CRM MySQL production / Main / read-only",
176
186
  "env": "prod",
177
- "tenant": "muqiao",
187
+ "tenant": "main",
178
188
  "role": "ro",
179
- "dsn_env": "MYSQL_CONN_CRM_PROD_MUQIAO_RO",
189
+ "dsn_env": "MYSQL_CONN_CRM_PROD_MAIN_RO",
180
190
  "enabled": true,
181
191
  "default_database": "crm"
182
192
  }
File without changes
File without changes