@zokizuan/satori-mcp 4.10.0 → 4.10.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 (3) hide show
  1. package/README.md +58 -206
  2. package/dist/config.js +5 -5
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,62 +1,64 @@
1
1
  # @zokizuan/satori-mcp
2
2
 
3
- MCP server for Satori agent-safe semantic code search and indexing.
4
-
5
- ## Features
6
-
7
- - Capability-driven execution via `CapabilityResolver`
8
- - Runtime-first `search_codebase` with explicit `scope`, `resultMode`, `groupBy`, and optional `debug` traces
9
- - Deterministic query-prefix operators in `search_codebase` (`lang:`, `path:`, `-path:`, `must:`, `exclude:`)
10
- - Default grouped-result diversity and auto changed-files ranking (`rankingMode="auto_changed_first"`)
11
- - First-class `call_graph` tool with deterministic node/edge sorting and capability-driven language support (currently TS/JS/Python)
12
- - Sidecar-backed `file_outline` tool for per-file symbol navigation and direct call_graph jump handles
13
- - Snapshot v3 safety with index fingerprints and strict `requires_reindex` access gates
14
- - Deterministic train-in-the-error responses for incompatible or legacy index states
15
- - Query-time exclusion support with `.gitignore`-style matching
16
- - Structured search telemetry logs (`[TELEMETRY]` JSON to `stderr`)
17
- - Zod-first tool schemas converted to MCP JSON Schema for `ListTools`
18
- - Auto-generated tool docs from live tool schemas
19
- - `read_file` line-range retrieval with default large-file truncation guard and optional `mode="annotated"` metadata envelope
20
- - Optional proactive sync watcher mode (debounced filesystem events for explicitly touched roots in the current session)
21
- - Index-time AST scope breadcrumbs (TS/JS/Python) rendered in search output as `🧬 Scope`
22
- - Fingerprint schema `dense_v3`/`hybrid_v3` with hard gate for all pre-v3 indexes
23
-
24
- ## Architecture
3
+ Read-only MCP server for Satori. It gives coding agents six deterministic tools for repo search, symbol navigation, call graph context, bounded file reads, and index lifecycle management.
25
4
 
5
+ ## Install
6
+
7
+ Prefer the CLI installer when possible:
8
+
9
+ ```bash
10
+ npx -y @zokizuan/satori-cli@0.3.2 install --client codex
11
+ npx -y @zokizuan/satori-cli@0.3.2 install --client claude
12
+ npx -y @zokizuan/satori-cli@0.3.2 doctor
26
13
  ```
