sql-mcp 2.3.4__tar.gz → 2.3.6__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 (69) hide show
  1. {sql_mcp-2.3.4/sql_mcp.egg-info → sql_mcp-2.3.6}/PKG-INFO +4 -6
  2. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/pyproject.toml +15 -14
  3. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/__init__.py +17 -1
  4. sql_mcp-2.3.6/sql_mcp/__main__.py +4 -0
  5. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/api_client.py +0 -2
  6. sql_mcp-2.3.6/sql_mcp/connector_sources.py +75 -0
  7. sql_mcp-2.3.6/sql_mcp/mcp_server.py +17 -0
  8. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/certification.json +4 -4
  9. sql_mcp-2.3.6/sql_mcp/skills/sql-mcp-development/SKILL.md +116 -0
  10. {sql_mcp-2.3.4 → sql_mcp-2.3.6/sql_mcp.egg-info}/PKG-INFO +4 -6
  11. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp.egg-info/SOURCES.txt +2 -8
  12. sql_mcp-2.3.6/sql_mcp.egg-info/entry_points.txt +8 -0
  13. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp.egg-info/requires.txt +2 -5
  14. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_api_wrapper.py +2 -2
  15. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_auth.py +5 -5
  16. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_dialect_paths.py +4 -4
  17. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_startup.py +4 -22
  18. sql_mcp-2.3.4/MANIFEST.in +0 -4
  19. sql_mcp-2.3.4/requirements.txt +0 -3
  20. sql_mcp-2.3.4/sql_mcp/__main__.py +0 -4
  21. sql_mcp-2.3.4/sql_mcp/connector_sources.py +0 -121
  22. sql_mcp-2.3.4/sql_mcp/connectors/__init__.py +0 -0
  23. sql_mcp-2.3.4/sql_mcp/mcp_server.py +0 -69
  24. sql_mcp-2.3.4/sql_mcp/prompts/__init__.py +0 -0
  25. sql_mcp-2.3.4/sql_mcp/skills/__init__.py +0 -0
  26. sql_mcp-2.3.4/sql_mcp.egg-info/entry_points.txt +0 -14
  27. sql_mcp-2.3.4/tests/test_default_content_surfaces.py +0 -43
  28. sql_mcp-2.3.4/tests/test_verify_api_integration.py +0 -266
  29. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/LICENSE +0 -0
  30. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/README.md +0 -0
  31. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/setup.cfg +0 -0
  32. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/api/__init__.py +0 -0
  33. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/api/api_client_sql.py +1 -1
  34. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/auth.py +0 -0
  35. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/dialects.py +0 -0
  36. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/kg_ingest.py +0 -0
  37. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/kg_pgwire.py +0 -0
  38. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/mcp/__init__.py +0 -0
  39. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/mcp/mcp_sql.py +0 -0
  40. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/mcp_config.json +0 -0
  41. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/__init__.py +0 -0
  42. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/database.ttl +0 -0
  43. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/fixtures/records.json +0 -0
  44. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/mappings/source.yaml +0 -0
  45. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/migrations/manifest.json +0 -0
  46. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/ontology/shapes/connector.shacl.ttl +0 -0
  47. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/prompts/database_specialist.json +0 -0
  48. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/safety.py +0 -0
  49. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/SKILL.md +0 -0
  50. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/WORKFLOW.md +0 -0
  51. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-operations/SKILL.md +0 -0
  52. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-operations/agents/openai.yaml +0 -0
  53. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-operations/references/catalog.md +0 -0
  54. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-query-execution/SKILL.md +0 -0
  55. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-query-execution/WORKFLOW.md +0 -0
  56. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-schema-inspection/SKILL.md +0 -0
  57. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/skills/sql-mcp-schema-inspection/WORKFLOW.md +0 -0
  58. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/sql_input_models.py +0 -0
  59. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp/sql_response_models.py +0 -0
  60. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp.egg-info/dependency_links.txt +0 -0
  61. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/sql_mcp.egg-info/top_level.txt +0 -0
  62. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_dialects.py +0 -0
  63. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_identity_context_scoping.py +0 -0
  64. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_init_dynamics.py +0 -0
  65. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_kg_ingest.py +0 -0
  66. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_kg_pgwire.py +0 -0
  67. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_package_getattr.py +0 -0
  68. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_safety.py +0 -0
  69. {sql_mcp-2.3.4 → sql_mcp-2.3.6}/tests/test_sql_mcp_validation.py +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-mcp
