@shibbirweb/mcp-db-read-only 1.0.0 → 1.1.0

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 CHANGED
@@ -6,6 +6,14 @@ Each release is published to npm and Docker Hub from the same tag. Where a versi
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.0]
10
+
11
+ Not yet published to npm, Docker Hub or the MCP Registry.
12
+
13
+ ### Added
14
+
15
+ - The log viewer's footer links to the GitHub repository, to star it, and to its issues page, to request a feature or report a problem. The links open in a new tab and send no referrer; the page still loads nothing from outside the viewer.
16
+
9
17
  ## [1.0.0]
10
18
 
11
19
  First stable release. Not yet published to npm, Docker Hub or the MCP Registry.
@@ -10,7 +10,9 @@
10
10
 
11
11
  [![CI](https://github.com/shibbirweb/mcp-db-read-only/actions/workflows/ci.yml/badge.svg)](https://github.com/shibbirweb/mcp-db-read-only/actions/workflows/ci.yml)
12
12
  [![npm](https://img.shields.io/npm/v/%40shibbirweb%2Fmcp-db-read-only?label=npm&color=cb3837)](https://www.npmjs.com/package/@shibbirweb/mcp-db-read-only)
13
+ [![npm downloads](https://img.shields.io/npm/dm/%40shibbirweb%2Fmcp-db-read-only?style=flat&label=npm%20downloads)](https://www.npmjs.com/package/@shibbirweb/mcp-db-read-only)
13
14
  [![Docker Hub](https://img.shields.io/docker/v/shibbirweb/mcp-db-read-only?label=docker%20hub&sort=semver)](https://hub.docker.com/r/shibbirweb/mcp-db-read-only)
15
+ [![Docker pulls](https://img.shields.io/docker/pulls/shibbirweb/mcp-db-read-only?style=flat)](https://hub.docker.com/r/shibbirweb/mcp-db-read-only)
14
16
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/shibbirweb/mcp-db-read-only/blob/master/LICENSE)
15
17
 
16
18
  Let your AI assistant **look at your databases without being able to change them.**
@@ -22,13 +24,18 @@ Point it at MySQL, PostgreSQL, SQLite, SQL Server, ClickHouse, MongoDB, Redis or
22
24
  - **No restart to switch.** Change database, server or engine by asking.
23
25
  - **Optional logging**, with a live page in your browser that shows every query as it happens.
24
26
 
27
+ ```text
28
+ You --ask in plain words--> Your AI assistant --tool call--> mcp-db-read-only --read-only query--> Your databases
29
+ mcp-db-read-only <--rows, documents, keys--
30
+ ```
31
+
25
32
  Works with Claude Desktop, Claude Code, and any other [MCP](https://modelcontextprotocol.io) client.
26
33
 
27
34
  **Source and full documentation: [github.com/shibbirweb/mcp-db-read-only](https://github.com/shibbirweb/mcp-db-read-only)**
28
35
 
29
36
  ## Supported tags
30
37
 
31
- `1.0.0`, `1.0`, `1`, `latest`, built for `linux/amd64` and `linux/arm64`.
38
+ `1.1.0`, `1.1`, `1`, `latest`, built for `linux/amd64` and `linux/arm64`.
32
39
 
33
40
  ---
34
41
 
@@ -264,6 +271,17 @@ Inside Docker, use `host.docker.internal` instead of `localhost` to reach a data
264
271
 
265
272
  Turn on logging to keep a record of every query the assistant runs, and see them live in your browser.
266
273
 
274
+ ```text
275
+ The assistant writes a query
276
+ |
277
+ v
278
+ 1. Checked by this server: only a read?
279
+ no --> Refused, with the reason
280
+ yes --> 2. Sent to the database in read-only mode
281
+ a read --> The answer
282
+ a write that slipped through --> Refused by the database
283
+ ```
284
+
267
285
  **1. Save logs to a folder** by adding this to the server's `env`:
268
286
 
269
287
  ```json
@@ -290,6 +308,11 @@ Passwords are never written to the logs. More in the [Logging guide](https://git
290
308
 
291
309
  Yes, in two independent ways, so a mistake in one is caught by the other:
292
310
 
311
+ ```text
312
+ mcp-db-read-only --one file per call--> Log folder (DB_LOG_DIR) --> viewer command --live--> Your browser
313
+ (in your AI client) (in a terminal)
314
+ ```
315
+
293
316
  1. **Before anything is sent**, every query is checked. Only reads are allowed: `SELECT` and friends for SQL, read commands for Redis, searches for Elasticsearch, and no `$out` or `$merge` for MongoDB.
294
317
  2. **The database is told to refuse writes too**, wherever it supports that: read-only sessions on MySQL, read-only transactions on PostgreSQL, a read-only file on SQLite, and so on.
295
318
 
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [![CI](https://github.com/shibbirweb/mcp-db-read-only/actions/workflows/ci.yml/badge.svg)](https://github.com/shibbirweb/mcp-db-read-only/actions/workflows/ci.yml)
4
4
  [![npm](https://img.shields.io/npm/v/%40shibbirweb%2Fmcp-db-read-only?label=npm&color=cb3837)](https://www.npmjs.com/package/@shibbirweb/mcp-db-read-only)
5
+ [![npm downloads](https://img.shields.io/npm/dm/%40shibbirweb%2Fmcp-db-read-only?style=flat&label=npm%20downloads)](https://www.npmjs.com/package/@shibbirweb/mcp-db-read-only)
5
6
  [![Docker Hub](https://img.shields.io/docker/v/shibbirweb/mcp-db-read-only?label=docker%20hub&sort=semver)](https://hub.docker.com/r/shibbirweb/mcp-db-read-only)
7
+ [![Docker pulls](https://img.shields.io/docker/pulls/shibbirweb/mcp-db-read-only?style=flat)](https://hub.docker.com/r/shibbirweb/mcp-db-read-only)
6
8
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
9
 
8
10
  Let your AI assistant **look at your databases without being able to change them.**
@@ -14,6 +16,14 @@ Point it at MySQL, PostgreSQL, SQLite, SQL Server, ClickHouse, MongoDB, Redis or
14
16
  - **No restart to switch.** Change database, server or engine by asking.
15
17
  - **Optional logging**, with a live page in your browser that shows every query as it happens.
16
18
 
19
+ ```mermaid
20
+ flowchart LR
21
+ Y["You"] -->|"ask in plain words"| AI["Your AI assistant"]
22
+ AI -->|"tool call"| S["mcp-db-read-only"]
23
+ S -->|"read-only query"| DB[("Your databases")]
24
+ DB -->|"rows, documents, keys"| S
25
+ ```
26
+
17
27
  Works with Claude Desktop, Claude Code, and any other [MCP](https://modelcontextprotocol.io) client.
18
28
 
19
29
  ---
@@ -250,6 +260,13 @@ Inside Docker, use `host.docker.internal` instead of `localhost` to reach a data
250
260
 
251
261
  Turn on logging to keep a record of every query the assistant runs, and see them live in your browser.
252
262
 
263
+ ```mermaid
264
+ flowchart LR
265
+ S["mcp-db-read-only<br/>(in your AI client)"] -->|"one file per call"| F[("Log folder<br/>DB_LOG_DIR")]
266
+ F --> V["viewer command<br/>(in a terminal)"]
267
+ V -->|"live"| B["Your browser"]
268
+ ```
269
+
253
270
  **1. Save logs to a folder** by adding this to the server's `env`:
254
271
 
255
272
  ```json
@@ -276,6 +293,15 @@ Passwords are never written to the logs. More in the [Logging guide](https://git
276
293
 
277
294
  Yes, in two independent ways, so a mistake in one is caught by the other:
278
295
 
296
+ ```mermaid
297
+ flowchart LR
298
+ Q["The assistant<br/>writes a query"] --> C{"1. Checked by<br/>this server:<br/>only a read?"}
299
+ C -->|"no"| R1["Refused,<br/>with the reason"]
300
+ C -->|"yes"| D["2. Sent to the database<br/>in read-only mode"]
301
+ D -->|"a read"| A["The answer"]
302
+ D -->|"a write that<br/>slipped through"| R2["Refused by<br/>the database"]
303
+ ```
304
+
279
305
  1. **Before anything is sent**, every query is checked. Only reads are allowed: `SELECT` and friends for SQL, read commands for Redis, searches for Elasticsearch, and no `$out` or `$merge` for MongoDB.
280
306
  2. **The database is told to refuse writes too**, wherever it supports that: read-only sessions on MySQL, read-only transactions on PostgreSQL, a read-only file on SQLite, and so on.
281
307
 
@@ -55,6 +55,16 @@ const HTML = `<!doctype html>
55
55
  <div id="entries"></div>
56
56
  <nav class="pager" id="pager-bottom"></nav>
57
57
  </main>
58
+ <footer>
59
+ <a class="star" href="https://github.com/shibbirweb/mcp-db-read-only" target="_blank" rel="noopener noreferrer">
60
+ <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"/></svg>
61
+ Star mcp-db-read-only on GitHub
62
+ </a>
63
+ <a class="issue" href="https://github.com/shibbirweb/mcp-db-read-only/issues" target="_blank" rel="noopener noreferrer">
64
+ <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"/></svg>
65
+ Request a feature or report an issue
66
+ </a>
67
+ </footer>
58
68
  </body>
59
69
  </html>
60
70
  `;
@@ -203,6 +213,22 @@ pre {
203
213
  .pager button[disabled] { opacity: .4; cursor: default; }
204
214
  .pager button.current { background: var(--accent); border-color: var(--accent); color: #fff; }
205
215
  .pager select { padding: 3px 8px; }
216
+ footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 20px 28px; }
217
+ footer a {
218
+ display: inline-flex;
219
+ align-items: center;
220
+ gap: 6px;
221
+ padding: 5px 12px;
222
+ border: 1px solid var(--border);
223
+ border-radius: 999px;
224
+ background: var(--panel);
225
+ color: var(--muted);
226
+ font-size: 13px;
227
+ text-decoration: none;
228
+ }
229
+ footer a svg { fill: currentColor; }
230
+ .star:hover { color: var(--warn); border-color: var(--warn); }
231
+ .issue:hover { color: var(--accent); border-color: var(--accent); }
206
232
  .banner {
207
233
  display: block;
208
234
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shibbirweb/mcp-db-read-only",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A read-only MCP server for MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, ClickHouse, MongoDB, Redis and Elasticsearch, with connections switchable at runtime.",
5
5
  "license": "MIT",
6
6
  "author": "Md. Shibbir Ahmed <shibbirweb@gmail.com>",