27
- [MCP Client]
28
- -> [index.ts bootstrap + ListTools/CallTool]
29
- -> [tool registry]
30
- -> [manage_index | search_codebase | call_graph | file_outline | read_file | list_codebases]
31
- -> [ToolContext DI]
32
- -> [CapabilityResolver]
33
- -> [SnapshotManager v3 + access gate]
34
- -> [Context / Vector store / Embedding / Reranker adapters]
14
+
15
+ Manual MCP config:
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "satori": {
21
+ "command": "npx",
22
+ "args": ["-y", "@zokizuan/satori-mcp@4.10.1"],
23
+ "timeout": 180000,
24
+ "env": {
25
+ "EMBEDDING_PROVIDER": "VoyageAI",
26
+ "EMBEDDING_MODEL": "voyage-4-large",
27
+ "EMBEDDING_OUTPUT_DIMENSION": "1024",
28
+ "VOYAGEAI_API_KEY": "your-api-key",
29
+ "VOYAGEAI_RERANKER_MODEL": "rerank-2.5",
30
+ "MILVUS_ADDRESS": "your-milvus-endpoint",
31
+ "MILVUS_TOKEN": "your-milvus-token"
32
+ }
33
+ }
34
+ }
35
+ }
35
36
  ```
36
37
 
37
- Tool surface is hard-broken to 6 tools. This keeps routing explicit while exposing call-chain traversal and file-level navigation as first-class operations.
38
+ Keep startup timeout at `180000` for first-run package resolution.
39
+
40
+ ## Agent Workflow
38
41
 
39
- ## read_file Behavior
42
+ ```text
43
+ list_codebases
44
+ manage_index action="create" path="/absolute/path/to/repo"
45
+ search_codebase path="/absolute/path/to/repo" query="where is auth refresh handled"
46
+ file_outline path="/absolute/path/to/repo" file="src/auth.ts"
47
+ call_graph path="/absolute/path/to/repo" symbolRef={...} direction="both"
48
+ read_file path="/absolute/path/to/repo/src/auth.ts" start_line=1 end_line=160
49
+ ```
50
+
51
+ Important defaults:
40
52
 
41
- - Supports optional `start_line` and `end_line` (1-based, inclusive)
42
- - When no range is provided and file length exceeds `READ_FILE_MAX_LINES` (default `1000`), output is truncated and includes a continuation hint with `path` and next `start_line`
43
- - Optional `mode="annotated"` returns content plus `outlineStatus`, `outline`, `hasMore`, and reindex hints when sidecar data is unavailable
53
+ - `search_codebase` starts with runtime code, grouped by symbol.
54
+ - `search_codebase` runs freshness checks before returning results.
55
+ - `read_file` is bounded and can return continuation hints.
56
+ - `requires_reindex` means reindex first, then retry the original call.
57
+ - `manage_index action="clear"` is destructive and should be explicit.
44
58
 
45
- ## Proactive Sync
59
+ ## Runtime Requirements
46
60
 
47
- - Enabled by default. Set `MCP_ENABLE_WATCHER=false` to disable
48
- - Debounce window via `MCP_WATCH_DEBOUNCE_MS` (default `5000`)
49
- - Watchers are session-scoped: startup does not watch every indexed codebase, only roots touched by successful index/search/navigation/read flows in the current session
50
- - Watch events reuse the same incremental sync pipeline (`reindexByChange`)
51
- - Ignore control files (`.satoriignore`, root `.gitignore`) trigger no-reindex reconciliation:
52
- - delete indexed paths now ignored by active rules
53
- - incremental sync picks up newly unignored files
54
- - signature checks in `ensureFreshness` keep this working even when watcher events are missed
55
- - Safety gates:
56
- - Watch-triggered sync only runs for `indexed`/`sync_completed` codebases
57
- - Events are dropped for `indexing`, `indexfailed`, and `requires_reindex`
58
- - Ignored/hidden paths are excluded (`node_modules`, `.git`, build artifacts, dotfiles)
59
- - On shutdown (`SIGINT`/`SIGTERM`), watchers are explicitly closed
61
+ Configure an embedding provider and Milvus-compatible backend before indexing. Supported embedding providers are OpenAI, VoyageAI, Gemini, and Ollama. Changing provider, model, dimension, vector store, or schema requires a reindex because those values are part of the index fingerprint.
60
62
 
61
63
  <!-- TOOLS_START -->
62
64
 
@@ -139,171 +141,21 @@ No parameters.
139
141
 
140
142
  <!-- TOOLS_END -->
141
143
 
142
- ### `read_file.open_symbol` Fields
143
-
144
- `open_symbol` resolves symbols inside the same file passed in `read_file.path`.
145
-
146
- - `symbolId` (string, optional): deterministic symbol id to resolve in `path`.
147
- - `symbolLabel` (string, optional): exact symbol label to resolve in `path`.
148
- - `start_line` (integer, optional): direct 1-based start line for span-based jump.
149
- - `end_line` (integer, optional): direct 1-based end line (inclusive).
150
-
151
- ## MCP Config Examples
152
-
153
- ### JSON-style (Claude Desktop, Cursor)
154
-
155
- ```json
156
- {
157
- "mcpServers": {
158
- "satori": {
159
- "command": "npx",
160
- "args": ["-y", "@zokizuan/satori-mcp@4.10.0"],
161
- "timeout": 180000,
162
- "env": {
163
- "EMBEDDING_PROVIDER": "VoyageAI",
164
- "EMBEDDING_MODEL": "voyage-4-large",
165
- "EMBEDDING_OUTPUT_DIMENSION": "1024",
166
- "VOYAGEAI_API_KEY": "your-api-key",
167
- "VOYAGEAI_RERANKER_MODEL": "rerank-2.5",
168
- "MILVUS_ADDRESS": "your-milvus-endpoint",
169
- "MILVUS_TOKEN": "your-milvus-token"
170
- }
171
- }
172
- }
173
- }
174
- ```
175
-
176
- ### TOML-style (Claude Code CLI)
177
-
178
- ```toml
179
- [mcp_servers.satori]
180
- command = "npx"
181
- args = ["-y", "@zokizuan/satori-mcp@4.10.0"]
182
- startup_timeout_ms = 180000
183
- env = { EMBEDDING_PROVIDER = "VoyageAI", EMBEDDING_MODEL = "voyage-4-large", EMBEDDING_OUTPUT_DIMENSION = "1024", VOYAGEAI_API_KEY = "your-api-key", VOYAGEAI_RERANKER_MODEL = "rerank-2.5", MILVUS_ADDRESS = "your-milvus-endpoint", MILVUS_TOKEN = "your-milvus-token" }
184
- ```
185
-
186
- `MILVUS_TOKEN` is optional auth for endpoints that require it; local unauthenticated Milvus only needs `MILVUS_ADDRESS`.
144
+ ## Notes
187
145
 
188
- ### Local development (when working on this repo)
146
+ - `open_symbol` resolves exact symbols inside the same file passed to `read_file.path`.
147
+ - `MILVUS_TOKEN` is optional auth; local unauthenticated Milvus only needs `MILVUS_ADDRESS`.
148
+ - MCP startup does not require provider credentials or a live Milvus backend. Provider-backed calls report `MISSING_PROVIDER_CONFIG` when setup is incomplete.
149
+ - `MISSING_PROVIDER_CONFIG` is an active setup failure only when it appears as a tool response `code` or `reason`.
189
150
 
190
- ```json
191
- {
192
- "mcpServers": {
193
- "satori": {
194
- "command": "node",
195
- "args": ["/absolute/path/to/satori/packages/mcp/dist/index.js"],
196
- "timeout": 180000,
197
- "env": {
198
- "EMBEDDING_PROVIDER": "VoyageAI",
199
- "EMBEDDING_MODEL": "voyage-4-large",
200
- "EMBEDDING_OUTPUT_DIMENSION": "1024",
201
- "VOYAGEAI_API_KEY": "your-api-key",
202
- "VOYAGEAI_RERANKER_MODEL": "rerank-2.5",
203
- "MILVUS_ADDRESS": "your-milvus-endpoint",
204
- "MILVUS_TOKEN": "your-milvus-token"
205
- }
206
- }
207
- }
208
- }
209
- ```
210
-
211
- Never commit real API keys/tokens into repo config files.
212
-
213
- ## Run Locally
151
+ ## Local Development
214
152
 
215
153
  ```bash
