enterprise-data-agent 0.1.0__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 (32) hide show
  1. enterprise_data_agent-0.1.0/LICENSE +21 -0
  2. enterprise_data_agent-0.1.0/PKG-INFO +173 -0
  3. enterprise_data_agent-0.1.0/README.md +124 -0
  4. enterprise_data_agent-0.1.0/enterprise_data_agent/.env.example +19 -0
  5. enterprise_data_agent-0.1.0/enterprise_data_agent/__init__.py +3 -0
  6. enterprise_data_agent-0.1.0/enterprise_data_agent/__main__.py +4 -0
  7. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_ach_design.yaml +385 -0
  8. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_activity_types.yaml +121 -0
  9. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_balance_flow_activity.yaml +157 -0
  10. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_card.yaml +399 -0
  11. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_card_transaction_merchant.yaml +226 -0
  12. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_card_transaction_pos.yaml +263 -0
  13. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_date.yaml +882 -0
  14. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_kyc_status.yaml +101 -0
  15. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.dim_ledger_accounts.yaml +549 -0
  16. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_ach_transactions.yaml +1101 -0
  17. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_balance_inflow_outflow.yaml +429 -0
  18. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_card_transactions.yaml +888 -0
  19. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_card_transactions_design.yaml +881 -0
  20. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_financial_events.yaml +339 -0
  21. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_kiosk_loads.yaml +676 -0
  22. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_kyc_verification.yaml +1250 -0
  23. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_ledger_balances.yaml +240 -0
  24. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_program_fees.yaml +568 -0
  25. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_segmentation.yaml +422 -0
  26. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_settlement_detail.yaml +578 -0
  27. enterprise_data_agent-0.1.0/enterprise_data_agent/context/cinq.fact_transfers.yaml +1283 -0
  28. enterprise_data_agent-0.1.0/enterprise_data_agent/context/table_relationships.yaml +353 -0
  29. enterprise_data_agent-0.1.0/enterprise_data_agent/server.py +243 -0
  30. enterprise_data_agent-0.1.0/enterprise_data_agent/warehouse/__init__.py +0 -0
  31. enterprise_data_agent-0.1.0/enterprise_data_agent/warehouse/synapse_connector.py +191 -0
  32. enterprise_data_agent-0.1.0/pyproject.toml +57 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: enterprise-data-agent
