Skip to content

Commit ef7fff9

Browse files
committed
enhance security
1 parent 5506091 commit ef7fff9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,24 @@ The easiest way to try the toolbox is to run the server with both HTTP and
6868
STDIO transports enabled:
6969

7070

71-
```bash cd
72-
go run ./cmd/mcp-sqlkit -a :5000
71+
```bash
72+
go run ./cmd/mcp-sqlkit -a :5000 --secretsBase mem://localhost/mcp-sqlkit/.secret/
73+
```
74+
75+
Tip: for persistence across restarts, use a file-backed secrets store, e.g.:
76+
77+
```bash
78+
go run ./cmd/mcp-sqlkit -a :5000 --secretsBase file://~/.secret/mcp-sqlkit
7379
```
7480

7581

7682
* `-a :5000` – HTTP listen address (omit to disable HTTP transport).
7783
* `-s` – enable STDIO transport (useful when the toolbox is launched
7884
by another process via pipes).
85+
* `--secretsBase` – base URL for secrets storage (scy-backed). Examples:
86+
- `mem://localhost/mcp-sqlkit/.secret/` (default, in-memory)
87+
- `file://~/.secret/mcp-sqlkit` (persistent on disk)
88+
- `gcp://secretmanager/projects/...` or `vault://...` (external managers)
7989

8090
The server will print something similar to:
8191

@@ -117,6 +127,10 @@ applied.
117127
}
118128
```
119129

130+
CLI overrides
131+
132+
- The `--secretsBase` flag overrides `connector.secretBaseLocation` from the config file.
133+
120134
### Pre-configured connectors
121135

122136
In addition to adding connectors at runtime you can **pre-load** connection
@@ -300,6 +314,7 @@ Key points about secret storage:
300314
on disk set `connector.secretBaseLocation` to a `file://` path (e.g.
301315
`file://~/.secret/mcpt`). You can also point it to `gsecret://` or
302316
`vault://` according to your environment.
317+
* Prefer the CLI flag `--secretsBase <base-url>` to set the storage location at runtime; it overrides the config and is recommended for persistent or remote deployments.
303318

304319

305320
## Authentication & authorization

cmd/mcp-sqlkit/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ type Options struct {
1414

1515
// Base URL for secrets storage (scy). Supports mem://, file://,
1616
// Defaults to in-memory AFS storage.
17-
SecretBaseLocation string `long:"secrets" description:"Base URL for secrets storage (mem://, file://, gcp://secretmanager/projects/xxxx/ ... see for list of secure connector https://github.com/viant/afsc )" default:"mem://localhost/mcp-sqlkit/.secret/"`
17+
SecretBaseLocation string `long:"secretsBase" description:"Base URL for secrets storage (mem://, file://, gcp://secretmanager/projects/xxxx/ ... see for list of secure connector https://github.com/viant/afsc )" default:"mem://localhost/mcp-sqlkit/.secret/"`
1818
}

0 commit comments

Comments
 (0)