216
154
  pnpm --filter @zokizuan/satori-mcp start
217
- ```
218
-
219
- ## Shell CLI (`@zokizuan/satori-cli`)
220
-
221
- The shell-first installer/client now lives in a separate package: `@zokizuan/satori-cli`.
222
-
223
- ### Install / Uninstall
224
-
225
- Supported installer targets in Phase 1:
226
- - `codex`
227
- - `claude`
228
- - `all`
229
-
230
- Examples:
231
-
232
- ```bash
233
- npx -y @zokizuan/satori-cli@0.3.1 install --client codex
234
- npx -y @zokizuan/satori-cli@0.3.1 install --client claude
235
- npx -y @zokizuan/satori-cli@0.3.1 install --client all --dry-run
236
- npx -y @zokizuan/satori-cli@0.3.1 uninstall --client codex
237
- npx -y @zokizuan/satori-cli@0.3.1 doctor
238
- ```
239
-
240
- Install and uninstall run before MCP session startup, only touch Satori-managed config, and copy/remove these packaged skills:
241
- - `satori-search`
242
- - `satori-navigation`
243
- - `satori-indexing`
244
-
245
- ### Commands
246
-
247
- ```bash
248
- satori-cli tools list
249
- satori-cli tool call <toolName> --args-json '{"path":"/abs/repo","query":"auth"}'
250
- satori-cli tool call <toolName> --args-file ./args.json
251
- satori-cli tool call <toolName> --args-json @-
252
- satori-cli <toolName> [schema-subset flags]
253
- ```
254
-
255
- Global flags (`--startup-timeout-ms`, `--call-timeout-ms`, `--format`, `--debug`) must appear before the command token.
256
- Example: `satori-cli --debug tools list`.
257
-
258
- ### Output + Exit Contract
259
-
260
- - `stdout`: JSON only
261
- - `stderr`: diagnostics and text summaries
262
- - exit `0`: success
263
- - exit `1`: tool-level error (`isError=true` or structured envelope `status!="ok"`)
264
- - exit `2`: usage/argument/schema-subset errors
265
- - exit `3`: startup/transport/protocol/timeout failures
266
-
267
- ### Wrapper Flag Support
268
-
269
- Wrapper mode (`satori-cli <toolName> ...`) supports a strict subset from reflected `tools/list` schemas:
270
-
271
- - primitive properties (`string|number|integer|boolean`)
272
- - enums of primitives
273
- - arrays of primitives (repeat flags in insertion order)
274
- - object properties only via `--<prop>-json '{...}'`
275
-
276
- Tool-level flags that overlap global names are preserved in wrapper mode once command parsing starts.
277
- Example: `satori-cli search_codebase --path /repo --query auth --debug` forwards `debug=true` to the tool.
278
- For boolean wrapper flags, `--flag` implies `true` and `--flag false` is supported.
279
-
280
- Unsupported schema shapes (for example `oneOf`, `anyOf`, `$ref`, complex arrays, nested expansion) return `E_SCHEMA_UNSUPPORTED` with fallback guidance to `--args-json` / `--args-file`.
281
-
282
- ### Run Mode Semantics
283
-
284
- When spawned by `satori-cli`, server process mode is `SATORI_RUN_MODE=cli`:
285
-
286
- - startup background loops are disabled (`verifyCloudState`, watcher mode, background sync)
287
- - stdio safety hardening is enabled (`stdout` protocol-only, logs to `stderr`)
288
- - tool behavior stays on-demand and uses the same six MCP tools
289
-
290
- `SATORI_CLI_STDOUT_GUARD=drop|redirect` controls accidental non-protocol stdout handling (`drop` default).
291
-
292
- ### Startup vs Provider Setup
293
-
294
- MCP startup does not require provider credentials, network access, or a live Milvus backend. The server should complete `initialize` and expose the six tools with an empty provider environment. Provider-backed calls (`manage_index create|reindex|sync|clear` and `search_codebase`) validate their required environment at call time and return `MISSING_PROVIDER_CONFIG` when setup is incomplete.
295
-
296
- `MISSING_PROVIDER_CONFIG` is an active setup failure only when it appears as a tool response `code` or `reason`. Seeing the string inside `search_codebase` results can simply mean the query matched Satori code that implements the setup error.
297
-
298
- ## Development
299
-
300
- ```bash
301
155
  pnpm --filter @zokizuan/satori-mcp build
