omnibase-mcp 0.1.26 → 0.1.30
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.
- package/CHANGELOG.md +46 -0
- package/README.md +159 -218
- package/assets/banner.svg +167 -0
- package/assets/logo.svg +109 -0
- package/dist/src/audit-logger.d.ts +2 -0
- package/dist/src/audit-logger.js +8 -2
- package/dist/src/audit-logger.js.map +1 -1
- package/dist/src/cli/drivers.d.ts +23 -0
- package/dist/src/cli/drivers.js +363 -0
- package/dist/src/cli/drivers.js.map +1 -0
- package/dist/src/cli/sidecar-utils.js +1 -1
- package/dist/src/cli/sidecar-utils.js.map +1 -1
- package/dist/src/cli/tools.js +12 -8
- package/dist/src/cli/tools.js.map +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/connection-manager.d.ts +3 -1
- package/dist/src/connection-manager.js +9 -3
- package/dist/src/connection-manager.js.map +1 -1
- package/dist/src/custom-tools.js +40 -74
- package/dist/src/custom-tools.js.map +1 -1
- package/dist/src/index.js +99 -21
- package/dist/src/index.js.map +1 -1
- package/dist/src/output-formatter.js +2 -0
- package/dist/src/output-formatter.js.map +1 -1
- package/dist/src/sidecar-client.d.ts +5 -2
- package/dist/src/sidecar-client.js +24 -4
- package/dist/src/sidecar-client.js.map +1 -1
- package/dist/src/sql-dialect.d.ts +4 -1
- package/dist/src/sql-dialect.js +5 -3
- package/dist/src/sql-dialect.js.map +1 -1
- package/dist/src/tools/execute-sql.d.ts +2 -0
- package/dist/src/tools/execute-sql.js +22 -13
- package/dist/src/tools/execute-sql.js.map +1 -1
- package/dist/src/tools/explain-query.d.ts +1 -0
- package/dist/src/tools/explain-query.js +3 -3
- package/dist/src/tools/explain-query.js.map +1 -1
- package/dist/src/tools/get-indexes.d.ts +3 -0
- package/dist/src/tools/get-indexes.js +8 -2
- package/dist/src/tools/get-indexes.js.map +1 -1
- package/dist/src/tools/get-sample.d.ts +2 -0
- package/dist/src/tools/get-sample.js +4 -1
- package/dist/src/tools/get-sample.js.map +1 -1
- package/dist/src/tools/get-table-stats.js +13 -9
- package/dist/src/tools/get-table-stats.js.map +1 -1
- package/dist/src/tools/list-connections.js +1 -1
- package/dist/src/tools/list-connections.js.map +1 -1
- package/dist/src/types.d.ts +7 -2
- package/dist/src/types.js.map +1 -1
- package/docs/cli.md +54 -0
- package/docs/configuration.md +80 -0
- package/docs/custom-tools.md +115 -0
- package/docs/security.md +45 -0
- package/docs/use-cases.md +128 -0
- package/package.json +6 -6
- package/scripts/postinstall.js +132 -7
- package/sidecar/drivers.json +184 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.30](https://github.com/itsJeremyMax/omnibase/compare/omnibase-mcp-v0.1.29...omnibase-mcp-v0.1.30) (2026-04-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* use DEB822 format for arm64 cross-compile apt sources on Ubuntu 24.04 ([cb87ce1](https://github.com/itsJeremyMax/omnibase/commit/cb87ce1e0bf64874ab6b378034ce5e3d0f0e8790))
|
|
9
|
+
|
|
10
|
+
## [0.1.29](https://github.com/itsJeremyMax/omnibase/compare/omnibase-mcp-v0.1.28...omnibase-mcp-v0.1.29) (2026-04-08)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* remove malformed Microsoft apt source before arm64 cross-compile, downgrade @types/node to ^22 ([2148c44](https://github.com/itsJeremyMax/omnibase/commit/2148c4486e379225b0b8370df9145091965a01d5))
|
|
16
|
+
* set CGO include paths for unixodbc on macOS Apple Silicon ([ab1a54c](https://github.com/itsJeremyMax/omnibase/commit/ab1a54cbf40ae044094e8b92031b3b261abd78a6))
|
|
17
|
+
|
|
18
|
+
## [0.1.28](https://github.com/itsJeremyMax/omnibase/compare/omnibase-mcp-v0.1.27...omnibase-mcp-v0.1.28) (2026-04-08)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* add omnibase logo and banner ([f307f34](https://github.com/itsJeremyMax/omnibase/commit/f307f34be387883df6e0c24c722412d08b69c467))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* install unixodbc-dev headers for ODBC driver builds in CI ([0402b0d](https://github.com/itsJeremyMax/omnibase/commit/0402b0da1d04e6c1601cbc19aed4ea09782bd3bf))
|
|
29
|
+
* relax get_table_stats assertion for MySQL, update dependencies ([f0fe54b](https://github.com/itsJeremyMax/omnibase/commit/f0fe54ba93c043399b18c2c09fcbdae29c30fd61))
|
|
30
|
+
* sidecar version file path, 10 bug fixes, README redesign, integration tests ([054cefd](https://github.com/itsJeremyMax/omnibase/commit/054cefd1d01a9d50d5d47e0f12b3a1eb025910cc))
|
|
31
|
+
* sync package.json version ranges with lockfile ([ee75a54](https://github.com/itsJeremyMax/omnibase/commit/ee75a5426a724c25cf2420d51017e44d79ac35c8))
|
|
32
|
+
|
|
33
|
+
## [0.1.27](https://github.com/itsJeremyMax/omnibase/compare/omnibase-mcp-v0.1.26...omnibase-mcp-v0.1.27) (2026-04-02)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* add reviewer-suggested MCP tool enhancements ([b2d948d](https://github.com/itsJeremyMax/omnibase/commit/b2d948d920d31cc7b5808d89da0166b42e5fc0a0))
|
|
39
|
+
* dynamic driver plugin architecture ([a9786d3](https://github.com/itsJeremyMax/omnibase/commit/a9786d3ae1bea9ccf3f8729ca1bd62cb522a82f2))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* add --help flag and error on unknown CLI commands ([c9fc15c](https://github.com/itsJeremyMax/omnibase/commit/c9fc15c5172e4ea03acc30630bee41fbe3f8cf3f))
|
|
45
|
+
* decouple release pipeline from release-please output ([c442629](https://github.com/itsJeremyMax/omnibase/commit/c4426294cff06ec2ad3c3df88077881e32afa894))
|
|
46
|
+
* harden driver system with audit fixes, checksum verification, and bug fixes ([c39b1f8](https://github.com/itsJeremyMax/omnibase/commit/c39b1f8ee1b4744dec9559958cb29465e1a42392))
|
|
47
|
+
* update go base image to 1.26 to match sidecar go.mod requirement ([#37](https://github.com/itsJeremyMax/omnibase/issues/37)) ([b56603a](https://github.com/itsJeremyMax/omnibase/commit/b56603aaf21ce634e4e4ad2300c135fcf31047fc))
|
|
48
|
+
|
|
3
49
|
## [0.1.26](https://github.com/itsJeremyMax/omnibase/compare/omnibase-mcp-v0.1.25...omnibase-mcp-v0.1.26) (2026-03-31)
|
|
4
50
|
|
|
5
51
|
|
package/README.md
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.svg" alt="Omnibase" width="100%" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
Give your AI agent secure access to
|
|
5
|
+
Give your AI agent secure access to every database. PostgreSQL, MySQL, SQLite, ClickHouse, SQL Server, and [50+ more](https://github.com/xo/usql) through a single MCP server. Works with Claude Code, OpenCode, GitHub Copilot, Cursor, and any MCP-compatible client.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
connections
|
|
8
|
-
prod:
|
|
9
|
-
dsn: $DATABASE_URL # credentials stay in your environment
|
|
10
|
-
permission: read-only # read-only | read-write | admin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
You: "What tables have the most NULL values?"
|
|
15
|
-
Agent: [calls get_table_stats] → shows null percentages per column across all tables
|
|
16
|
-
```
|
|
7
|
+
- **One server, every database.** Connect Postgres, MySQL, ClickHouse, and SQL Server side by side. Your agent picks the right one.
|
|
8
|
+
- **Secure by default.** Read-only permissions, query classification, credential isolation. Agents get guardrails, not footguns.
|
|
9
|
+
- **Shareable config.** One YAML file defines connections, permissions, and custom tools. Commit it, and your whole team gets the same agent capabilities.
|
|
17
10
|
|
|
18
11
|
## Get Started
|
|
19
12
|
|
|
@@ -47,18 +40,22 @@ Add to your MCP config (`.mcp.json`):
|
|
|
47
40
|
npx omnibase-mcp init
|
|
48
41
|
```
|
|
49
42
|
|
|
50
|
-
Edit `omnibase.config.yaml` with your database
|
|
43
|
+
Edit `omnibase.config.yaml` with your database connections ([full configuration guide](docs/configuration.md)):
|
|
51
44
|
|
|
52
45
|
```yaml
|
|
53
46
|
connections:
|
|
54
|
-
|
|
55
|
-
dsn:
|
|
47
|
+
app:
|
|
48
|
+
dsn: pg://localhost:5432/myapp # or $DATABASE_URL from env
|
|
56
49
|
permission: read-write
|
|
50
|
+
analytics:
|
|
51
|
+
dsn: clickhouse://localhost:9000/analytics
|
|
52
|
+
permission: read-write
|
|
53
|
+
warehouse:
|
|
54
|
+
dsn: mysql://user:pass@localhost:3306/warehouse
|
|
55
|
+
permission: read-only
|
|
57
56
|
```
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
That's it. Your agent now has access to 13 database tools, plus any [custom tools](#custom-tools) you define.
|
|
58
|
+
That's it. Your agent now has access to 14 database tools, plus any [custom tools](docs/custom-tools.md) you define.
|
|
62
59
|
|
|
63
60
|
<details>
|
|
64
61
|
<summary>Install from source (contributors)</summary>
|
|
@@ -67,21 +64,129 @@ That's it. Your agent now has access to 13 database tools, plus any [custom tool
|
|
|
67
64
|
git clone https://github.com/itsJeremyMax/omnibase.git
|
|
68
65
|
cd omnibase
|
|
69
66
|
pnpm install
|
|
70
|
-
pnpm
|
|
67
|
+
pnpm build
|
|
71
68
|
```
|
|
72
69
|
|
|
73
70
|
Then point your MCP client at `node dist/src/index.js` with `cwd` set to your project directory.
|
|
74
71
|
|
|
75
72
|
</details>
|
|
76
73
|
|
|
77
|
-
## What Your Agent
|
|
74
|
+
## What Your Agent Can Do
|
|
75
|
+
|
|
76
|
+
### Understand any codebase's data model in seconds
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
You: "I just joined this project. Walk me through the data model."
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Your agent connects to `app`, `analytics`, and `warehouse`, discovers tables across all three, traces foreign key relationships, and returns a complete summary: table names, column types, row counts, and how everything connects. What used to take hours of reading migration files takes seconds.
|
|
83
|
+
|
|
84
|
+
*Tools used: list_connections, list_tables, get_schema, get_relationships*
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary>What you'd do manually</summary>
|
|
88
|
+
|
|
89
|
+
```sql
|
|
90
|
+
-- Connect to each database separately, then run:
|
|
91
|
+
|
|
92
|
+
-- app (Postgres)
|
|
93
|
+
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';
|
|
94
|
+
SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = '...';
|
|
95
|
+
SELECT tc.table_name, kcu.column_name, ccu.table_name AS foreign_table
|
|
96
|
+
FROM information_schema.table_constraints tc
|
|
97
|
+
JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name
|
|
98
|
+
JOIN information_schema.constraint_column_usage ccu ON tc.constraint_name = ccu.constraint_name
|
|
99
|
+
WHERE tc.constraint_type = 'FOREIGN KEY';
|
|
100
|
+
SELECT schemaname, relname, n_live_tup FROM pg_stat_user_tables;
|
|
101
|
+
|
|
102
|
+
-- analytics (ClickHouse — different syntax)
|
|
103
|
+
SELECT name FROM system.tables WHERE database = currentDatabase();
|
|
104
|
+
SELECT name, type, is_in_primary_key FROM system.columns WHERE table = '...';
|
|
105
|
+
-- ClickHouse doesn't have foreign keys, so no FK query available
|
|
106
|
+
|
|
107
|
+
-- warehouse (MySQL — yet another syntax)
|
|
108
|
+
SELECT table_name FROM information_schema.tables WHERE table_schema = DATABASE();
|
|
109
|
+
SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = '...';
|
|
110
|
+
SELECT table_name, column_name, referenced_table_name, referenced_column_name
|
|
111
|
+
FROM information_schema.key_column_usage WHERE referenced_table_name IS NOT NULL;
|
|
112
|
+
|
|
113
|
+
-- Then manually stitch the results together across all three
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
</details>
|
|
117
|
+
|
|
118
|
+
### Query across databases
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
You: "Compare our product inventory in warehouse with what customers
|
|
122
|
+
actually ordered last quarter in app. What's sitting on shelves?"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Your agent queries `warehouse` (MySQL) for current stock levels, pulls last quarter's order volumes from `app` (Postgres), and joins the results by SKU. It identifies 34 products with over 500 units in stock but fewer than 10 orders. You can't write a single query for this because the data lives in two different database engines.
|
|
126
|
+
|
|
127
|
+
*Tools used: list_connections, get_schema, execute_sql (across app and warehouse)*
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary>What you'd do manually</summary>
|
|
131
|
+
|
|
132
|
+
```sql
|
|
133
|
+
-- Terminal 1: warehouse (MySQL)
|
|
134
|
+
SELECT sku, product_name, quantity_on_hand
|
|
135
|
+
FROM inventory
|
|
136
|
+
WHERE quantity_on_hand > 0;
|
|
137
|
+
-- Copy results to a spreadsheet or temp file
|
|
138
|
+
|
|
139
|
+
-- Terminal 2: app (Postgres)
|
|
140
|
+
SELECT p.sku, SUM(oi.quantity) AS units_ordered
|
|
141
|
+
FROM order_items oi
|
|
142
|
+
JOIN products p ON oi.product_id = p.id
|
|
143
|
+
JOIN orders o ON oi.order_id = o.id
|
|
144
|
+
WHERE o.ordered_at >= NOW() - INTERVAL '3 months'
|
|
145
|
+
GROUP BY p.sku;
|
|
146
|
+
-- Copy results to the same spreadsheet
|
|
147
|
+
|
|
148
|
+
-- Manually match SKUs across both result sets
|
|
149
|
+
-- Filter to high-stock, low-order items
|
|
150
|
+
-- Reformat into something useful
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
### Debug with live data
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
You: "The /api/orders endpoint is returning wrong totals. Figure out why."
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Your agent reads the route handler, queries the orders table in `app`, then checks `analytics` and finds the pre-computed totals are out of sync. It traces the mismatch to a missing category, updates the analytics table, hits the endpoint again, and confirms the response is now correct.
|
|
162
|
+
|
|
163
|
+
*Tools used: get_schema, execute_sql (across app and analytics)*
|
|
164
|
+
|
|
165
|
+
### Investigate production issues safely
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
You: "Failed payments spiked 3x in the last hour. What's going on?"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Your agent explores the payments schema on `warehouse` (read-only), runs analytics on the last hour of transactions, and identifies that all failures share a single payment provider and error code. Not a single row modified. The connection is read-only, so the agent couldn't write even if it tried.
|
|
172
|
+
|
|
173
|
+
*Tools used: get_schema, execute_sql (read-only on warehouse), get_distinct_values*
|
|
174
|
+
|
|
175
|
+
[More use cases →](docs/use-cases.md)
|
|
176
|
+
|
|
177
|
+
## Built-in Tools
|
|
178
|
+
|
|
179
|
+
Your agent gets 14 tools out of the box, covering schema exploration, parameterized queries, and execution plan analysis.
|
|
180
|
+
|
|
181
|
+
<details>
|
|
182
|
+
<summary>All 14 tools</summary>
|
|
78
183
|
|
|
79
184
|
### Discover
|
|
80
185
|
|
|
81
186
|
| Tool | What it does |
|
|
82
187
|
|------|-------------|
|
|
83
188
|
| `list_connections` | See all configured databases and their status |
|
|
84
|
-
| `test_connection` | Ping a specific database
|
|
189
|
+
| `test_connection` | Ping a specific database. Returns latency and driver error on failure |
|
|
85
190
|
| `list_tables` | Quick overview with row counts |
|
|
86
191
|
| `get_schema` | Summary or detailed column/index/FK info |
|
|
87
192
|
| `search_schema` | Find tables and columns by keyword |
|
|
@@ -115,225 +220,71 @@ Then point your MCP client at `node dist/src/index.js` with `cwd` set to your pr
|
|
|
115
220
|
|------|-------------|
|
|
116
221
|
| `query_history` | View recent query execution history with filtering by connection, status, and pagination |
|
|
117
222
|
|
|
118
|
-
|
|
223
|
+
</details>
|
|
224
|
+
|
|
225
|
+
## Custom Tools
|
|
119
226
|
|
|
120
|
-
Define
|
|
227
|
+
Define SQL templates as MCP tools your whole team can use. Add them to your config and commit. Every agent on the project gets the same capabilities, no code required.
|
|
121
228
|
|
|
122
229
|
```yaml
|
|
123
230
|
tools:
|
|
124
231
|
get_active_users:
|
|
125
|
-
connection:
|
|
232
|
+
connection: app
|
|
126
233
|
description: "Get all active users"
|
|
127
234
|
sql: "SELECT * FROM users WHERE active = true"
|
|
128
|
-
max_rows: 100
|
|
129
|
-
|
|
130
|
-
find_orders_by_status:
|
|
131
|
-
connection: my-db
|
|
132
|
-
description: "Find orders filtered by status"
|
|
133
|
-
permission: read-write
|
|
134
|
-
parameters:
|
|
135
|
-
status:
|
|
136
|
-
type: enum
|
|
137
|
-
description: "Order status"
|
|
138
|
-
values: [pending, shipped, delivered, cancelled]
|
|
139
|
-
min_amount:
|
|
140
|
-
type: number
|
|
141
|
-
description: "Minimum order amount"
|
|
142
|
-
required: false
|
|
143
|
-
default: 0
|
|
144
|
-
sql: >
|
|
145
|
-
SELECT * FROM orders
|
|
146
|
-
WHERE status = {status}
|
|
147
|
-
AND total >= {min_amount}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Custom tools are registered as `custom_<name>` (e.g., `custom_get_active_users`). Parameters use `{param_name}` placeholders that are substituted as parameterized queries (not string interpolation) to prevent SQL injection.
|
|
151
|
-
|
|
152
|
-
**Auto-generated descriptions:** If you omit the `description` field, it will be derived from leading `-- ` comment lines in your SQL template.
|
|
153
|
-
|
|
154
|
-
**Parameter types:** `string`, `number`, `boolean`, `enum`
|
|
155
|
-
|
|
156
|
-
**Optional overrides per tool:** `permission`, `max_rows`, `timeout` (fall back to connection/default values)
|
|
157
|
-
|
|
158
|
-
**Multi-statement tools:** Use `steps` instead of `sql` to run multiple statements within a transaction. Mark one step with `return: true` to control which result goes back to the agent (defaults to the last step). If any step fails, the entire transaction is rolled back.
|
|
159
|
-
|
|
160
|
-
```yaml
|
|
161
|
-
tools:
|
|
162
|
-
user_activity_report:
|
|
163
|
-
connection: my-db
|
|
164
|
-
description: "Generate user activity report"
|
|
165
|
-
parameters:
|
|
166
|
-
days:
|
|
167
|
-
type: number
|
|
168
|
-
description: "Days to look back"
|
|
169
|
-
required: false
|
|
170
|
-
default: 30
|
|
171
|
-
steps:
|
|
172
|
-
- sql: |
|
|
173
|
-
CREATE TEMP TABLE recent_activity AS
|
|
174
|
-
SELECT user_id, COUNT(*) as action_count
|
|
175
|
-
FROM events
|
|
176
|
-
WHERE created_at > datetime('now', '-' || {days} || ' days')
|
|
177
|
-
GROUP BY user_id
|
|
178
|
-
- sql: |
|
|
179
|
-
SELECT u.name, u.email, COALESCE(ra.action_count, 0) as actions
|
|
180
|
-
FROM users u
|
|
181
|
-
LEFT JOIN recent_activity ra ON ra.user_id = u.id
|
|
182
|
-
ORDER BY actions DESC
|
|
183
|
-
return: true
|
|
184
235
|
```
|
|
185
236
|
|
|
186
|
-
|
|
237
|
+
Chain tools together with `compose` to build multi-step pipelines:
|
|
187
238
|
|
|
188
239
|
```yaml
|
|
189
240
|
tools:
|
|
190
|
-
get_active_user_ids:
|
|
191
|
-
connection: my-db
|
|
192
|
-
description: "Get active user IDs"
|
|
193
|
-
sql: "SELECT id FROM users WHERE active = true"
|
|
194
|
-
|
|
195
241
|
active_user_orders:
|
|
196
|
-
connection:
|
|
242
|
+
connection: app
|
|
197
243
|
description: "Get orders for all active users"
|
|
198
244
|
compose:
|
|
199
|
-
- tool:
|
|
245
|
+
- tool: get_active_users
|
|
200
246
|
as: users
|
|
201
247
|
- sql: "SELECT * FROM orders WHERE user_id IN ({users.id})"
|
|
202
248
|
as: orders
|
|
203
249
|
```
|
|
204
250
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
**Hot reload:** The server watches your config file and reloads custom tools automatically when it changes. No restart needed.
|
|
208
|
-
|
|
209
|
-
**CLI management:**
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
npx omnibase-mcp tools list # list all custom tools
|
|
213
|
-
npx omnibase-mcp tools add # interactive wizard to add a tool
|
|
214
|
-
npx omnibase-mcp tools remove # interactive wizard to remove a tool
|
|
215
|
-
npx omnibase-mcp tools validate # validate custom tool definitions
|
|
216
|
-
npx omnibase-mcp tools test # dry-run a tool with sample arguments
|
|
217
|
-
npx omnibase-mcp status # ping all connections, show health dashboard
|
|
218
|
-
npx omnibase-mcp audit tail # live tail the query audit log
|
|
219
|
-
npx omnibase-mcp audit search <q> # search audit log by keyword
|
|
220
|
-
npx omnibase-mcp audit clear # clear the audit log
|
|
221
|
-
npx omnibase-mcp upgrade # upgrade to latest version
|
|
222
|
-
npx omnibase-mcp upgrade --dry-run # check for updates and show changelog
|
|
223
|
-
npx omnibase-mcp upgrade --version 0.1.20 # switch to a specific version
|
|
224
|
-
npx omnibase-mcp upgrade --allow-major # allow major version changes
|
|
225
|
-
npx omnibase-mcp --version # print current version
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
Updates to a new major version (or downgrades across a major version boundary) require the `--allow-major` flag. The CLI also checks for updates in the background and shows a notice after commands when a newer version is available. Set `NO_UPDATE_NOTIFIER=1` to suppress this.
|
|
229
|
-
|
|
230
|
-
## What Makes This Different
|
|
231
|
-
|
|
232
|
-
**Every query is inspected before it reaches your database.**
|
|
233
|
-
|
|
234
|
-
Omnibase parses and classifies each SQL statement. A `DELETE FROM users` without a WHERE clause gets flagged. A `pg_read_file('/etc/passwd')` gets blocked. A `WITH x AS (UPDATE ...) SELECT ...` is correctly identified as a write, not a read.
|
|
235
|
-
|
|
236
|
-
This isn't just read-only mode. It's:
|
|
237
|
-
|
|
238
|
-
- **Dangerous function blocking** across all engines — `pg_read_file`, `xp_cmdshell`, `LOAD_FILE`, `lo_export`, and dozens more
|
|
239
|
-
- **Sensitive table protection** — `pg_shadow`, `mysql.user`, `sys.sql_logins` are inaccessible, even with schema-qualified names
|
|
240
|
-
- **Permission levels per connection** — read-only, read-write, admin. The agent's access is independent of the database user's privileges
|
|
241
|
-
- **Schema-aware validation** — `validate_query` checks that tables and columns actually exist, resolves aliases, catches fake columns in INSERT lists, and warns about bulk operations
|
|
242
|
-
- **Write impact estimation** — before running an UPDATE or DELETE, see how many rows would be affected
|
|
243
|
-
- **Portable parameterized queries** — use `?` everywhere, Omnibase translates to `$1` (Postgres), `:1` (Oracle), `@p1` (SQL Server) automatically
|
|
251
|
+
Custom tools live in `omnibase.config.yaml` alongside your connections. Commit it to your repo and your team shares the same tools, permissions, and database access.
|
|
244
252
|
|
|
245
|
-
|
|
253
|
+
[Full custom tools guide →](docs/custom-tools.md)
|
|
246
254
|
|
|
247
|
-
|
|
255
|
+
## Configuration
|
|
248
256
|
|
|
249
257
|
| Database | DSN |
|
|
250
258
|
|----------|-----|
|
|
251
|
-
| SQLite | `sqlite:./path/to/db.db` |
|
|
252
259
|
| PostgreSQL | `pg://user:pass@host:5432/dbname` |
|
|
253
|
-
| MySQL | `
|
|
260
|
+
| MySQL | `mysql://user:pass@host:3306/dbname` |
|
|
261
|
+
| ClickHouse | `clickhouse://host:9000/dbname` |
|
|
262
|
+
| SQLite | `sqlite:./path/to/db.db` |
|
|
254
263
|
| SQL Server | `mssql://user:pass@host/dbname` |
|
|
255
|
-
| Oracle | `or://user:pass@host:1521/sid` |
|
|
256
|
-
|
|
257
|
-
Any [usql-compatible DSN](https://github.com/xo/usql#database-support) works. DSNs starting with `$` resolve from environment variables.
|
|
258
|
-
|
|
259
|
-
### Connection options
|
|
260
|
-
|
|
261
|
-
```yaml
|
|
262
|
-
connections:
|
|
263
|
-
my-db:
|
|
264
|
-
dsn: $DATABASE_URL # required
|
|
265
|
-
permission: read-only # read-only | read-write | admin (default: read-only)
|
|
266
|
-
timeout: 30000 # query timeout in ms (default: 30000)
|
|
267
|
-
max_rows: 500 # max rows returned per query (default: 500)
|
|
268
|
-
max_value_length: 500 # truncate column values longer than this (default: 500)
|
|
269
|
-
allow_all_pragmas: false # allow all SQLite PRAGMAs (default: false)
|
|
270
|
-
read_only_tables: # optional — protect specific tables from writes
|
|
271
|
-
- users
|
|
272
|
-
- audit_log
|
|
273
|
-
schema_filter: # optional — limit visible schemas/tables
|
|
274
|
-
schemas: [public]
|
|
275
|
-
|
|
276
|
-
# Optional — override built-in defaults
|
|
277
|
-
defaults:
|
|
278
|
-
permission: read-only # default permission for connections that don't specify one
|
|
279
|
-
timeout: 30000 # default query timeout in ms
|
|
280
|
-
max_rows: 500 # default max rows returned per query
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Schema hints
|
|
284
|
-
|
|
285
|
-
Omnibase embeds table and column names directly in tool descriptions so your AI agent sees the schema without needing to call `get_schema` first. This is enabled by default and updates automatically when a schema is fetched.
|
|
286
|
-
|
|
287
|
-
```yaml
|
|
288
|
-
schema_hints: true # embed table/column names in tool descriptions (default: true)
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Audit logging
|
|
292
|
-
|
|
293
|
-
Log every query to a local file for debugging and compliance. The `query_history` MCP tool lets agents view their own query history. By default, the last 10,000 entries are retained and older entries are automatically pruned.
|
|
294
|
-
|
|
295
|
-
```yaml
|
|
296
|
-
audit:
|
|
297
|
-
enabled: true
|
|
298
|
-
path: ./.omnibase/audit.log # default: .omnibase/audit.log next to config file
|
|
299
|
-
format: jsonl # jsonl (default) or text
|
|
300
|
-
max_entries: 10000 # 0 = unlimited (default: 10000)
|
|
301
|
-
```
|
|
302
264
|
|
|
303
|
-
|
|
265
|
+
Any [usql-compatible DSN](https://github.com/xo/usql#database-support) works. [Full configuration guide →](docs/configuration.md)
|
|
304
266
|
|
|
305
|
-
|
|
267
|
+
## Security
|
|
306
268
|
|
|
307
|
-
|
|
308
|
-
2. `./omnibase.config.yaml` in working directory
|
|
309
|
-
3. `~/.config/omnibase/config.yaml`
|
|
269
|
+
Every query is parsed and classified before it reaches your database. Your agent never sees credentials, can't run dangerous functions, and respects the permission level you set.
|
|
310
270
|
|
|
311
|
-
|
|
271
|
+
- Credentials never reach agents. DSNs resolve server-side
|
|
272
|
+
- Read-only by default. Explicit opt-in for writes
|
|
273
|
+
- Dangerous functions blocked across all engines
|
|
274
|
+
- Multi-statement queries rejected
|
|
275
|
+
- Table names validated against schema cache
|
|
312
276
|
|
|
313
|
-
|
|
314
|
-
|-------|--------|---------------------|-------------------|
|
|
315
|
-
| `read-only` | Yes | No | No |
|
|
316
|
-
| `read-write` | Yes | Yes | No |
|
|
317
|
-
| `admin` | Yes | Yes | Yes |
|
|
277
|
+
[Security deep dive & architecture →](docs/security.md)
|
|
318
278
|
|
|
319
|
-
##
|
|
279
|
+
## CLI
|
|
320
280
|
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
Omnibase MCP Server (TypeScript)
|
|
326
|
-
- Permission enforcement, query analysis, schema caching, output formatting
|
|
327
|
-
| JSON-RPC over stdin/stdout
|
|
328
|
-
v
|
|
329
|
-
Go Sidecar (usql driver packages)
|
|
330
|
-
- Native database connections, parameterized queries, schema introspection
|
|
331
|
-
| Native drivers
|
|
332
|
-
v
|
|
333
|
-
Any Database
|
|
281
|
+
```bash
|
|
282
|
+
npx omnibase-mcp status # health dashboard
|
|
283
|
+
npx omnibase-mcp tools list # list custom tools
|
|
284
|
+
npx omnibase-mcp upgrade # upgrade to latest
|
|
334
285
|
```
|
|
335
286
|
|
|
336
|
-
|
|
287
|
+
[Full CLI reference →](docs/cli.md)
|
|
337
288
|
|
|
338
289
|
## Development
|
|
339
290
|
|
|
@@ -341,23 +292,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, testing, and conventions.
|
|
|
341
292
|
|
|
342
293
|
```bash
|
|
343
294
|
pnpm test # unit tests
|
|
344
|
-
pnpm
|
|
295
|
+
pnpm test:integration # cross-database tests (needs Docker)
|
|
345
296
|
cd sidecar && go test ./... -v # Go sidecar tests
|
|
346
297
|
```
|
|
347
298
|
|
|
348
|
-
## Security
|
|
349
|
-
|
|
350
|
-
- Credentials never reach agents — DSNs resolve server-side, agents see connection names only
|
|
351
|
-
- Read-only by default — every connection requires explicit opt-in for writes
|
|
352
|
-
- SQL parsed and classified before execution — unrecognized statements default to "write" (fail safe)
|
|
353
|
-
- Multi-statement queries rejected — prevents `SELECT 1; DROP TABLE users`
|
|
354
|
-
- Dangerous functions blocked — filesystem access, OS execution, credential exposure across all engines
|
|
355
|
-
- Table names validated against schema cache — prevents SQL injection in tool parameters
|
|
356
|
-
- Sidecar auto-recovery — if the Go process crashes, it respawns transparently on the next call
|
|
357
|
-
|
|
358
299
|
## License
|
|
359
300
|
|
|
360
|
-
Apache 2.0
|
|
301
|
+
Apache 2.0. See [LICENSE](LICENSE)
|
|
361
302
|
|
|
362
303
|
## Disclaimer
|
|
363
304
|
|