3
- Version: 2.3.4
3
+ Version: 2.3.6
4
4
  Summary: Generic SQL database (Postgres, MySQL/MariaDB, MSSQL, Oracle, SQLite) API + MCP Server for Agentic AI!
5
- Author-email: Project Maintainers <maintainers@users.noreply.github.com>
5
+ Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: License :: OSI Approved :: MIT License
@@ -12,11 +12,9 @@ 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: agent-connector-sdk[mcp]<1.0.0,>=0.4.1
15
+ Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
16
16
  Requires-Dist: python-dotenv>=1.2.4
17
17
  Requires-Dist: sqlalchemy>=2.1.5
18
- Provides-Extra: mcp
19
- Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
20
18
  Provides-Extra: postgres
21
19
  Requires-Dist: psycopg[binary]>=3.3.6; extra == "postgres"
22
20
  Provides-Extra: mysql
@@ -26,7 +24,7 @@ Requires-Dist: pyodbc>=5.3.0; extra == "mssql"
26
24
  Provides-Extra: oracle
27
25
  Requires-Dist: oracledb>=26.0.1; extra == "oracle"
28
26
  Provides-Extra: all
29
- Requires-Dist: sql-mcp[mcp,mssql,mysql,oracle,postgres]>=1.0.0; extra == "all"
27
+ Requires-Dist: sql-mcp[mssql,mysql,oracle,postgres]>=1.0.0; extra == "all"
30
28
  Provides-Extra: test
31
29
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
32
30
  Requires-Dist: pytest>=9.1.1; extra == "test"
@@ -4,43 +4,36 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sql-mcp"
7
- version = "2.3.4"
7
+ version = "2.3.6"
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 = [ "agent-connector-sdk[mcp]>=0.4.1,<1.0.0", "python-dotenv>=1.2.4", "sqlalchemy>=2.1.5",]
12
+ dependencies = [ "agent-connector-sdk[mcp]>=0.5.4,<0.6.0", "python-dotenv>=1.2.4", "sqlalchemy>=2.1.5",]
13
13
  [[project.authors]]
14
- name = "Project Maintainers"
15
- email = "maintainers@users.noreply.github.com"
14
+ name = "Repository Maintainers"
15
+ email = "maintainers@knuckles.team"
16
16
 
17
17
  [project.license]
18
18
  text = "MIT"
19
19
 
20
20
  [project.optional-dependencies]
21
- mcp = [ "agent-connector-sdk[mcp]>=0.4.1,<1.0.0",]
22
21
  postgres = [ "psycopg[binary]>=3.3.6",]
23
22
  mysql = [ "pymysql>=1.2.3",]
24
23
  mssql = [ "pyodbc>=5.3.0",]
25
24
  oracle = [ "oracledb>=26.0.1",]
