@mimdb/mcp 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +101 -0
  2. package/package.json +4 -3
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # @mimdb/mcp
2
+
3
+ MCP (Model Context Protocol) server that connects AI assistants to your [MimDB](https://mimdb.dev) projects. Query databases, manage storage, run SQL, search docs, and more - directly from Claude Code, Cursor, VS Code, or any MCP-compatible client.
4
+
5
+ ## Quick Start
6
+
7
+ No installation required - run via `npx`:
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "mimdb": {
13
+ "command": "npx",
14
+ "args": ["-y", "@mimdb/mcp"],
15
+ "env": {
16
+ "MIMDB_URL": "https://api.mimdb.cloud",
17
+ "MIMDB_PROJECT_REF": "your-project-ref",
18
+ "MIMDB_SERVICE_ROLE_KEY": "your-service-role-key"
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ **Claude Code:** Add to `.mcp.json` in your project root.
26
+
27
+ **Cursor:** Add to `.cursor/mcp.json` in your project root.
28
+
29
+ **VS Code:** Add to `.vscode/mcp.json` with `"type": "stdio"` and `"command"` / `"args"` / `"env"` fields.
30
+
31
+ ## Configuration
32
+
33
+ ### Required
34
+
35
+ | Variable | Description |
36
+ |----------|-------------|
37
+ | `MIMDB_URL` | Your MimDB instance URL (e.g., `https://api.mimdb.cloud`) |
38
+ | `MIMDB_PROJECT_REF` | Project ref - 16-character hex string from your project settings |
39
+ | `MIMDB_SERVICE_ROLE_KEY` | Service role API key from your project settings |
40
+
41
+ ### Optional
42
+
43
+ | Variable | Description | Default |
44
+ |----------|-------------|---------|
45
+ | `MIMDB_READ_ONLY` | Set to `true` to disable all write operations | `false` |
46
+ | `MIMDB_FEATURES` | Comma-separated list of feature groups to enable | All enabled |
47
+
48
+ ## Available Tools (28)
49
+
50
+ ### Database (4 tools)
51
+ - `list_tables` - List all tables with column counts and row estimates
52
+ - `get_table_schema` - Get columns, types, constraints, foreign keys, and indexes
53
+ - `execute_sql` - Run parameterized SQL queries
54
+ - `execute_sql_dry_run` - Preview SQL in a read-only transaction (always rolls back)
55
+
56
+ ### Storage (10 tools)
57
+ - `list_buckets` / `create_bucket` / `update_bucket` / `delete_bucket`
58
+ - `list_objects` / `upload_object` / `download_object` / `delete_object`
59
+ - `get_signed_url` / `get_public_url`
60
+
61
+ ### Cron (5 tools)
62
+ - `list_jobs` / `create_job` / `get_job` / `delete_job` / `get_job_history`
63
+
64
+ ### Vectors (5 tools)
65
+ - `list_vector_tables` / `create_vector_table` / `delete_vector_table`
66
+ - `create_vector_index` / `vector_search`
67
+
68
+ ### Debugging (1 tool)
69
+ - `get_query_stats` - Slowest queries, call counts, execution times
70
+
71
+ ### Development (2 tools)
72
+ - `get_project_url` - Get your project's API URL and ref
73
+ - `generate_types` - Generate TypeScript interfaces from your database schema
74
+
75
+ ### Docs (1 tool)
76
+ - `search_docs` - Search MimDB documentation
77
+
78
+ ## Permission Controls
79
+
80
+ **Read-only mode** (`MIMDB_READ_ONLY=true`): Write tools are completely removed - the AI never sees them. SQL is restricted to SELECT/EXPLAIN/SHOW with server-side enforcement via `SET TRANSACTION READ ONLY`.
81
+
82
+ **Feature filtering** (`MIMDB_FEATURES=database,docs`): Only register the listed groups. Valid groups: `database`, `storage`, `cron`, `vectors`, `development`, `debugging`, `docs`.
83
+
84
+ ## Safety
85
+
86
+ - SQL results are wrapped with prompt injection mitigation markers
87
+ - Client-side SQL validation rejects writes in read-only mode before reaching the API
88
+ - `EXPLAIN ANALYZE` is blocked in read-only mode (it executes the query)
89
+ - Multi-statement SQL is rejected in read-only mode
90
+ - Destructive operations require explicit confirmation parameters
91
+ - All inputs validated with Zod schemas before reaching the API
92
+
93
+ ## Links
94
+
95
+ - [MimDB Documentation](https://docs.mimdb.dev)
96
+ - [GitHub Repository](https://github.com/MimDB/MCP)
97
+ - [Report Issues](https://github.com/MimDB/MCP/issues)
98
+
99
+ ## License
100
+
101
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimdb/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server for MimDB - AI assistant integration",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,10 +14,11 @@
14
14
  "module": "./dist/index.js",
15
15
  "types": "./dist/index.d.ts",
16
16
  "bin": {
17
- "mimdb-mcp": "./dist/index.js"
17
+ "mimdb-mcp": "dist/index.js"
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "README.md"
21
22
  ],
22
23
  "dependencies": {
23
24
  "@modelcontextprotocol/sdk": "^1.12.1",