sql-mcp 2.3.2__py3-none-any.whl → 2.3.4__py3-none-any.whl
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.
- sql_mcp/connector_sources.py +121 -0
- sql_mcp/mcp_server.py +1 -1
- sql_mcp/ontology/certification.json +0 -3
- sql_mcp/ontology/database.ttl +2 -2
- sql_mcp/prompts/database_specialist.json +0 -2
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/METADATA +3 -3
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/RECORD +11 -12
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/WHEEL +1 -1
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/entry_points.txt +3 -3
- sql_mcp/connectors/mcp_source_presets.json +0 -3
- sql_mcp/connectors/tool_schema_fingerprints.json +0 -6
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/licenses/LICENSE +0 -0
- {sql_mcp-2.3.2.dist-info → sql_mcp-2.3.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
from agent_connector_sdk.ingest.sources import IngestSourceDeclaration, IngestSourceSpec
|
|
12
|
+
|
|
13
|
+
CONNECTOR: str = "sql-mcp"
|
|
14
|
+
|
|
15
|
+
SOURCES: tuple[Any, ...] = ()
|
|
16
|
+
|
|
17
|
+
SCHEMA_MAPPINGS: dict[str, Any] = {
|
|
18
|
+
"DatabaseColumn": {
|
|
19
|
+
"fields": {
|
|
20
|
+
"dataType": "xsd:string",
|
|
21
|
+
"isForeignKey": "xsd:boolean",
|
|
22
|
+
"isNullable": "xsd:boolean",
|
|
23
|
+
"isPrimaryKey": "xsd:boolean",
|
|
24
|
+
"isUnique": "xsd:boolean",
|
|
25
|
+
"sqlDialect": "xsd:string",
|
|
26
|
+
},
|
|
27
|
+
"ontology_class": "ApplicationLayer",
|
|
28
|
+
},
|
|
29
|
+
"DatabaseIndex": {
|
|
30
|
+
"fields": {
|
|
31
|
+
"dataType": "xsd:string",
|
|
32
|
+
"isForeignKey": "xsd:boolean",
|
|
33
|
+
"isNullable": "xsd:boolean",
|
|
34
|
+
"isPrimaryKey": "xsd:boolean",
|
|
35
|
+
"isUnique": "xsd:boolean",
|
|
36
|
+
"sqlDialect": "xsd:string",
|
|
37
|
+
},
|
|
38
|
+
"ontology_class": "ApplicationLayer",
|
|
39
|
+
},
|
|
40
|
+
"DatabaseSchema": {
|
|
41
|
+
"fields": {
|
|
42
|
+
"dataType": "xsd:string",
|
|
43
|
+
"isForeignKey": "xsd:boolean",
|
|
44
|
+
"isNullable": "xsd:boolean",
|
|
45
|
+
"isPrimaryKey": "xsd:boolean",
|
|
46
|
+
"isUnique": "xsd:boolean",
|
|
47
|
+
"sqlDialect": "xsd:string",
|
|
48
|
+
},
|
|
49
|
+
"ontology_class": "TechnologyLayer",
|
|
50
|
+
},
|
|
51
|
+
"DatabaseTable": {
|
|
52
|
+
"fields": {
|
|
53
|
+
"dataType": "xsd:string",
|
|
54
|
+
"isForeignKey": "xsd:boolean",
|
|
55
|
+
"isNullable": "xsd:boolean",
|
|
56
|
+
"isPrimaryKey": "xsd:boolean",
|
|
57
|
+
"isUnique": "xsd:boolean",
|
|
58
|
+
"sqlDialect": "xsd:string",
|
|
59
|
+
},
|
|
60
|
+
"ontology_class": "ApplicationLayer",
|
|
61
|
+
},
|
|
62
|
+
"DatabaseView": {
|
|
63
|
+
"fields": {
|
|
64
|
+
"dataType": "xsd:string",
|
|
65
|
+
"isForeignKey": "xsd:boolean",
|
|
66
|
+
"isNullable": "xsd:boolean",
|
|
67
|
+
"isPrimaryKey": "xsd:boolean",
|
|
68
|
+
"isUnique": "xsd:boolean",
|
|
69
|
+
"sqlDialect": "xsd:string",
|
|
70
|
+
},
|
|
71
|
+
"ontology_class": "ApplicationLayer",
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
RESOURCES: tuple[dict[str, str], ...] = (
|
|
76
|
+
{
|
|
77
|
+
"id_prefix": "databasecolumn",
|
|
78
|
+
"label": "Database Column",
|
|
79
|
+
"name": "DatabaseColumn",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id_prefix": "databaseindex",
|
|
83
|
+
"label": "Database Index",
|
|
84
|
+
"name": "DatabaseIndex",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id_prefix": "databaseschema",
|
|
88
|
+
"label": "Database Schema",
|
|
89
|
+
"name": "DatabaseSchema",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id_prefix": "databasetable",
|
|
93
|
+
"label": "Database Table",
|
|
94
|
+
"name": "DatabaseTable",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id_prefix": "databaseview",
|
|
98
|
+
"label": "Database View",
|
|
99
|
+
"name": "DatabaseView",
|
|
100
|
+
},
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def declaration() -> IngestSourceDeclaration:
|
|
105
|
+
"""The declaration the server assembles from this module."""
|
|
106
|
+
specs: list[IngestSourceSpec] = []
|
|
107
|
+
for item in SOURCES:
|
|
108
|
+
for entry in item["connector_sources"]:
|
|
109
|
+
body: dict[str, Any] = {
|
|
110
|
+
k: v for k, v in entry.items() if k not in ("tool", "mapping")
|
|
111
|
+
}
|
|
112
|
+
spec = {**body, "tools": (entry["tool"],)}
|
|
113
|
+
specs.append(IngestSourceSpec.model_validate(spec))
|
|
114
|
+
return IngestSourceDeclaration.model_validate(
|
|
115
|
+
{
|
|
116
|
+
"connector": CONNECTOR,
|
|
117
|
+
"sources": specs,
|
|
118
|
+
"schema_mappings": SCHEMA_MAPPINGS,
|
|
119
|
+
"resources": RESOURCES,
|
|
120
|
+
}
|
|
121
|
+
)
|
sql_mcp/mcp_server.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"api_version": "arbora.io/v1",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"connector_manifest.yml": "3f57351af0d7b55b2eb2e0cefdff0235b928cd8f9efe81f130c688424280a587",
|
|
5
|
-
"sql_mcp/connectors/mcp_source_presets.json": "ed6bbb14d4a0e706bbe2caa1a714f06093273cc288d49aa43ff887dd5e129c46",
|
|
6
|
-
"sql_mcp/connectors/tool_schema_fingerprints.json": "349901c65b6f1fd273ebdca0df935fab3308c612e7e7d334e836b5eded7fa3e5",
|
|
7
4
|
"sql_mcp/ontology/database.ttl": "1486055962ef7a286c349f6d3974bbe5d8176e88b627fb59c201b79a78153c64",
|
|
8
5
|
"sql_mcp/ontology/fixtures/records.json": "2a06e3f58c45c99a612d756419b9029fc7d14f5acaa1db77f964e32cc58c28d1",
|
|
9
6
|
"sql_mcp/ontology/mappings/source.yaml": "15faf4992ea561ea2ffa48bdd39ccb78823b11b31f32aeda2030479e700a521e",
|
sql_mcp/ontology/database.ttl
CHANGED
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
rdfs:comment """Ontology for modeling relational database schemas, tables, columns,
|
|
70
70
|
and keys. This maps database artifacts to logical Data Objects at the
|
|
71
71
|
ArchiMate Application/Technology layer, allowing code generators and
|
|
72
|
-
planners to dynamically reason about data layouts."""
|
|
73
|
-
|
|
72
|
+
planners to dynamically reason about data layouts.""" .
|
|
73
|
+
|
|
74
74
|
|
|
75
75
|
:DatabaseSchema a owl:Class ;
|
|
76
76
|
rdfs:label "Database Schema" ;
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
"schema_version": "1.0",
|
|
5
5
|
"prompt_version": "0.1.0",
|
|
6
6
|
"source": "sql-mcp",
|
|
7
|
-
"extends": "agent-connector-sdk:base",
|
|
8
|
-
"compose": "append",
|
|
9
7
|
"description": "Relational database specialist: safe parameterized querying, schema reflection, and knowledge-graph ingestion over the sql-mcp MCP server.",
|
|
10
8
|
"metadata": {
|
|
11
9
|
"topic": "Relational Databases",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sql-mcp
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Generic SQL database (Postgres, MySQL/MariaDB, MSSQL, Oracle, SQLite) API + MCP Server for Agentic AI!
|
|
5
5
|
Author-email: Project Maintainers <maintainers@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -12,11 +12,11 @@ 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.
|
|
15
|
+
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1
|
|
16
16
|
Requires-Dist: python-dotenv>=1.2.4
|
|
17
17
|
Requires-Dist: sqlalchemy>=2.1.5
|
|
18
18
|
Provides-Extra: mcp
|
|
19
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.
|
|
19
|
+
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
|
|
20
20
|
Provides-Extra: postgres
|
|
21
21
|
Requires-Dist: psycopg[binary]>=3.3.6; extra == "postgres"
|
|
22
22
|
Provides-Extra: mysql
|
|
@@ -2,30 +2,29 @@ sql_mcp/__init__.py,sha256=5RPpWUirl6MH-Y-N_FMHpJq-ukOPH1fB1wnz_XyJLW8,2106
|
|
|
2
2
|
sql_mcp/__main__.py,sha256=mIhGGMUEahk_4cx0922SnCGnSCL5SSg96W2Flymf8ac,87
|
|
3
3
|
sql_mcp/api_client.py,sha256=ecO-M6gqFR4fbQurXbGzGmcnN4XIL8X7udXeyeyrlJ4,216
|
|
4
4
|
sql_mcp/auth.py,sha256=scdCmW5aiG17togSnsjXIdaOqe2rbE993ssV8jgc1To,11096
|
|
5
|
+
sql_mcp/connector_sources.py,sha256=KycBmU75vfEq8QbzwwzLrroZSFbLyyHxMYOmbZY2eig,3572
|
|
5
6
|
sql_mcp/dialects.py,sha256=pemYDKtpzXO3xL7Gjh5dXpePN3T-oAhVlUp1MDgHcUs,6360
|
|
6
7
|
sql_mcp/kg_ingest.py,sha256=V2sJpYVgBeb_lNhHTuRJoRg6zkz_3aFek8rPuzWDRUI,10374
|
|
7
8
|
sql_mcp/kg_pgwire.py,sha256=wHuLugYqPPTRKoASPmsc6Q6G52lVpDJUCWZMjnrDkfk,4546
|
|
8
9
|
sql_mcp/mcp_config.json,sha256=mGkuD0FM6s7w4Nrwd7pJaQvjBkbH9Lgwwp800NQf2q8,711
|
|
9
|
-
sql_mcp/mcp_server.py,sha256=
|
|
10
|
+
sql_mcp/mcp_server.py,sha256=0u16bPdtEzbc0IqH2cXLM6QDMjG2qMT9tSmx_jErwyQ,2147
|
|
10
11
|
sql_mcp/safety.py,sha256=4G91ysVFtgYB_CCUJm4-WOdJwKuewO1lqy3MrKTVCHU,11527
|
|
11
12
|
sql_mcp/sql_input_models.py,sha256=rmPlvjXowefpBX4bJ3f7_YMx8hWQEvmTt_aGUuni_pU,3905
|
|
12
13
|
sql_mcp/sql_response_models.py,sha256=HDRVixwe_e-eJMpmjDMMsEvsQf8E6kVb3HN-lMA1T40,1724
|
|
13
14
|
sql_mcp/api/__init__.py,sha256=l6AnvVhbuZwNKTvNBBTyRYCh-LbqCjdo1Uv72Qu8rHw,197
|
|
14
15
|
sql_mcp/api/api_client_sql.py,sha256=TKdEbjZYK1UvGpaN4KHQ154bP4lHDd6AeAon5P_5m7g,65221
|
|
15
16
|
sql_mcp/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
sql_mcp/connectors/mcp_source_presets.json,sha256=wYtvMvA-BdSNRGGaBKagH0FfqfG_4uYY0iy5OF9hcvY,721
|
|
17
|
-
sql_mcp/connectors/tool_schema_fingerprints.json,sha256=Q9JLo_SIhOtG4G6qnXUSlkn-WzZp5IrUPS3ggTrVQmA,135
|
|
18
17
|
sql_mcp/mcp/__init__.py,sha256=LtlFYBHC_ic-cBeut2eK0mtUhWEbHQCmGt1yPa94qXk,127
|
|
19
18
|
sql_mcp/mcp/mcp_sql.py,sha256=eZWiQnoOiibTOqL9XyiUrbaDUfjK_HXvNKk3QDNNkKk,21394
|
|
20
19
|
sql_mcp/ontology/__init__.py,sha256=KXcZ1Yng5vXUU7bDChlJZLnM3XumEhDxnOQ2P-ziXtI,469
|
|
21
|
-
sql_mcp/ontology/certification.json,sha256=
|
|
22
|
-
sql_mcp/ontology/database.ttl,sha256=
|
|
20
|
+
sql_mcp/ontology/certification.json,sha256=Qv7uhu3Ym0U_ip2Jite3UzcIhx4P-trVS-VrEZNDqMs,1288
|
|
21
|
+
sql_mcp/ontology/database.ttl,sha256=m-2yVBPb1KqDrnbshLAl4B9eGv_Rr8AeiZ5UPlui29I,4985
|
|
23
22
|
sql_mcp/ontology/fixtures/records.json,sha256=Kgbj9YxFyZphLXVkGbkCn8fRT1rKodt3-WTjLMWMKNE,317
|
|
24
23
|
sql_mcp/ontology/mappings/source.yaml,sha256=Ffr0mS6lYeov-ki905zLeII7EbMfMq7aIDBHnnAKUh4,498
|
|
25
24
|
sql_mcp/ontology/migrations/manifest.json,sha256=GBib1qQMNoOAntnYCiF5Nhu8jqedEe0cO-1hUvZMM5Y,115
|
|
26
25
|
sql_mcp/ontology/shapes/connector.shacl.ttl,sha256=1LToYLSK0q2lca4eIaKdfV9pcOv0FpcC6xAS26ckIPk,3280
|
|
27
26
|
sql_mcp/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
sql_mcp/prompts/database_specialist.json,sha256=
|
|
27
|
+
sql_mcp/prompts/database_specialist.json,sha256=Tz4jnBS6tpDBhwF1cFJKN4hALAwJPF1_VRAdfBGhkQ0,2693
|
|
29
28
|
sql_mcp/skills/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
29
|
sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/SKILL.md,sha256=1BkiUwy80NpRCM_hjTNhbciryAWzdXM0sGuBJfKE_o0,4233
|
|
31
30
|
sql_mcp/skills/sql-mcp-knowledge-graph-ingestion/WORKFLOW.md,sha256=UA747xxFJ5UKitkwVFG0LPoM78VkU5oNGjsWPBIg3Ws,4195
|
|
@@ -36,9 +35,9 @@ sql_mcp/skills/sql-mcp-query-execution/SKILL.md,sha256=tOcutZN4mQh4iTrj9Rez-Awoz
|
|
|
36
35
|
sql_mcp/skills/sql-mcp-query-execution/WORKFLOW.md,sha256=b9T3rMCfOPcuBLiZ8xgJ1excQrPM8YEAWXWQKuVL_8E,4186
|
|
37
36
|
sql_mcp/skills/sql-mcp-schema-inspection/SKILL.md,sha256=vlvtcAe3nWMSycWg-yG9LTXpu0ARmSQtGd52f-SeZZ0,3590
|
|
38
37
|
sql_mcp/skills/sql-mcp-schema-inspection/WORKFLOW.md,sha256=7z9rdwPEx7BHLYMENsriGNrK8yCId87e-yyOZtfXHWw,3426
|
|
39
|
-
sql_mcp-2.3.
|
|
40
|
-
sql_mcp-2.3.
|
|
41
|
-
sql_mcp-2.3.
|
|
42
|
-
sql_mcp-2.3.
|
|
43
|
-
sql_mcp-2.3.
|
|
44
|
-
sql_mcp-2.3.
|
|
38
|
+
sql_mcp-2.3.4.dist-info/licenses/LICENSE,sha256=jF72OTufeQjenEQ8LJ_eSx7TAyClBHShwYcqjiTLrss,1070
|
|
39
|
+
sql_mcp-2.3.4.dist-info/METADATA,sha256=eEYbLPilYzd07wz22amJBGrzqPCFqp_fKEl_BxxkPBo,17905
|
|
40
|
+
sql_mcp-2.3.4.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
41
|
+
sql_mcp-2.3.4.dist-info/entry_points.txt,sha256=-_8V59_OIv10ftgZKUYoHvfKPHZoXl4-1b0rnSkcPV0,308
|
|
42
|
+
sql_mcp-2.3.4.dist-info/top_level.txt,sha256=8obmI-aU_EX11fzddBJK87KRYU3jQaaOzIi2VHAsMMs,8
|
|
43
|
+
sql_mcp-2.3.4.dist-info/RECORD,,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
[agent_connector_sdk.connector]
|
|
2
|
+
sql-mcp = sql_mcp
|
|
3
|
+
|
|
1
4
|
[agent_connector_sdk.ontology_providers]
|
|
2
5
|
sql-mcp = sql_mcp.ontology
|
|
3
6
|
|
|
@@ -7,8 +10,5 @@ sql-mcp = sql_mcp.prompts
|
|
|
7
10
|
[agent_connector_sdk.skill_providers]
|
|
8
11
|
sql-mcp = sql_mcp.skills
|
|
9
12
|
|
|
10
|
-
[agent_connector_sdk.source_connector_providers]
|
|
11
|
-
sql-mcp = sql_mcp.connectors
|
|
12
|
-
|
|
13
13
|
[console_scripts]
|
|
14
14
|
sql-mcp = sql_mcp.mcp_server:mcp_server
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "Tier-1 mcp_tool source presets for sql-mcp (AU-KG.ingest.mcp-tool-connector). Declarative doc-sync leg that syncs a connection's tables into the KG as lightweight 'database_table' documents via the sql-mcp MCP server. The primary, richer path is the native typed-node tool 'sql_ingest_schema' (see sql_mcp.kg_ingest), which emits :DatabaseTable/:DatabaseColumn/:DatabaseView/:DatabaseIndex nodes with structural links; this preset is the zero-code declarative complement. Contributed presets win over the central MCP_TOOL_PRESETS. The declarative sql-tables sweep is retired: a table sweep has no record identity and belongs to a data-platform source adapter; sql_ingest_schema is the supported path."
|
|
3
|
-
}
|
|
File without changes
|
|
File without changes
|