302
156
  pnpm --filter @zokizuan/satori-mcp typecheck
303
157
  pnpm --filter @zokizuan/satori-mcp test
304
158
  pnpm --filter @zokizuan/satori-mcp docs:check
305
- pnpm --filter @zokizuan/satori-cli build
306
- pnpm --filter @zokizuan/satori-cli test
307
159
  ```
308
160
 
309
- `build` automatically runs docs generation from tool schemas.
161
+ `build` regenerates the tool reference from live tool schemas.
package/dist/config.js CHANGED
@@ -169,7 +169,7 @@ export function showHelpMessage() {
169
169
  console.log(`
170
170
  Satori MCP Server
171
171
 
172
- Usage: npx -y @zokizuan/satori-mcp@4.10.0 [options]
172
+ Usage: npx -y @zokizuan/satori-mcp@4.10.1 [options]
173
173
 
174
174
  Options:
175
175
  --help, -h Show this help message
@@ -206,16 +206,16 @@ Environment Variables:
206
206
 
207
207
  Examples:
208
208
  # Start MCP server with OpenAI and explicit Milvus address
209
- OPENAI_API_KEY=sk-xxx MILVUS_ADDRESS=localhost:19530 npx -y @zokizuan/satori-mcp@4.10.0
209
+ OPENAI_API_KEY=sk-xxx MILVUS_ADDRESS=localhost:19530 npx -y @zokizuan/satori-mcp@4.10.1
210
210
 
211
211
  # Start MCP server with VoyageAI and specific model
212
- EMBEDDING_PROVIDER=VoyageAI VOYAGEAI_API_KEY=pa-xxx EMBEDDING_MODEL=voyage-4-large MILVUS_ADDRESS=https://your-zilliz-endpoint MILVUS_TOKEN=your-token npx -y @zokizuan/satori-mcp@4.10.0
212
+ EMBEDDING_PROVIDER=VoyageAI VOYAGEAI_API_KEY=pa-xxx EMBEDDING_MODEL=voyage-4-large MILVUS_ADDRESS=https://your-zilliz-endpoint MILVUS_TOKEN=your-token npx -y @zokizuan/satori-mcp@4.10.1
213
213
 
214
214
  # Start MCP server with Gemini and specific model
215
- EMBEDDING_PROVIDER=Gemini GEMINI_API_KEY=xxx EMBEDDING_MODEL=gemini-embedding-001 MILVUS_ADDRESS=https://your-zilliz-endpoint MILVUS_TOKEN=your-token npx -y @zokizuan/satori-mcp@4.10.0
215
+ EMBEDDING_PROVIDER=Gemini GEMINI_API_KEY=xxx EMBEDDING_MODEL=gemini-embedding-001 MILVUS_ADDRESS=https://your-zilliz-endpoint MILVUS_TOKEN=your-token npx -y @zokizuan/satori-mcp@4.10.1
216
216
 
217
217
  # Start MCP server with Ollama and specific model
218
- EMBEDDING_PROVIDER=Ollama EMBEDDING_MODEL=nomic-embed-text MILVUS_ADDRESS=localhost:19530 npx -y @zokizuan/satori-mcp@4.10.0
218
+ EMBEDDING_PROVIDER=Ollama EMBEDDING_MODEL=nomic-embed-text MILVUS_ADDRESS=localhost:19530 npx -y @zokizuan/satori-mcp@4.10.1
219
219
  `);
220
220
  }
221
221
  //# sourceMappingURL=config.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zokizuan/satori-mcp",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "MCP server for Satori with agent-safe semantic search and indexing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  "ignore": "^7.0.5",
15
15
  "zod": "^3.25.55",
16
16
  "zod-to-json-schema": "^3.25.1",
17
- "@zokizuan/satori-core": "1.5.1"
17
+ "@zokizuan/satori-core": "1.5.2"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^20.0.0",