3
+ Version: 0.1.0
4
+ Summary: MCP server that connects Claude/AI agents to Azure Synapse SQL data warehouses
5
+ Project-URL: Homepage, https://github.com/your-org/enterprise-data-agent
6
+ Project-URL: Bug Tracker, https://github.com/your-org/enterprise-data-agent/issues
7
+ License: MIT License
8
+
9
+ Copyright (c) 2024
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ License-File: LICENSE
29
+ Keywords: ai-agent,azure,claude,data-warehouse,mcp,synapse
30
+ Classifier: Development Status :: 4 - Beta
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: Intended Audience :: Information Technology
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.9
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Classifier: Topic :: Database
41
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
42
+ Requires-Python: >=3.9
43
+ Requires-Dist: azure-identity>=1.15.0
44
+ Requires-Dist: mcp[cli]>=1.0.0
45
+ Requires-Dist: pyodbc>=4.0.39
46
+ Requires-Dist: python-dotenv>=1.0.0
47
+ Requires-Dist: pyyaml>=6.0
48
+ Description-Content-Type: text/markdown
49
+
50
+ # enterprise-data-agent
51
+
52
+ An MCP (Model Context Protocol) server that connects Claude and other AI agents to Azure Synapse SQL data warehouses. Once installed, Claude can list tables, describe schemas, and run read-only SQL queries directly against your warehouse.
53
+
54
+ ## Prerequisites
55
+
56
+ **Python 3.9+** and the **Microsoft ODBC Driver 17 (or 18) for SQL Server** must be installed on the machine running this server.
57
+
58
+ - Windows/macOS/Linux: [Download ODBC Driver for SQL Server](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server)
59
+
60
+ > **Note:** `pyodbc` installs via pip but will fail at runtime without the system-level ODBC driver.
61
+
62
+ ## Installation
63
+
64
+ ```bash
65
+ pip install enterprise-data-agent
66
+ ```
67
+
68
+ All Python dependencies (python-dotenv, pyodbc, azure-identity, mcp, pyyaml) are installed automatically.
69
+
70
+ ## Configuration
71
+
72
+ Create a `.env` file in the directory where you run the server, or pass environment variables directly via your MCP client config (recommended for Claude Desktop).
73
+
74
+ ### Environment Variables
75
+
76
+ | Variable | Required | Description |
77
+ |---|---|---|
78
+ | `WAREHOUSE_HOST` | Yes | Azure Synapse SQL server hostname (e.g. `workspace-ondemand.sql.azuresynapse.net`) |
79
+ | `WAREHOUSE_DATABASE` | Yes | Database name |
80
+ | `WAREHOUSE_SCHEMA` | No | Default schema (default: `dbo`) |
81
+ | `WAREHOUSE_PORT` | No | TCP port (default: `1433`) |
82
+ | `WAREHOUSE_AUTH_METHOD` | No | `basic` or `azure_ad` (default: `basic`) |
83
+ | `WAREHOUSE_USER` | If basic auth | Database username |
84
+ | `WAREHOUSE_PASSWORD` | If basic auth | Database password |
85
+ | `AZURE_TENANT_ID` | If azure_ad | Azure tenant ID |
86
+ | `AZURE_CLIENT_ID` | If azure_ad | Azure app/client ID |
87
+ | `AZURE_CLIENT_SECRET` | If azure_ad | Azure client secret (leave blank for interactive MFA) |
88
+
89
+ ### Example .env file
90
+
91
+ ```env
92
+ WAREHOUSE_HOST=your-workspace-ondemand.sql.azuresynapse.net
93
+ WAREHOUSE_PORT=1433
94
+ WAREHOUSE_DATABASE=your-database
95
+ WAREHOUSE_SCHEMA=your-schema
96
+
97
+ # Authentication Method: "basic" or "azure_ad"
98
+ WAREHOUSE_AUTH_METHOD=azure_ad
99
+
100
+ # Basic Auth (only needed if WAREHOUSE_AUTH_METHOD=basic)
101
+ WAREHOUSE_USER=your-username
102
+ WAREHOUSE_PASSWORD=your-password
103
+
104
+ # Azure AD Auth (only needed if WAREHOUSE_AUTH_METHOD=azure_ad)
105
+ # Leave AZURE_CLIENT_SECRET blank for interactive MFA login
106
+ AZURE_TENANT_ID=your-tenant-id
107
+ AZURE_CLIENT_ID=your-client-id
108
+ AZURE_CLIENT_SECRET=your-client-secret
109
+ ```
110
+
111
+ ## Usage with Claude Desktop
112
+
113
+ Add the following to your `claude_desktop_config.json` (found at `~/Library/Application Support/Claude/` on macOS or `%APPDATA%\Claude\` on Windows):
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "enterprise-data-agent": {
119
+ "command": "enterprise-data-agent",
120
+ "env": {
121
+ "WAREHOUSE_HOST": "your-workspace-ondemand.sql.azuresynapse.net",
122
+ "WAREHOUSE_DATABASE": "your-database",
123
+ "WAREHOUSE_SCHEMA": "cinq",
124
+ "WAREHOUSE_AUTH_METHOD": "azure_ad",
125
+ "AZURE_TENANT_ID": "your-tenant-id",
126
+ "AZURE_CLIENT_ID": "your-client-id",
127
+ "AZURE_CLIENT_SECRET": "your-client-secret"
128
+ }
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ ## Authentication Modes
135
+
136
+ ### Azure AD — Service Principal (unattended)
137
+ Set `WAREHOUSE_AUTH_METHOD=azure_ad` and provide all three of `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`. Best for automated/production use.
138
+
139
+ ### Azure AD — Interactive MFA (browser login)
140
+ Set `WAREHOUSE_AUTH_METHOD=azure_ad`, provide `AZURE_TENANT_ID` and `AZURE_CLIENT_ID`, but leave `AZURE_CLIENT_SECRET` blank. A browser window will open for login on first run.
141
+
142
+ ### Basic Auth (username/password)
143
+ Set `WAREHOUSE_AUTH_METHOD=basic` and provide `WAREHOUSE_USER` and `WAREHOUSE_PASSWORD`.
144
+
145
+ ## Available MCP Tools
146
+
147
+ | Tool | Description |
148
+ |---|---|
149
+ | `query` | Execute a read-only SELECT statement (write operations are blocked) |
150
+ | `list_tables` | List all tables and views in a schema |
151
+ | `describe_schema` | Return column-level structure for a table, enriched with statistics and sample data |
152
+
153
+ ## Available MCP Resources
154
+
155
+ | Resource | Description |
156
+ |---|---|
157
+ | `context://tables` | List all tables that have a context YAML file |
158
+ | `context://tables/{schema}.{table}` | Full column stats, categorical values, and sample rows for a table |
159
+ | `context://relationships` | Table relationship and join-candidate definitions |
160
+
161
+ ## Running Manually
162
+
163
+ ```bash
164
+ # With .env file in current directory
165
+ enterprise-data-agent
166
+
167
+ # Or via python -m
168
+ python -m enterprise_data_agent
169
+ ```
170
+
171
+ ## License
172
+
173
+ MIT
@@ -0,0 +1,124 @@
1
+ # enterprise-data-agent
2
+
3
+ An MCP (Model Context Protocol) server that connects Claude and other AI agents to Azure Synapse SQL data warehouses. Once installed, Claude can list tables, describe schemas, and run read-only SQL queries directly against your warehouse.
4
+
5
+ ## Prerequisites
6
+
7
+ **Python 3.9+** and the **Microsoft ODBC Driver 17 (or 18) for SQL Server** must be installed on the machine running this server.
8
+
9
+ - Windows/macOS/Linux: [Download ODBC Driver for SQL Server](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server)
10
+
11
+ > **Note:** `pyodbc` installs via pip but will fail at runtime without the system-level ODBC driver.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install enterprise-data-agent
17
+ ```
18
+
19
+ All Python dependencies (python-dotenv, pyodbc, azure-identity, mcp, pyyaml) are installed automatically.
20
+
21
+ ## Configuration
22
+
23
+ Create a `.env` file in the directory where you run the server, or pass environment variables directly via your MCP client config (recommended for Claude Desktop).
24
+
25
+ ### Environment Variables
26
+
27
+ | Variable | Required | Description |
28
+ |---|---|---|
29
+ | `WAREHOUSE_HOST` | Yes | Azure Synapse SQL server hostname (e.g. `workspace-ondemand.sql.azuresynapse.net`) |
30
+ | `WAREHOUSE_DATABASE` | Yes | Database name |
31
+ | `WAREHOUSE_SCHEMA` | No | Default schema (default: `dbo`) |
32
+ | `WAREHOUSE_PORT` | No | TCP port (default: `1433`) |
33
+ | `WAREHOUSE_AUTH_METHOD` | No | `basic` or `azure_ad` (default: `basic`) |
34
+ | `WAREHOUSE_USER` | If basic auth | Database username |
35
+ | `WAREHOUSE_PASSWORD` | If basic auth | Database password |
36
+ | `AZURE_TENANT_ID` | If azure_ad | Azure tenant ID |
37
+ | `AZURE_CLIENT_ID` | If azure_ad | Azure app/client ID |
38
+ | `AZURE_CLIENT_SECRET` | If azure_ad | Azure client secret (leave blank for interactive MFA) |
39
+
40
+ ### Example .env file
41
+
42
+ ```env
43
+ WAREHOUSE_HOST=your-workspace-ondemand.sql.azuresynapse.net
44
+ WAREHOUSE_PORT=1433
45
+ WAREHOUSE_DATABASE=your-database
46
+ WAREHOUSE_SCHEMA=your-schema
47
+
48
+ # Authentication Method: "basic" or "azure_ad"
49
+ WAREHOUSE_AUTH_METHOD=azure_ad
50
+
51
+ # Basic Auth (only needed if WAREHOUSE_AUTH_METHOD=basic)
52
+ WAREHOUSE_USER=your-username
53
+ WAREHOUSE_PASSWORD=your-password
54
+
55
+ # Azure AD Auth (only needed if WAREHOUSE_AUTH_METHOD=azure_ad)
56
+ # Leave AZURE_CLIENT_SECRET blank for interactive MFA login
57
+ AZURE_TENANT_ID=your-tenant-id
58
+ AZURE_CLIENT_ID=your-client-id
59
+ AZURE_CLIENT_SECRET=your-client-secret
60
+ ```
61
+
62
+ ## Usage with Claude Desktop
63
+
64
+ Add the following to your `claude_desktop_config.json` (found at `~/Library/Application Support/Claude/` on macOS or `%APPDATA%\Claude\` on Windows):
65
+
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "enterprise-data-agent": {
70
+ "command": "enterprise-data-agent",
71
+ "env": {
72
+ "WAREHOUSE_HOST": "your-workspace-ondemand.sql.azuresynapse.net",
73
+ "WAREHOUSE_DATABASE": "your-database",
74
+ "WAREHOUSE_SCHEMA": "cinq",
75
+ "WAREHOUSE_AUTH_METHOD": "azure_ad",
76
+ "AZURE_TENANT_ID": "your-tenant-id",
77
+ "AZURE_CLIENT_ID": "your-client-id",
78
+ "AZURE_CLIENT_SECRET": "your-client-secret"
79
+ }
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ## Authentication Modes
86
+
87
+ ### Azure AD — Service Principal (unattended)
88
+ Set `WAREHOUSE_AUTH_METHOD=azure_ad` and provide all three of `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`. Best for automated/production use.
89
+
90
+ ### Azure AD — Interactive MFA (browser login)
91
+ Set `WAREHOUSE_AUTH_METHOD=azure_ad`, provide `AZURE_TENANT_ID` and `AZURE_CLIENT_ID`, but leave `AZURE_CLIENT_SECRET` blank. A browser window will open for login on first run.
92
+
93
+ ### Basic Auth (username/password)
94
+ Set `WAREHOUSE_AUTH_METHOD=basic` and provide `WAREHOUSE_USER` and `WAREHOUSE_PASSWORD`.
95
+
96
+ ## Available MCP Tools
97
+
98
+ | Tool | Description |
99
+ |---|---|
100
+ | `query` | Execute a read-only SELECT statement (write operations are blocked) |
101
+ | `list_tables` | List all tables and views in a schema |
102
+ | `describe_schema` | Return column-level structure for a table, enriched with statistics and sample data |
103
+
104
+ ## Available MCP Resources
105
+
106
+ | Resource | Description |
107
+ |---|---|
108
+ | `context://tables` | List all tables that have a context YAML file |
109
+ | `context://tables/{schema}.{table}` | Full column stats, categorical values, and sample rows for a table |
110
+ | `context://relationships` | Table relationship and join-candidate definitions |
111
+
112
+ ## Running Manually
113
+
114
+ ```bash
115
+ # With .env file in current directory
116
+ enterprise-data-agent
117
+
118
+ # Or via python -m
119
+ python -m enterprise_data_agent
120
+ ```
121
+
122
+ ## License
123
+
124
+ MIT
@@ -0,0 +1,19 @@
1
+ # Data Warehouse Configuration - Azure Synapse SQL
2
+ WAREHOUSE_HOST=your-synapse-workspace-ondemand.sql.azuresynapse.net
3
+ WAREHOUSE_PORT=1433
4
+ WAREHOUSE_DATABASE=your-database
5
+ WAREHOUSE_SCHEMA=your-schema
6
+
7
+ # Authentication Method: "basic" (username/password) or "azure_ad" (service principal / MFA)
8
+ WAREHOUSE_AUTH_METHOD=azure_ad
9
+
10
+ # Basic Auth (only needed if WAREHOUSE_AUTH_METHOD=basic)
11
+ WAREHOUSE_USER=your-username
12
+ WAREHOUSE_PASSWORD=your-password
13
+
14
+ # Azure AD Auth (only needed if WAREHOUSE_AUTH_METHOD=azure_ad)
15
+ # Leave AZURE_CLIENT_SECRET blank for interactive MFA login (browser prompt)
16
+ # Set all three for unattended service principal auth
17
+ AZURE_TENANT_ID=your-tenant-id
18
+ AZURE_CLIENT_ID=your-client-id
19
+ AZURE_CLIENT_SECRET=your-client-secret
@@ -0,0 +1,3 @@
1
+ """enterprise-data-agent: MCP server for Azure Synapse SQL data warehouses."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ """Allows running as: python -m enterprise_data_agent"""
2
+ from enterprise_data_agent.server import main
3
+
4
+ main()