sql-mcp 2.3.8__tar.gz → 2.3.9__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 (66) hide show
  1. {sql_mcp-2.3.8/sql_mcp.egg-info → sql_mcp-2.3.9}/PKG-INFO +8 -8
  2. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/README.md +6 -6
  3. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/pyproject.toml +2 -2
  4. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/__init__.py +3 -3
  5. sql_mcp-2.3.9/sql_mcp/api_client.py +41 -0
  6. sql_mcp-2.3.9/sql_mcp/connector_contracts.py +630 -0
  7. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/connector_sources.py +17 -1
  8. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/kg_pgwire.py +5 -5
  9. sql_mcp-2.3.9/sql_mcp/mcp/mcp_sql.py +112 -0
  10. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/certification.json +1 -1
  11. sql_mcp-2.3.9/sql_mcp/prompts/sql-mcp-data-analyst.json +52 -0
  12. sql_mcp-2.3.9/sql_mcp/prompts/sql-mcp-data-steward.json +50 -0
  13. sql_mcp-2.3.9/sql_mcp/prompts/sql-mcp-database-administrator.json +70 -0
  14. sql_mcp-2.3.9/sql_mcp/prompts/sql-mcp-operator.json +74 -0
  15. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-development/SKILL.md +2 -2
  16. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/SKILL.md +16 -23
  17. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/WORKFLOW.md +14 -21
  18. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-operations/SKILL.md +1 -1
  19. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-operations/references/catalog.md +1 -1
  20. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-query-execution/SKILL.md +15 -24
  21. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-query-execution/WORKFLOW.md +16 -25
  22. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-schema-inspection/SKILL.md +18 -30
  23. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-schema-inspection/WORKFLOW.md +18 -30
  24. {sql_mcp-2.3.8 → sql_mcp-2.3.9/sql_mcp.egg-info}/PKG-INFO +8 -8
  25. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp.egg-info/SOURCES.txt +5 -2
  26. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp.egg-info/requires.txt +1 -1
  27. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_api_wrapper.py +1 -0
  28. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_identity_context_scoping.py +1 -5
  29. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_kg_ingest.py +2 -2
  30. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_kg_pgwire.py +1 -1
  31. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_package_getattr.py +0 -8
  32. sql_mcp-2.3.9/tests/test_sql_mcp_validation.py +278 -0
  33. sql_mcp-2.3.8/sql_mcp/api_client.py +0 -9
  34. sql_mcp-2.3.8/sql_mcp/mcp/mcp_sql.py +0 -625
  35. sql_mcp-2.3.8/sql_mcp/prompts/database_specialist.json +0 -42
  36. sql_mcp-2.3.8/sql_mcp/sql_input_models.py +0 -129
  37. sql_mcp-2.3.8/tests/test_sql_mcp_validation.py +0 -406
  38. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/LICENSE +0 -0
  39. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/setup.cfg +0 -0
  40. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/__main__.py +0 -0
  41. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/api/__init__.py +0 -0
  42. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/api/api_client_sql.py +0 -0
  43. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/auth.py +0 -0
  44. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/dialects.py +0 -0
  45. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/kg_ingest.py +0 -0
  46. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/mcp/__init__.py +0 -0
  47. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/mcp_config.json +0 -0
  48. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/mcp_server.py +0 -0
  49. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/__init__.py +0 -0
  50. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/database.ttl +0 -0
  51. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/fixtures/records.json +0 -0
  52. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/mappings/source.yaml +0 -0
  53. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/migrations/manifest.json +0 -0
  54. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/ontology/shapes/connector.shacl.ttl +0 -0
  55. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/safety.py +0 -0
  56. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/skills/sql-mcp-operations/agents/openai.yaml +0 -0
  57. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp/sql_response_models.py +0 -0
  58. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp.egg-info/dependency_links.txt +0 -0
  59. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp.egg-info/entry_points.txt +0 -0
  60. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/sql_mcp.egg-info/top_level.txt +0 -0
  61. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_auth.py +0 -0
  62. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_dialect_paths.py +0 -0
  63. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_dialects.py +0 -0
  64. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_init_dynamics.py +0 -0
  65. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_safety.py +0 -0
  66. {sql_mcp-2.3.8 → sql_mcp-2.3.9}/tests/test_startup.py +1 -1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-mcp
