mcp-server-motherduck 0.6.0__py3-none-any.whl → 0.6.2__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.
Potentially problematic release.
This version of mcp-server-motherduck might be problematic. Click here for more details.
- mcp_server_motherduck/configs.py +1 -1
- mcp_server_motherduck/database.py +1 -9
- {mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/METADATA +12 -12
- mcp_server_motherduck-0.6.2.dist-info/RECORD +10 -0
- mcp_server_motherduck-0.6.0.dist-info/RECORD +0 -10
- {mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/WHEEL +0 -0
- {mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/entry_points.txt +0 -0
- {mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/licenses/LICENSE +0 -0
mcp_server_motherduck/configs.py
CHANGED
|
@@ -53,13 +53,10 @@ class DatabaseClient:
|
|
|
53
53
|
logger.error(f"❌ Read-only check failed: {e}")
|
|
54
54
|
raise
|
|
55
55
|
|
|
56
|
-
if self._read_only:
|
|
57
|
-
raise ValueError(
|
|
58
|
-
"Read-only mode is only supported for local DuckDB databases. See `saas_mode` for similar functionality with MotherDuck."
|
|
59
|
-
)
|
|
60
56
|
conn = duckdb.connect(
|
|
61
57
|
self.db_path,
|
|
62
58
|
config={"custom_user_agent": f"mcp-server-motherduck/{SERVER_VERSION}"},
|
|
59
|
+
read_only=self._read_only,
|
|
63
60
|
)
|
|
64
61
|
|
|
65
62
|
logger.info(f"✅ Successfully connected to {self.db_type} database")
|
|
@@ -101,11 +98,6 @@ class DatabaseClient:
|
|
|
101
98
|
if db_path == ":memory:":
|
|
102
99
|
return db_path, "duckdb"
|
|
103
100
|
|
|
104
|
-
# Handle local database paths as the last check
|
|
105
|
-
if not os.path.exists(db_path):
|
|
106
|
-
raise FileNotFoundError(
|
|
107
|
-
f"The local database path `{db_path}` does not exist."
|
|
108
|
-
)
|
|
109
101
|
return db_path, "duckdb"
|
|
110
102
|
|
|
111
103
|
def _execute(self, query: str) -> str:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-server-motherduck
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: A MCP server for MotherDuck and local DuckDB
|
|
5
5
|
Author-email: tdoehmen <till@motherduck.com>
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Python: >=3.10
|
|
8
8
|
Requires-Dist: anyio>=4.8.0
|
|
9
9
|
Requires-Dist: click>=8.1.8
|
|
10
|
-
Requires-Dist: duckdb==1.3.
|
|
10
|
+
Requires-Dist: duckdb==1.3.1
|
|
11
11
|
Requires-Dist: mcp>=1.9.4
|
|
12
12
|
Requires-Dist: starlette>=0.46.1
|
|
13
13
|
Requires-Dist: tabulate>=0.9.0
|
|
@@ -54,16 +54,16 @@ All interactions with both DuckDB and MotherDuck are done through writing SQL qu
|
|
|
54
54
|
|
|
55
55
|
The MCP server supports the following parameters:
|
|
56
56
|
|
|
57
|
-
| Parameter | Type | Default | Description
|
|
58
|
-
|
|
59
|
-
| `--transport` | Choice | `stdio` | Transport type. Options: `stdio`, `sse`, `stream`
|
|
60
|
-
| `--port` | Integer | `8000` | Port to listen on for sse and stream transport mode
|
|
61
|
-
| `--db-path` | String | `md:` | Path to local DuckDB database file or MotherDuck database
|
|
62
|
-
| `--motherduck-token` | String | `None` | Access token to use for MotherDuck database connections (uses `motherduck_token` env var by default)
|
|
63
|
-
| `--read-only` | Flag | `False` | Flag for connecting to DuckDB in read-only mode.
|
|
64
|
-
| `--home-dir` | String | `None` | Home directory for DuckDB (uses `HOME` env var by default)
|
|
65
|
-
| `--saas-mode` | Flag | `False` | Flag for connecting to MotherDuck in SaaS mode |
|
|
66
|
-
| `--json-response` | Flag | `False` | Enable JSON responses for HTTP stream. Only supported for `stream` transport
|
|
57
|
+
| Parameter | Type | Default | Description |
|
|
58
|
+
|-----------|------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
59
|
+
| `--transport` | Choice | `stdio` | Transport type. Options: `stdio`, `sse`, `stream` |
|
|
60
|
+
| `--port` | Integer | `8000` | Port to listen on for sse and stream transport mode |
|
|
61
|
+
| `--db-path` | String | `md:` | Path to local DuckDB database file or MotherDuck database |
|
|
62
|
+
| `--motherduck-token` | String | `None` | Access token to use for MotherDuck database connections (uses `motherduck_token` env var by default) |
|
|
63
|
+
| `--read-only` | Flag | `False` | Flag for connecting to DuckDB or MotherDuck in read-only mode. For DuckDB it uses short-lived connections to enable concurrent access |
|
|
64
|
+
| `--home-dir` | String | `None` | Home directory for DuckDB (uses `HOME` env var by default) |
|
|
65
|
+
| `--saas-mode` | Flag | `False` | Flag for connecting to MotherDuck in [SaaS mode](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/#authentication-using-saas-mode). (disables filesystem and write permissions for local DuckDB) |
|
|
66
|
+
| `--json-response` | Flag | `False` | Enable JSON responses for HTTP stream. Only supported for `stream` transport |
|
|
67
67
|
|
|
68
68
|
### Quick Usage Examples
|
|
69
69
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
mcp_server_motherduck/__init__.py,sha256=vogjO-bwHYZFut85eeiVmRepamcWHk8bImri_kBKZMU,6026
|
|
2
|
+
mcp_server_motherduck/configs.py,sha256=bxbmWi4BzgB9p8kfb_A-RCQESc4P1Eb7BF8WV-PX6ss,771
|
|
3
|
+
mcp_server_motherduck/database.py,sha256=3qkeBIpf08WV6pz9rf52b_MipzaHALurFugMx-XARI8,4513
|
|
4
|
+
mcp_server_motherduck/prompt.py,sha256=P7BrmhVXwDkPeSHQ3f25WMP6lpBpN2BxDzYPOQ3fxX8,56699
|
|
5
|
+
mcp_server_motherduck/server.py,sha256=U1LM2oQ36gO_pAZuez9HV_u8YDWdER8tQIdDbiXfzx0,5232
|
|
6
|
+
mcp_server_motherduck-0.6.2.dist-info/METADATA,sha256=D886bXRNF7h6q6TpMP-cSWR7KEdRyCIOGxm2y7914Ts,15657
|
|
7
|
+
mcp_server_motherduck-0.6.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
8
|
+
mcp_server_motherduck-0.6.2.dist-info/entry_points.txt,sha256=dRTgcvWJn40bz0PVuKPylK6w92cFN32lwunZOgo5j4s,69
|
|
9
|
+
mcp_server_motherduck-0.6.2.dist-info/licenses/LICENSE,sha256=Tj68w9jCiceFKTvZ3jET-008NjhozcQMXpm-fyL9WUI,1067
|
|
10
|
+
mcp_server_motherduck-0.6.2.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
mcp_server_motherduck/__init__.py,sha256=vogjO-bwHYZFut85eeiVmRepamcWHk8bImri_kBKZMU,6026
|
|
2
|
-
mcp_server_motherduck/configs.py,sha256=0owM37f8Vw0Ieqc4eKP7HNrp_W40PcivmlRaaMR4uB0,771
|
|
3
|
-
mcp_server_motherduck/database.py,sha256=RQeVFSL5Uo5hyuysSeJPkz_fCQHijHJYTnBBdPvemvU,4902
|
|
4
|
-
mcp_server_motherduck/prompt.py,sha256=P7BrmhVXwDkPeSHQ3f25WMP6lpBpN2BxDzYPOQ3fxX8,56699
|
|
5
|
-
mcp_server_motherduck/server.py,sha256=U1LM2oQ36gO_pAZuez9HV_u8YDWdER8tQIdDbiXfzx0,5232
|
|
6
|
-
mcp_server_motherduck-0.6.0.dist-info/METADATA,sha256=eJkdX5OBln_0ZGYagtyUiqj5AEIHs1Y4tMdN3uDofAc,13718
|
|
7
|
-
mcp_server_motherduck-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
8
|
-
mcp_server_motherduck-0.6.0.dist-info/entry_points.txt,sha256=dRTgcvWJn40bz0PVuKPylK6w92cFN32lwunZOgo5j4s,69
|
|
9
|
-
mcp_server_motherduck-0.6.0.dist-info/licenses/LICENSE,sha256=Tj68w9jCiceFKTvZ3jET-008NjhozcQMXpm-fyL9WUI,1067
|
|
10
|
-
mcp_server_motherduck-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
{mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{mcp_server_motherduck-0.6.0.dist-info → mcp_server_motherduck-0.6.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|