26
- all = [ "sql-mcp[mcp,postgres,mysql,mssql,oracle]>=1.0.0",]
25
+ all = [ "sql-mcp[postgres,mysql,mssql,oracle]>=1.0.0",]
27
26
  test = [ "pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
28
27
 
29
28
  [project.scripts]
30
- sql-mcp = "sql_mcp.mcp_server:mcp_server"
31
-
32
- [project.entry-points."agent_connector_sdk.skill_providers"]
33
- sql-mcp = "sql_mcp.skills"
29
+ sql-mcp = "agent_connector_sdk.cli:serve"
34
30
 
35
31
  [project.entry-points."agent_connector_sdk.prompt_providers"]
36
32
  sql-mcp = "sql_mcp.prompts"
37
33
 
38
- [project.entry-points."agent_connector_sdk.ontology_providers"]
39
- sql-mcp = "sql_mcp.ontology"
40
-
41
34
  # The one declared connector identity: the fleet name (SDK-CONNECTOR-CONTROL-R071).
42
35
  [project.entry-points."agent_connector_sdk.connector"]
43
- sql-mcp = "sql_mcp"
36
+ sql-mcp = "sql_mcp:connector"
44
37
 
45
38
  [tool.uv.workspace]
46
39
  members = ["."]
@@ -55,6 +48,7 @@ override-dependencies = [
55
48
 
56
49
 
57
50
  [tool.ruff]
51
+ extend-exclude = ["tests", "scripts"]
58
52
  line-length = 88
59
53
  target-version = "py312"
60
54
 
@@ -82,3 +76,10 @@ include = [ "sql_mcp*",]
82
76
 
83
77
  [tool.pipelines_hooks.ste]
84
78
  exempt = ["specs/*", "specs/**/*"]
79
+
80
+ [tool.pipelines.container]
81
+ debug_apt = ["default-jre", "ripgrep", "tree", "fd-find", "curl", "nano", "build-essential", "cmake", "libssl-dev", "libcurl4-openssl-dev", "pkg-config", "cargo", "rustc"]
82
+ install_extras = {"mcp" = []}
83
+
84
+ [tool.pipelines.codespell]
85
+ ignore_words = ["hasTable"]
@@ -4,7 +4,6 @@ import importlib
4
4
  import inspect
5
5
  from typing import Any
6
6
 
7
- __version__ = "0.1.0"
8
7
  __all__: list[str] = []
9
8
 
10
9
  CORE_MODULES = ["sql_mcp.api_client"]
@@ -69,3 +68,20 @@ def __getattr__(name: str) -> Any:
69
68
 
70
69
  def __dir__() -> list[str]:
71
70
  return sorted(list(globals().keys()) + __all__)
71
+
72
+
73
+ from agent_connector_sdk.connector import Connector
74
+
75
+ from sql_mcp.api_client import Api
76
+ from sql_mcp.auth import get_api
77
+ from sql_mcp.mcp_server import readiness
78
+
79
+ connector = Connector(
80
+ api=Api,
81
+ get_client=get_api,
82
+ tools="sql_mcp.mcp_server",
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
+ readiness=readiness,
85
+ )
86
+
87
+ __all__ = ["connector"]
@@ -0,0 +1,4 @@
1
+ from agent_connector_sdk import run
2
+
3
+ if __name__ == "__main__":
4
+ run()
@@ -2,8 +2,6 @@
2
2
 
3
3
  from sql_mcp.api.api_client_sql import SqlApi
4
4
 
5
- __version__ = "0.1.0"
6
-
7
5
 
8
6
  class Api(SqlApi):
9
7
  """Multi-connection SQL client (SQLAlchemy 2.x Core) for the fleet."""
@@ -0,0 +1,75 @@
1
+ """Data sources of this connector, declared by tool name (generated by connector-ontology-map migrate).
2
+
3
+ Served live as ``connector://resources``. Regenerate by editing the declarations, not the tools.
4
+ """
5
+
6
+ # ruff: noqa: E501
7
+ from __future__ import annotations
8
+
9
+ from typing import Any
10
+
11
+ SOURCES: tuple[Any, ...] = ()
12
+
13
+ SCHEMA_VERSION = 2
14
+
15
+ FIELD_SETS: dict[str, dict[str, str]] = {
16
+ "fields_1": {
17
+ "dataType": "xsd:string",
18
+ "isForeignKey": "xsd:boolean",
19
+ "isNullable": "xsd:boolean",
20
+ "isPrimaryKey": "xsd:boolean",
21
+ "isUnique": "xsd:boolean",
22
+ "sqlDialect": "xsd:string",
23
+ },
24
+ }
25
+
26
+ SCHEMA_MAPPINGS: dict[str, Any] = {
27
+ "DatabaseColumn": {
28
+ "field_sets": ["fields_1"],
29
+ "ontology_class": "ApplicationLayer",
30
+ },
31
+ "DatabaseIndex": {
32
+ "field_sets": ["fields_1"],
33
+ "ontology_class": "ApplicationLayer",
34
+ },
35
+ "DatabaseSchema": {
36
+ "field_sets": ["fields_1"],
37
+ "ontology_class": "TechnologyLayer",
38
+ },
39
+ "DatabaseTable": {
40
+ "field_sets": ["fields_1"],
41
+ "ontology_class": "ApplicationLayer",
42
+ },
43
+ "DatabaseView": {
44
+ "field_sets": ["fields_1"],
45
+ "ontology_class": "ApplicationLayer",
46
+ },
47
+ }
48
+
49
+ RESOURCES: tuple[dict[str, str], ...] = (
50
+ {
51
+ "id_prefix": "databasecolumn",
52
+ "label": "Database Column",
53
+ "name": "DatabaseColumn",
54
+ },
55
+ {
56
+ "id_prefix": "databaseindex",
57
+ "label": "Database Index",
58
+ "name": "DatabaseIndex",
59
+ },
60
+ {
61
+ "id_prefix": "databaseschema",
62
+ "label": "Database Schema",
63
+ "name": "DatabaseSchema",
64
+ },
65
+ {
66
+ "id_prefix": "databasetable",
67
+ "label": "Database Table",
68
+ "name": "DatabaseTable",
69
+ },
70
+ {
71
+ "id_prefix": "databaseview",
72
+ "label": "Database View",
73
+ "name": "DatabaseView",
74
+ },
75
+ )
@@ -0,0 +1,17 @@
1
+ """Main FastMCP server and tool registration for sql-mcp."""
2
+
3
+ from agent_connector_sdk.connector_hooks import Readiness
4
+
5
+ from sql_mcp.auth import get_api
6
+ from sql_mcp.mcp.mcp_sql import register_sql_tools
7
+
8
+ # SDK discovery registers the register_<tag>_tools functions bound in this module.
9
+ __all__ = ["register_sql_tools"]
10
+
11
+
12
+ async def readiness() -> Readiness:
13
+ try:
14
+ get_api()
15
+ except Exception:
16
+ return Readiness(False)
17
+ return Readiness(True)
@@ -1,7 +1,7 @@
1
1
  {
2
- "api_version": "arbora.io/v1",
2
+ "api_version": "graphos.io/v1",
3
3
  "artifacts": {
4
- "sql_mcp/ontology/database.ttl": "1486055962ef7a286c349f6d3974bbe5d8176e88b627fb59c201b79a78153c64",
4
+ "sql_mcp/ontology/database.ttl": "9bedb25413dbd4aa83ae76ec84b025e01f5e1affd1afc01e899e543e5ba2dbd2",
5
5
  "sql_mcp/ontology/fixtures/records.json": "2a06e3f58c45c99a612d756419b9029fc7d14f5acaa1db77f964e32cc58c28d1",
6
6
  "sql_mcp/ontology/mappings/source.yaml": "15faf4992ea561ea2ffa48bdd39ccb78823b11b31f32aeda2030479e700a521e",
7
7
  "sql_mcp/ontology/migrations/manifest.json": "18189bd6a40c3683809ed9d80a2179361bbc8ea79d11ed1c3bed6152f64c3396",
@@ -15,7 +15,7 @@
15
15
  "synthetic_fixture_contract": "passed"
16
16
  },
17
17
  "compatibility": {
18
- "agent_connector_sdk": ">=2.5.0,<3",
18
+ "agent_utilities": ">=2.5.0,<3",
19
19
  "bundle_schema": "2",
20
20
  "epistemic_graph": ">=2.27.0,<3"
21
21
  },
@@ -29,5 +29,5 @@
29
29
  "signer": "UNSIGNED-PREVIEW",
30
30
  "signing_public_key": "",
31
31
  "status": "source-validated",
32
- "validated_at": "2026-09-21T17:23:56Z"
32
+ "validated_at": "2026-10-26T17:01:36Z"
33
33
  }
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: sql-mcp-development
3
+ skill_type: skill
4
+ description: >-
5
+ Develop, test, and release the sql-mcp connector while preserving its
6
+ SQLAlchemy Core, MCP action, safety, packaged-content, and spec-delivery
7
+ contracts. Use when changing SQL access, dialect support, connector content,
8
+ documentation, workflows, or repository-owned specifications.
9
+ license: MIT
10
+ tags: [sql, database, connector, development, testing, pages, specs]
11
+ metadata:
12
+ author: Genius
13
+ version: '0.1.0'
14
+ ---
15
+ # SQL MCP Development
16
+
17
+ Use this skill for changes inside the `sql-mcp` package. The connector owns the
18
+ SQLAlchemy Core facade, named-connection configuration, dialect registry,
19
+ read-only safety gate, bounded result envelopes, knowledge-graph ingestion, and
20
+ the action-routed MCP tools. Shared transports and connector contracts belong
21
+ to `agent-connector-sdk`; admission, serving, and durable graph state belong to
22
+ their owning repositories.
23
+
24
+ ## Repository map
25
+
26
+ - `sql_mcp/api_client.py` is the SQLAlchemy Core facade and connection lifecycle.
27
+ - `sql_mcp/mcp_server.py` exposes the four action-routed MCP tool surfaces.
28
+ - `sql_mcp/dialects.py` owns dialect registration and driver guidance.
29
+ - `sql_mcp/safety.py` owns read-only classification and write-policy checks.
30
+ - `sql_mcp/auth.py` owns named connections, environment parsing, and redaction.
31
+ - `sql_mcp/skills/`, prompts, ontology, and connector resources are packaged
32
+ content exposed through the connector entry point.
33
+ - `specs/` contains repository-owned source specifications and generated status
34
+ evidence; `docs/` is the MkDocs source published by the shared Pages workflow.
35
+
36
+ ## Rapid delivery: the 5-minute contract
37
+
38
+ Specs are already designed. Deliver one small, reviewable slice at a time.
39
+
40
+ - Find the owning row with `git grep -n "<term>" -- specs` before adding
41
+ behavior. Extend an existing spec before writing a new requirement.
42
+ - Trace a changed action from its typed input through the MCP router, the
43
+ SQLAlchemy Core facade, safety policy, and bounded response envelope. Reuse
44
+ those seams instead of duplicating a connector path.
45
+ - Keep a change inside this connector. SDK transports, Arbora admission, MCP
46
+ multiplexing, and graph persistence belong in their owning repositories.
47
+ - Bind every user value through SQLAlchemy `text()` parameters. Never assemble
48
+ user SQL with f-strings, `%`, or string concatenation, and route identifiers
49
+ through SQLAlchemy reflection or expression objects.
50
+ - Preserve the read-only statement gate for `sql_query`; `sql_execute` writes
51
+ remain server-policy controlled by `SQL_ALLOW_WRITES` and never gain a
52
+ per-call override. Keep row caps and statement timeouts on every result path.
53
+ - Keep credentials, DSNs, database contents, and live provider calls out of
54
+ tests and logs. Use the existing in-memory SQLite and mock seams; redact
55
+ passwords with `hide_password=True` before rendering any URL.
56
+ - Every behavior change needs a focused test. Generated `specs/*/status.json`
57
+ files come from `pipelines-hook spec-status`; never hand-edit delivery state.
58
+ - Use one logical change per commit with `Spec: <ID>` or an explicit
59
+ `Spec: none (<reason>)` trailer and the assisting-agent trailer. Stage only
60
+ reviewed paths.
61
+
62
+ ## Setup and gates
63
+
64
+ Use the locked project environment and do not install database drivers or create
65
+ live connections for a local check:
66
+
67
+ ```bash
68
+ uv sync --locked
69
+ uvx pre-commit install --hook-type pre-commit --hook-type pre-push
70
+ uvx pre-commit run --all-files
71
+ ```
72
+
73
+ For focused feedback, run the smallest relevant existing tests:
74
+
75
+ ```bash
76
+ uv run --locked pytest tests/test_safety.py tests/test_api_wrapper.py -q
77
+ uv run --locked pytest tests/test_startup.py tests/test_package_getattr.py -q
78
+ ```
79
+
80
+ The canonical pre-commit configuration delegates connector-standard, secrets,
81
+ spec-status, spec-decomposition, spec-trailers, tests-fast, and dependency
82
+ readiness checks to `Knuckles-Team/pipelines` at `rev: main`. Keep those shared
83
+ hooks; do not copy their implementation into this repository or bypass a
84
+ failure.
85
+
86
+ ## Spec delivery and Pages
87
+
88
+ `.github/workflows/pages.yml` calls
89
+ `Knuckles-Team/pipelines/.github/workflows/pages_pipeline.yml@main` with
90
+ `content_source: docs`, `spec_dashboard_enabled: true`, and
91
+ `.github/spec-dashboard.json`. The dashboard config is version 1 and reads only
92
+ `specs/*/status.json`. Keep the push paths for docs, specs, the dashboard
93
+ config, and the caller workflow so a source change publishes the page.
94
+
95
+ Do not claim a spec row from a YAML marker alone. Proof requires the generated
96
+ status records, a successful exact-source Pages run, and the public
97
+ `/spec-delivery/` page and snapshot serving the candidate revision. Inspect the
98
+ complete diff and live evidence before reporting delivery.
99
+
100
+ ## Packaging and release
101
+
102
+ Skills and other connector resources are included by the existing
103
+ `sql_mcp` package-data globs. When a packaged skill or resource changes, bump
104
+ the project patch version using the repository's version tool and refresh
105
+ `uv.lock` in the same release slice. Confirm the wheel/sdist contains the new
106
+ path before publication. Publish the package first; let the central container
107
+ workflow consume that exact public version, and report a central workflow
108
+ failure with its exact run rather than adding a fake extra or bypassing a gate.
109
+
110
+ ## Safety
111
+
112
+ Never commit `.env` files, credentials, raw DSNs, database dumps, live query
113
+ results, generated sites, caches, or temporary output. Work in a real Git
114
+ worktree based on current `origin/main`, inspect `git status --short` and the
115
+ complete candidate diff, and do not use `git stash`, `git add -A`, or
116
+ `git add .`.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-mcp
3
- Version: 2.3.4
3
+ Version: 2.3.6
4
4
  Summary: Generic SQL database (Postgres, MySQL/MariaDB, MSSQL, Oracle, SQLite) API + MCP Server for Agentic AI!
5
- Author-email: Project Maintainers <maintainers@users.noreply.github.com>
5
+ Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: License :: OSI Approved :: MIT License
@@ -12,11 +12,9 @@ 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: agent-connector-sdk[mcp]<1.0.0,>=0.4.1
15
+ Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
16
16
  Requires-Dist: python-dotenv>=1.2.4
17
17
  Requires-Dist: sqlalchemy>=2.1.5
18
- Provides-Extra: mcp
19
- Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
20
18
  Provides-Extra: postgres
21
19
  Requires-Dist: psycopg[binary]>=3.3.6; extra == "postgres"
22
20
  Provides-Extra: mysql
@@ -26,7 +24,7 @@ Requires-Dist: pyodbc>=5.3.0; extra == "mssql"
26
24
  Provides-Extra: oracle
27
25
  Requires-Dist: oracledb>=26.0.1; extra == "oracle"
28
26
  Provides-Extra: all
29
- Requires-Dist: sql-mcp[mcp,mssql,mysql,oracle,postgres]>=1.0.0; extra == "all"
27
+ Requires-Dist: sql-mcp[mssql,mysql,oracle,postgres]>=1.0.0; extra == "all"
30
28
  Provides-Extra: test
31
29
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
32
30
  Requires-Dist: pytest>=9.1.1; extra == "test"
@@ -1,8 +1,6 @@
1
1
  LICENSE
2
- MANIFEST.in
3
2
  README.md
4
3
  pyproject.toml
5
- requirements.txt
6
4
  sql_mcp/__init__.py
7
5
  sql_mcp/__main__.py
8
6
  sql_mcp/api_client.py
@@ -24,7 +22,6 @@ sql_mcp.egg-info/requires.txt
24
22
  sql_mcp.egg-info/top_level.txt
25
23
  sql_mcp/api/__init__.py
26
24
  sql_mcp/api/api_client_sql.py
27
- sql_mcp/connectors/__init__.py
28
25
  sql_mcp/mcp/__init__.py
29
26
  sql_mcp/mcp/mcp_sql.py
30
27
  sql_mcp/ontology/__init__.py
@@ -34,9 +31,8 @@ sql_mcp/ontology/fixtures/records.json
34
31
  sql_mcp/ontology/mappings/source.yaml
35
32
  sql_mcp/ontology/migrations/manifest.json
36
33
  sql_mcp/ontology/shapes/connector.shacl.ttl
37
- sql_mcp/prompts/__init__.py
38
34
  sql_mcp/prompts/database_specialist.json
39
- sql_mcp/skills/__init__.py
35
+ sql_mcp/skills/sql-mcp-development/SKILL.md
40
36
  sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/SKILL.md
41
37
  sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/WORKFLOW.md
42
38
  sql_mcp/skills/sql-mcp-operations/SKILL.md
@@ -48,7 +44,6 @@ sql_mcp/skills/sql-mcp-schema-inspection/SKILL.md
48
44
  sql_mcp/skills/sql-mcp-schema-inspection/WORKFLOW.md
49
45
  tests/test_api_wrapper.py
50
46
  tests/test_auth.py
51
- tests/test_default_content_surfaces.py
52
47
  tests/test_dialect_paths.py
53
48
  tests/test_dialects.py
54
49
  tests/test_identity_context_scoping.py
@@ -58,5 +53,4 @@ tests/test_kg_pgwire.py
58
53
  tests/test_package_getattr.py
59
54
  tests/test_safety.py
60
55
  tests/test_sql_mcp_validation.py
61
- tests/test_startup.py
62
- tests/test_verify_api_integration.py
56
+ tests/test_startup.py
@@ -0,0 +1,8 @@
1
+ [agent_connector_sdk.connector]
2
+ sql-mcp = sql_mcp:connector
3
+
4
+ [agent_connector_sdk.prompt_providers]
5
+ sql-mcp = sql_mcp.prompts
6
+
7
+ [console_scripts]
8
+ sql-mcp = agent_connector_sdk.cli:serve
@@ -1,12 +1,9 @@
1
- agent-connector-sdk[mcp]<1.0.0,>=0.4.1
1
+ agent-connector-sdk[mcp]<0.6.0,>=0.5.4
2
2
  python-dotenv>=1.2.4
3
3
  sqlalchemy>=2.1.5
4
4
 
5
5
  [all]
6
- sql-mcp[mcp,mssql,mysql,oracle,postgres]>=1.0.0
7
-
8
- [mcp]
9
- agent-connector-sdk[mcp]<1.0.0,>=0.4.1
6
+ sql-mcp[mssql,mysql,oracle,postgres]>=1.0.0
10
7
 
11
8
  [mssql]
12
9
  pyodbc>=5.3.0
@@ -325,8 +325,8 @@ def test_batch_and_script_limits_are_enforced():
325
325
  @pytest.mark.parametrize(
326
326
  "url",
327
327
  [
328
- "mysql+pymysql://svc:pw@db/app",
329
- "oracle+oracledb://svc:pw@db/app",
328
+ "mysql+pymysql://svc:password@db/app",
329
+ "oracle+oracledb://svc:password@db/app",
330
330
  ],
331
331
  )
332
332
  def test_implicit_commit_dialects_reject_multi_statement_ddl_scripts(url):
@@ -196,11 +196,11 @@ def test_get_api_caches_until_reset(monkeypatch):
196
196
  def test_passwords_redacted_in_connection_descriptions(monkeypatch):
197
197
  monkeypatch.setenv(
198
198
  "SQL_CONNECTIONS",
199
- json.dumps({"dw": "postgresql+psycopg://bob:supersecretpw@db:5432/dw"}),
199
+ json.dumps({"dw": "postgresql+psycopg://bob:placeholder@db:5432/dw"}),
200
200
  )
201
201
  api = auth.get_api()
202
202
  described = api.describe_connections()
203
- assert "supersecretpw" not in json.dumps(described)
203
+ assert "placeholder" not in json.dumps(described)
204
204
  assert "***" in described[0]["url"]
205
205
 
206
206
 
@@ -210,7 +210,7 @@ def test_url_query_secrets_are_redacted_in_connection_descriptions(monkeypatch):
210
210
  json.dumps(
211
211
  {
212
212
  "dw": (
213
- "postgresql+psycopg://bob:pw@db:5432/dw?"
213
+ "postgresql+psycopg://bob:password@db:5432/dw?"
214
214
  "sslmode=require&access_token=query-secret&sslpassword=tls-secret"
215
215
  )
216
216
  }
@@ -242,12 +242,12 @@ def test_odbc_connect_query_is_fully_redacted(monkeypatch):
242
242
  def test_passwords_never_in_logs(monkeypatch, caplog):
243
243
  monkeypatch.setenv(
244
244
  "SQL_CONNECTIONS",
245
- json.dumps({"dw": "postgresql+psycopg://bob:supersecretpw@db:5432/dw"}),
245
+ json.dumps({"dw": "postgresql+psycopg://bob:placeholder@db:5432/dw"}),
246
246
  )
247
247
  with caplog.at_level("DEBUG"):
248
248
  auth.load_connections()
249
249
  auth.get_api()
250
- assert "supersecretpw" not in caplog.text
250
+ assert "placeholder" not in caplog.text
251
251
 
252
252
 
253
253
  # --------------------------------------------------------------------- #
@@ -26,7 +26,7 @@ def fake_engine(result):
26
26
  @pytest.fixture
27
27
  def pg_api():
28
28
  client = Api(
29
- connections={"pg": "postgresql+psycopg://svc:pw@db:5432/app"},
29
+ connections={"pg": "postgresql+psycopg://svc:password@db:5432/app"},
30
30
  allow_writes=False,
31
31
  max_rows=50,
32
32
  timeout=5.0,
@@ -37,7 +37,7 @@ def pg_api():
37
37
 
38
38
  def test_explain_unsupported_for_mssql():
39
39
  client = Api(
40
- connections={"mart": "mssql+pyodbc://svc:pw@db:1433/mart"},
40
+ connections={"mart": "mssql+pyodbc://svc:password@db:1433/mart"},
41
41
  allow_writes=False,
42
42
  max_rows=50,
43
43
  timeout=5.0,
@@ -51,7 +51,7 @@ def test_explain_unsupported_for_mssql():
51
51
 
52
52
  def test_explain_unsupported_for_oracle():
53
53
  client = Api(
54
- connections={"oracle": "oracle+oracledb://svc:pw@db:1521/app"},
54
+ connections={"oracle": "oracle+oracledb://svc:password@db:1521/app"},
55
55
  allow_writes=False,
56
56
  max_rows=50,
57
57
  timeout=5.0,
@@ -158,7 +158,7 @@ def test_engine_creation_requires_driver(pg_api):
158
158
 
159
159
  def test_unregistered_dialect_reports_no_session_view():
160
160
  client = Api(
161
- connections={"fb": "firebird://svc:pw@db/x"},
161
+ connections={"fb": "firebird://svc:password@db/x"},
162
162
  allow_writes=False,
163
163
  max_rows=50,
164
164
  timeout=5.0,
@@ -9,7 +9,7 @@ pytest.importorskip("agent_connector_sdk.mcp.action_dispatch")
9
9
  from fastmcp import Client # noqa: E402
10
10
 
11
11
  from sql_mcp import auth # noqa: E402
12
- from sql_mcp.mcp_server import get_mcp_instance # noqa: E402
12
+ from agent_connector_sdk.connector import build_server # noqa: E402
13
13
 
14
14
 
15
15
  async def list_tool_names(mcp) -> set[str]:
@@ -20,7 +20,7 @@ async def list_tool_names(mcp) -> set[str]:
20
20
  async def test_get_mcp_instance_registers_sql_tools(monkeypatch):
21
21
  monkeypatch.setenv("SQL_URL", "sqlite+pysqlite:///:memory:")
22
22
  monkeypatch.setattr("sys.argv", ["sql-mcp"])
23
- mcp, args, middlewares = get_mcp_instance()
23
+ _, mcp = build_server("sql_mcp", command_args=[])
24
24
  names = await list_tool_names(mcp)
25
25
  assert {"sql_query", "sql_execute", "sql_ingest_schema"} <= names
26
26
  assert not {"sql_schema", "sql_admin"} & names
@@ -29,7 +29,7 @@ async def test_get_mcp_instance_registers_sql_tools(monkeypatch):
29
29
  async def test_sqltool_flag_disables_registration(monkeypatch):
30
30
  monkeypatch.setenv("SQLTOOL", "False")
31
31
  monkeypatch.setattr("sys.argv", ["sql-mcp"])
32
- mcp, args, middlewares = get_mcp_instance()
32
+ _, mcp = build_server("sql_mcp", command_args=[])
33
33
  assert "sql_ingest_schema" not in await list_tool_names(mcp)
34
34
 
35
35
 
@@ -37,7 +37,7 @@ async def test_operational_routes_expose_status_only(monkeypatch):
37
37
  monkeypatch.setenv("SQL_URL", "sqlite+pysqlite:///:memory:")
38
38
  monkeypatch.setattr("sys.argv", ["sql-mcp"])
39
39
  auth.reset_api()
40
- mcp, _, _ = get_mcp_instance()
40
+ _, mcp = build_server("sql_mcp", command_args=[])
41
41
  routes = {
42
42
  route.path: route.endpoint
43
43
  for route in mcp._additional_http_routes
@@ -52,21 +52,3 @@ async def test_operational_routes_expose_status_only(monkeypatch):
52
52
  assert ready.status_code == 200
53
53
  assert json.loads(ready.body) == {"status": "ready"}
54
54
  auth.reset_api()
55
-
56
-
57
- async def test_readiness_fails_closed_without_details(monkeypatch):
58
- monkeypatch.setattr("sys.argv", ["sql-mcp"])
59
- monkeypatch.setattr(
60
- "sql_mcp.mcp_server.get_api",
61
- lambda: (_ for _ in ()).throw(RuntimeError("private failure detail")),
62
- )
63
- mcp, _, _ = get_mcp_instance()
64
- endpoint = next(
65
- route.endpoint for route in mcp._additional_http_routes if route.path == "/ready"
66
- )
67
-
68
- response = await endpoint(None)
69
-
70
- assert response.status_code == 503
71
- assert json.loads(response.body) == {"status": "unavailable"}
72
- assert b"private failure detail" not in response.body
sql_mcp-2.3.4/MANIFEST.in DELETED
@@ -1,4 +0,0 @@
1
- include LICENSE
2
- include README.md
3
- include requirements.txt
4
- recursive-include sql_mcp *.py *.json *.md *.yaml *.yml
@@ -1,3 +0,0 @@
1
- agent-connector-sdk[mcp]>=0.4.1,<1.0.0
2
- python-dotenv>=1.0.0
3
- sqlalchemy>=2.0.0
@@ -1,4 +0,0 @@
1
- from sql_mcp.mcp_server import mcp_server
2
-
3
- if __name__ == "__main__":
4
- mcp_server()