3
- Version: 2.3.8
3
+ Version: 2.3.9
4
4
  Summary: Generic SQL database (Postgres, MySQL/MariaDB, MSSQL, Oracle, SQLite) API + MCP Server for Agentic AI!
5
5
  Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: <3.15,>=3.12
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.4
15
+ Requires-Dist: scion-sdk[mcp]<1.0.0,>=0.9.0
16
16
  Requires-Dist: python-dotenv>=1.2.4
17
17
  Requires-Dist: sqlalchemy>=2.1.5
18
18
  Provides-Extra: postgres
@@ -159,7 +159,7 @@ Pick the extra that matches what the operator want to run. DB-driver extras
159
159
 
160
160
  | Extra | Installs | Use when |
161
161
  |-------|----------|----------|
162
- | `sql-mcp[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `epistemic-graph[full]`) | The operator only run the **MCP server** (smallest install / image) |
162
+ | `sql-mcp[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `medulla[full]`) | The operator only run the **MCP server** (smallest install / image) |
163
163
  | `sql-mcp[all]` | Everything (`mcp` + `agent` + **every** DB driver + `logfire`) | Development / both surfaces |
164
164
 
165
165
  ```bash
@@ -175,7 +175,7 @@ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
175
175
 
176
176
  | Image tag | Build target | Contents | Entrypoint |
177
177
  |-----------|--------------|----------|------------|
178
- | `example/sql-mcp:mcp` | `--target mcp` | `sql-mcp[mcp]` — **connector-focused**, includes `epistemic-graph[full]`; no model-orchestration stack | `sql-mcp` |
178
+ | `example/sql-mcp:mcp` | `--target mcp` | `sql-mcp[mcp]` — **connector-focused**, includes `medulla[full]`; no model-orchestration stack | `sql-mcp` |
179
179
 
180
180
  ```bash
181
181
  docker pull example/sql-mcp:mcp # connector-focused MCP server
@@ -184,14 +184,14 @@ docker build --target mcp -t example/sql-mcp:mcp docker/ # build MCP se
184
184
 
185
185
  agent (`immutable agent digest`) with a co-located `:mcp` sidecar.
186
186
 
187
- ### Knowledge-graph database (`epistemic-graph`)
187
+ ### Knowledge-graph database (`medulla`)
188
188
 
189
- Scion SDK core dependency (`epistemic-graph[full]`). The `[mcp]` extra keeps
189
+ Scion SDK core dependency (`medulla[full]`). The `[mcp]` extra keeps
190
190
  deployments can use the bundled engine. For production or shared state, run
191
- **epistemic-graph as a dedicated database service** and configure the runtime to use it.
191
+ **medulla as a dedicated database service** and configure the runtime to use it.
192
192
  Deployment recipes (single-node + Raft HA), connection configuration, and architecture
193
193
  diagrams are documented in the
194
- [epistemic-graph deployment guide](https://knuckles-team.github.io/epistemic-graph/deployment/).
194
+ [medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
195
195
 
196
196
  ## Usage
197
197
 
@@ -125,7 +125,7 @@ Pick the extra that matches what the operator want to run. DB-driver extras
125
125
 
126
126
  | Extra | Installs | Use when |
127
127
  |-------|----------|----------|
128
- | `sql-mcp[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `epistemic-graph[full]`) | The operator only run the **MCP server** (smallest install / image) |
128
+ | `sql-mcp[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `medulla[full]`) | The operator only run the **MCP server** (smallest install / image) |
129
129
  | `sql-mcp[all]` | Everything (`mcp` + `agent` + **every** DB driver + `logfire`) | Development / both surfaces |
130
130
 
131
131
  ```bash
@@ -141,7 +141,7 @@ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
141
141
 
142
142
  | Image tag | Build target | Contents | Entrypoint |
143
143
  |-----------|--------------|----------|------------|
144
- | `example/sql-mcp:mcp` | `--target mcp` | `sql-mcp[mcp]` — **connector-focused**, includes `epistemic-graph[full]`; no model-orchestration stack | `sql-mcp` |
144
+ | `example/sql-mcp:mcp` | `--target mcp` | `sql-mcp[mcp]` — **connector-focused**, includes `medulla[full]`; no model-orchestration stack | `sql-mcp` |
145
145
 
146
146
  ```bash
147
147
  docker pull example/sql-mcp:mcp # connector-focused MCP server
@@ -150,14 +150,14 @@ docker build --target mcp -t example/sql-mcp:mcp docker/ # build MCP se
150
150
 
151
151
  agent (`immutable agent digest`) with a co-located `:mcp` sidecar.
152
152
 
153
- ### Knowledge-graph database (`epistemic-graph`)
153
+ ### Knowledge-graph database (`medulla`)
154
154
 
155
- Scion SDK core dependency (`epistemic-graph[full]`). The `[mcp]` extra keeps
155
+ Scion SDK core dependency (`medulla[full]`). The `[mcp]` extra keeps
156
156
  deployments can use the bundled engine. For production or shared state, run
157
- **epistemic-graph as a dedicated database service** and configure the runtime to use it.
157
+ **medulla as a dedicated database service** and configure the runtime to use it.
158
158
  Deployment recipes (single-node + Raft HA), connection configuration, and architecture
159
159
  diagrams are documented in the
160
- [epistemic-graph deployment guide](https://knuckles-team.github.io/epistemic-graph/deployment/).
160
+ [medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
161
161
 
162
162
  ## Usage
163
163
 
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sql-mcp"
7
- version = "2.3.8"
7
+ version = "2.3.9"
8
8
  description = "Generic SQL database (Postgres, MySQL/MariaDB, MSSQL, Oracle, SQLite) API + MCP Server for Agentic AI!"
9
9
  readme = "README.md"
10
10
  classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
11
11
  requires-python = ">=3.12, <3.15"
12
- dependencies = [ "scion-sdk[mcp]>=0.6.4,<0.7.0", "python-dotenv>=1.2.4", "sqlalchemy>=2.1.5",]
12
+ dependencies = [ "scion-sdk[mcp]>=0.9.0,<1.0.0", "python-dotenv>=1.2.4", "sqlalchemy>=2.1.5",]
13
13
  [[project.authors]]
14
14
  name = "Repository Maintainers"
15
15
  email = "maintainers@knuckles.team"
@@ -72,13 +72,13 @@ def __dir__() -> list[str]:
72
72
 
73
73
  from scion_sdk.connector import Connector
74
74
 
75
- from sql_mcp.api_client import Api
75
+ from sql_mcp.api_client import OperationApi
76
76
  from sql_mcp.auth import get_api
77
77
  from sql_mcp.mcp_server import readiness
78
78
 
79
79
  connector = Connector(
80
- api=Api,
81
- get_client=get_api,
80
+ api=OperationApi,
81
+ get_client=lambda: OperationApi(get_api()),
82
82
  tools="sql_mcp.mcp_server",
83
83
  instructions="Generic SQL database MCP Server - read-only queries, gated DML/DDL, schema reflection, and connection admin over SQLAlchemy 2.x Core (SQLite, Postgres, MySQL/MariaDB, MSSQL, Oracle) with named multi-connection support.",
84
84
  readiness=readiness,
@@ -0,0 +1,41 @@
1
+ """Public client facade for sql_mcp."""
2
+
3
+ import functools
4
+ import inspect
5
+ from typing import Any
6
+
7
+ from sql_mcp.api.api_client_sql import SqlApi
8
+
9
+
10
+ class Api(SqlApi):
11
+ """Multi-connection SQL client (SQLAlchemy 2.x Core) for the fleet."""
12
+
13
+ pass
14
+
15
+
16
+ #: Plumbing on ``Api`` that is not a database operation: the SQLAlchemy engine
17
+ #: handle, pool teardown and the internal dialect record. They stay on ``Api``
18
+ #: for in-process callers but are never served as MCP tools.
19
+ _NOT_OPERATIONS = frozenset({"engine", "dispose", "dialect_spec"})
20
+
21
+
22
+ def _delegate(name: str):
23
+ original = getattr(Api, name)
24
+
25
+ @functools.wraps(original)
26
+ def call(self: "OperationApi", *args: Any, **kwargs: Any) -> Any:
27
+ return getattr(self._api, name)(*args, **kwargs)
28
+
29
+ return call
30
+
31
+
32
+ class OperationApi:
33
+ """The operations of ``Api`` that the MCP server serves, one tool each."""
34
+
35
+ def __init__(self, api: Api) -> None:
36
+ self._api = api
37
+
38
+
39
+ for _name, _member in inspect.getmembers(Api, inspect.isfunction):
40
+ if not _name.startswith("_") and _name not in _NOT_OPERATIONS:
41
+ setattr(OperationApi, _name, _delegate(_name))