simple-dynamsoft-mcp 7.1.0 → 7.2.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/.env.example +27 -97
- package/README.md +174 -121
- package/data/metadata/data-manifest.json +2 -2
- package/data/metadata/dynamsoft_sdks.json +1 -1
- package/package.json +2 -5
- package/scripts/compute-repo-signatures.mjs +210 -0
- package/scripts/data-sync-azure.mjs +364 -0
- package/scripts/prebuild-rag-index.mjs +5 -5
- package/scripts/run-gemini-tests.mjs +0 -3
- package/src/data/hydration-mode.js +15 -1
- package/src/data/shared-state.js +214 -0
- package/src/index.js +2 -1
- package/src/rag/config.js +5 -22
- package/src/rag/gemini-retry.js +1 -1
- package/src/rag/index.js +36 -6
- package/src/rag/logger.js +21 -5
- package/src/rag/profile-config.js +34 -32
- package/src/rag/providers.js +45 -58
- package/src/rag/search-utils.js +1 -8
- package/src/rag/vector-cache.js +172 -176
- package/src/server/resources/register-resources.js +37 -29
- package/src/server/tools/register-index-tools.js +63 -7
- package/src/server/tools/register-project-tools.js +34 -2
- package/src/server/tools/register-quickstart-tools.js +33 -2
- package/src/server/tools/register-sample-tools.js +31 -1
- package/src/server/tools/register-version-tools.js +32 -2
package/.env.example
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# - semantic-local: local embeddings via @xenova/transformers
|
|
5
|
-
# - semantic-gemini: remote embeddings via Google Gemini
|
|
6
|
-
MCP_PROFILE=lite
|
|
1
|
+
# Minimal configuration
|
|
2
|
+
# - If GEMINI_API_KEY is set: provider=gemini, fallback=lexical, hydration_mode=eager
|
|
3
|
+
# - If GEMINI_API_KEY is unset: provider=lexical, fallback=none, hydration_mode=lazy
|
|
7
4
|
|
|
8
|
-
#
|
|
9
|
-
# RAG_PROVIDER: lexical | gemini | local | fuse
|
|
10
|
-
# - lexical: hybrid lexical retrieval (BM25 + Fuse)
|
|
11
|
-
# - gemini: remote embeddings via Google Gemini
|
|
12
|
-
# - local: local embeddings via @xenova/transformers
|
|
13
|
-
# - fuse: compatibility fallback (fuzzy-only, no embeddings)
|
|
14
|
-
RAG_PROVIDER=lexical
|
|
5
|
+
# GEMINI_API_KEY=your_key_here
|
|
15
6
|
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
|
|
7
|
+
# Optional: explicit cache directories
|
|
8
|
+
# MCP_DATA_DIR=
|
|
9
|
+
# MCP_DATA_CACHE_DIR=
|
|
10
|
+
# RAG_CACHE_DIR=
|
|
11
|
+
# RAG_MODEL_CACHE_DIR=
|
|
12
|
+
|
|
13
|
+
# Optional: startup behavior
|
|
14
|
+
# MCP_DATA_AUTO_DOWNLOAD=true
|
|
15
|
+
# MCP_DATA_REFRESH_ON_START=false
|
|
22
16
|
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
17
|
+
# Optional: force hydration mode override
|
|
18
|
+
# MCP_DATA_HYDRATION_MODE=eager
|
|
19
|
+
|
|
20
|
+
# Optional: shared state path for runtime shard loading
|
|
21
|
+
# Set to state/current.json mounted with shard files for all workers.
|
|
22
|
+
# RAG_SHARED_STATE_PATH=/mnt/mcp-cache/state/current.json
|
|
23
|
+
|
|
24
|
+
# Optional: prewarm behavior
|
|
25
|
+
# RAG_PREWARM=true
|
|
26
|
+
# RAG_PREWARM_BLOCK=false
|
|
27
|
+
|
|
28
|
+
# Optional: Gemini request tuning
|
|
33
29
|
# GEMINI_EMBED_MODEL=gemini-embedding-001
|
|
34
30
|
# GEMINI_API_BASE_URL=https://generativelanguage.googleapis.com
|
|
35
31
|
# GEMINI_EMBED_BATCH_SIZE=16
|
|
@@ -38,78 +34,12 @@ RAG_FALLBACK=none
|
|
|
38
34
|
# GEMINI_RETRY_MAX_DELAY_MS=10000
|
|
39
35
|
# GEMINI_REQUEST_THROTTLE_MS=0
|
|
40
36
|
|
|
41
|
-
#
|
|
42
|
-
# * RAG_LOCAL_MODEL: Hugging Face model id (default Xenova/all-MiniLM-L6-v2)
|
|
43
|
-
# * RAG_LOCAL_QUANTIZED: true|false (smaller/faster model download when true)
|
|
44
|
-
# RAG_LOCAL_MODEL=Xenova/all-MiniLM-L6-v2
|
|
45
|
-
# RAG_LOCAL_QUANTIZED=true
|
|
46
|
-
|
|
47
|
-
# Cache locations
|
|
48
|
-
# * RAG_CACHE_DIR: vector index cache (default data/.rag-cache)
|
|
49
|
-
# * RAG_MODEL_CACHE_DIR: local model cache (default data/.rag-cache/models)
|
|
50
|
-
# RAG_CACHE_DIR=data/.rag-cache
|
|
51
|
-
# RAG_MODEL_CACHE_DIR=data/.rag-cache/models
|
|
52
|
-
|
|
53
|
-
# Indexing + retrieval tuning
|
|
54
|
-
# * RAG_CHUNK_SIZE: max chars per chunk when embedding doc content
|
|
55
|
-
# * RAG_CHUNK_OVERLAP: overlap between chunks (helps context continuity)
|
|
56
|
-
# * RAG_MAX_CHUNKS_PER_DOC: cap chunks per doc to control index size
|
|
57
|
-
# * RAG_MAX_TEXT_CHARS: max chars per embedding input
|
|
58
|
-
# * RAG_MIN_SCORE: minimum cosine similarity to keep a hit (0 disables filtering). Default 0.2.
|
|
59
|
-
# * RAG_INCLUDE_SCORE: include similarity score in search results (debugging)
|
|
60
|
-
# RAG_CHUNK_SIZE=1200
|
|
61
|
-
# RAG_CHUNK_OVERLAP=200
|
|
62
|
-
# RAG_MAX_CHUNKS_PER_DOC=6
|
|
63
|
-
# RAG_MAX_TEXT_CHARS=4000
|
|
64
|
-
# RAG_MIN_SCORE=0.2
|
|
65
|
-
# RAG_INCLUDE_SCORE=false
|
|
66
|
-
|
|
67
|
-
# Cache/boot controls
|
|
68
|
-
# * RAG_REBUILD: true to ignore cache and rebuild on startup/search
|
|
69
|
-
# * RAG_PREWARM: true to build the embedding index at startup
|
|
70
|
-
# * RAG_PREWARM_BLOCK: true to block startup until prewarm completes
|
|
71
|
-
# * RAG_PREBUILT_INDEX_AUTO_DOWNLOAD: auto-download prebuilt index when local or gemini embeddings are selected
|
|
72
|
-
# * RAG_PREBUILT_INDEX_URL: global override URL for prebuilt index archive (applies to both local and gemini providers)
|
|
73
|
-
# * RAG_PREBUILT_INDEX_URL_LOCAL: provider-specific URL override for local prebuilt index archive
|
|
74
|
-
# * RAG_PREBUILT_INDEX_URL_GEMINI: provider-specific URL override for gemini prebuilt index archive
|
|
75
|
-
# * RAG_PREBUILT_INDEX_TIMEOUT_MS: timeout for prebuilt index download request
|
|
76
|
-
# RAG_REBUILD=false
|
|
77
|
-
# RAG_PREWARM=false
|
|
78
|
-
# RAG_PREWARM_BLOCK=false
|
|
79
|
-
# RAG_PREBUILT_INDEX_AUTO_DOWNLOAD=true
|
|
80
|
-
# RAG_PREBUILT_INDEX_URL=
|
|
81
|
-
# RAG_PREBUILT_INDEX_URL_LOCAL=
|
|
82
|
-
# RAG_PREBUILT_INDEX_URL_GEMINI=
|
|
83
|
-
# RAG_PREBUILT_INDEX_TIMEOUT_MS=180000
|
|
84
|
-
|
|
85
|
-
# Optional data submodule sync on server startup
|
|
86
|
-
# * DATA_SYNC_ON_START: true to fetch + fast-forward configured submodules
|
|
87
|
-
# * DATA_SYNC_TIMEOUT_MS: timeout per git operation in milliseconds
|
|
88
|
-
# DATA_SYNC_ON_START=false
|
|
89
|
-
# DATA_SYNC_TIMEOUT_MS=30000
|
|
90
|
-
|
|
91
|
-
# Data bootstrap mode (for npm/npx installs without submodules)
|
|
92
|
-
# * MCP_DATA_DIR: explicit existing data root (must contain metadata/, samples/, documentation/)
|
|
93
|
-
# * MCP_DATA_AUTO_DOWNLOAD: auto-download pinned sample/doc archives when local data is missing
|
|
94
|
-
# * MCP_DATA_CACHE_DIR: where downloaded data is stored
|
|
95
|
-
# * MCP_DATA_REFRESH_ON_START: force re-download even when cache matches lock manifest
|
|
96
|
-
# * MCP_DATA_HYDRATION_MODE: eager (download all repos at startup) | lazy (metadata-first, hydrate repos on demand)
|
|
97
|
-
# * MCP_DATA_DOWNLOAD_TIMEOUT_MS: timeout per archive download request in milliseconds
|
|
98
|
-
# * MCP_DATA_DOWNLOAD_RETRY_MAX_ATTEMPTS: max retry attempts for retryable archive download failures
|
|
99
|
-
# * MCP_DATA_DOWNLOAD_RETRY_BASE_DELAY_MS: exponential backoff base delay in milliseconds
|
|
100
|
-
# * MCP_DATA_DOWNLOAD_RETRY_MAX_DELAY_MS: exponential backoff max delay in milliseconds
|
|
101
|
-
# MCP_DATA_DIR=
|
|
102
|
-
# MCP_DATA_AUTO_DOWNLOAD=true
|
|
103
|
-
# MCP_DATA_CACHE_DIR=
|
|
104
|
-
# MCP_DATA_REFRESH_ON_START=false
|
|
105
|
-
# MCP_DATA_HYDRATION_MODE=lazy
|
|
37
|
+
# Optional: data download retry tuning
|
|
106
38
|
# MCP_DATA_DOWNLOAD_TIMEOUT_MS=180000
|
|
107
39
|
# MCP_DATA_DOWNLOAD_RETRY_MAX_ATTEMPTS=3
|
|
108
40
|
# MCP_DATA_DOWNLOAD_RETRY_BASE_DELAY_MS=500
|
|
109
41
|
# MCP_DATA_DOWNLOAD_RETRY_MAX_DELAY_MS=5000
|
|
110
42
|
|
|
111
|
-
#
|
|
112
|
-
# * MCP_VERBOSE_LOGS: true to include debug-level diagnostics
|
|
113
|
-
# * MCP_LOG_LEVEL: info | debug (debug enables verbose logs)
|
|
43
|
+
# Optional: observability
|
|
114
44
|
# MCP_VERBOSE_LOGS=false
|
|
115
45
|
# MCP_LOG_LEVEL=info
|
package/README.md
CHANGED
|
@@ -14,146 +14,168 @@ Default transport is `stdio`. Native Streamable HTTP is also supported at `/mcp`
|
|
|
14
14
|
|
|
15
15
|
https://github.com/user-attachments/assets/cc1c5f4b-1461-4462-897a-75abc20d62a6
|
|
16
16
|
|
|
17
|
-
## Two
|
|
17
|
+
## Two Core Usage Modes
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
1. Remote MCP over HTTP (recommended)
|
|
20
|
+
2. Local MCP via `npx`
|
|
20
21
|
|
|
21
|
-
1
|
|
22
|
-
2. HTTP deployment on Ubuntu with full data + prebuilt indexes + Gemini embeddings
|
|
22
|
+
### 1) Remote (Recommended)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Use this endpoint directly:
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- `https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp`
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Command:
|
|
28
|
+
### 2) Local
|
|
31
29
|
|
|
32
30
|
```bash
|
|
33
31
|
npx -y simple-dynamsoft-mcp@latest
|
|
34
32
|
```
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
- No explicit environment variables are required for the default path.
|
|
38
|
-
- Default profile is lightweight (`lite`) and avoids local embedding model downloads.
|
|
39
|
-
- If local data is missing, the package can bootstrap pinned data from cache/download sources.
|
|
34
|
+
## Deployment Guides
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
- Azure Container Apps runbook (two-lane release/data architecture): `docs/deployment/azure-container-apps.md`
|
|
37
|
+
- Shared Azure data/index sync runbook: `docs/deployment/data-sync-azure.md`
|
|
38
|
+
- Self-hosting (Ubuntu/any server): `docs/deployment/self-hosting.md`
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
## MCP Client Configuration
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
Use one of the following client configs. Remote is recommended.
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
sudo apt update
|
|
49
|
-
sudo apt install -y git curl
|
|
50
|
-
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
51
|
-
sudo apt install -y nodejs
|
|
52
|
-
node -v
|
|
53
|
-
npm -v
|
|
54
|
-
```
|
|
44
|
+
### OpenCode
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
<details>
|
|
47
|
+
<summary>OpenCode Config</summary>
|
|
57
48
|
|
|
58
|
-
|
|
59
|
-
git clone --recurse-submodules https://github.com/yushulx/simple-dynamsoft-mcp.git
|
|
60
|
-
cd simple-dynamsoft-mcp
|
|
61
|
-
npm ci
|
|
62
|
-
```
|
|
49
|
+
Remote (recommended):
|
|
63
50
|
|
|
64
|
-
|
|
51
|
+
Location:
|
|
52
|
+
- macOS: `~/.config/opencode/opencode.json`
|
|
53
|
+
- Windows: `%USERPROFILE%\.config\opencode\opencode.json`
|
|
65
54
|
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"$schema": "https://opencode.ai/config.json",
|
|
58
|
+
"mcp": {
|
|
59
|
+
"dynamsoft": {
|
|
60
|
+
"type": "remote",
|
|
61
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
69
65
|
```
|
|
70
66
|
|
|
71
|
-
|
|
67
|
+
Local:
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"$schema": "https://opencode.ai/config.json",
|
|
72
|
+
"mcp": {
|
|
73
|
+
"dynamsoft": {
|
|
74
|
+
"type": "local",
|
|
75
|
+
"command": ["npx", "-y", "simple-dynamsoft-mcp@latest"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
GEMINI_API_KEY=your_key_here
|
|
81
|
+
</details>
|
|
77
82
|
|
|
78
|
-
|
|
79
|
-
RAG_PROVIDER=gemini
|
|
80
|
-
RAG_FALLBACK=lexical
|
|
83
|
+
### Claude Desktop
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
MCP_DATA_REFRESH_ON_START=false
|
|
85
|
+
<details>
|
|
86
|
+
<summary>Claude Desktop Config</summary>
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
Location:
|
|
89
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
90
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
91
|
+
|
|
92
|
+
Remote (recommended):
|
|
87
93
|
|
|
88
|
-
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"dynamsoft": {
|
|
98
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
89
102
|
```
|
|
90
103
|
|
|
91
|
-
|
|
104
|
+
Local:
|
|
92
105
|
|
|
93
|
-
```
|
|
94
|
-
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"mcpServers": {
|
|
109
|
+
"dynamsoft": {
|
|
110
|
+
"command": "npx",
|
|
111
|
+
"args": ["-y", "simple-dynamsoft-mcp@latest"]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
95
115
|
```
|
|
96
116
|
|
|
97
|
-
|
|
98
|
-
- `http://<server-ip>:3333/mcp`
|
|
117
|
+
</details>
|
|
99
118
|
|
|
100
|
-
###
|
|
119
|
+
### VS Code with GitHub Copilot
|
|
101
120
|
|
|
102
|
-
|
|
121
|
+
<details>
|
|
122
|
+
<summary>VS Code MCP Config</summary>
|
|
103
123
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
After=network.target
|
|
124
|
+
Global location:
|
|
125
|
+
- macOS: `~/Library/Application Support/Code/User/mcp.json`
|
|
126
|
+
- Windows: `%APPDATA%\Code\User\mcp.json`
|
|
108
127
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
ExecStart=/usr/bin/node /opt/simple-dynamsoft-mcp/src/index.js --transport=http --host=0.0.0.0 --port=3333
|
|
113
|
-
EnvironmentFile=/opt/simple-dynamsoft-mcp/.env
|
|
114
|
-
Restart=always
|
|
115
|
-
RestartSec=3
|
|
128
|
+
Workspace alternative: `.vscode/mcp.json`
|
|
129
|
+
|
|
130
|
+
Remote (recommended):
|
|
116
131
|
|
|
117
|
-
|
|
118
|
-
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"servers": {
|
|
135
|
+
"dynamsoft": {
|
|
136
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
119
140
|
```
|
|
120
141
|
|
|
121
|
-
|
|
142
|
+
Local:
|
|
122
143
|
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"servers": {
|
|
147
|
+
"dynamsoft": {
|
|
148
|
+
"command": "npx",
|
|
149
|
+
"args": ["-y", "simple-dynamsoft-mcp@latest"]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
128
153
|
```
|
|
129
154
|
|
|
130
|
-
|
|
155
|
+
</details>
|
|
131
156
|
|
|
132
|
-
|
|
157
|
+
### Cursor
|
|
133
158
|
|
|
134
|
-
|
|
159
|
+
<details>
|
|
160
|
+
<summary>Cursor MCP Config</summary>
|
|
135
161
|
|
|
136
162
|
Location:
|
|
137
|
-
- macOS: `~/.
|
|
138
|
-
- Windows: `%USERPROFILE%\.
|
|
163
|
+
- macOS: `~/.cursor/mcp.json`
|
|
164
|
+
- Windows: `%USERPROFILE%\.cursor\mcp.json`
|
|
165
|
+
|
|
166
|
+
Remote (recommended):
|
|
139
167
|
|
|
140
168
|
```json
|
|
141
169
|
{
|
|
142
|
-
"
|
|
143
|
-
"mcp": {
|
|
170
|
+
"mcpServers": {
|
|
144
171
|
"dynamsoft": {
|
|
145
|
-
"
|
|
146
|
-
"command": ["npx", "-y", "simple-dynamsoft-mcp@latest"]
|
|
172
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
147
173
|
}
|
|
148
174
|
}
|
|
149
175
|
}
|
|
150
176
|
```
|
|
151
177
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Location:
|
|
155
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
156
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
178
|
+
Local:
|
|
157
179
|
|
|
158
180
|
```json
|
|
159
181
|
{
|
|
@@ -166,15 +188,34 @@ Location:
|
|
|
166
188
|
}
|
|
167
189
|
```
|
|
168
190
|
|
|
169
|
-
|
|
191
|
+
</details>
|
|
170
192
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
193
|
+
### Windsurf
|
|
194
|
+
|
|
195
|
+
<details>
|
|
196
|
+
<summary>Windsurf MCP Config</summary>
|
|
197
|
+
|
|
198
|
+
Location:
|
|
199
|
+
- macOS: `~/.codeium/windsurf/mcp_config.json`
|
|
200
|
+
- Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`
|
|
201
|
+
|
|
202
|
+
Remote (recommended):
|
|
174
203
|
|
|
175
204
|
```json
|
|
176
205
|
{
|
|
177
|
-
"
|
|
206
|
+
"mcpServers": {
|
|
207
|
+
"dynamsoft": {
|
|
208
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Local:
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"mcpServers": {
|
|
178
219
|
"dynamsoft": {
|
|
179
220
|
"command": "npx",
|
|
180
221
|
"args": ["-y", "simple-dynamsoft-mcp@latest"]
|
|
@@ -183,30 +224,29 @@ Global location:
|
|
|
183
224
|
}
|
|
184
225
|
```
|
|
185
226
|
|
|
186
|
-
|
|
227
|
+
</details>
|
|
187
228
|
|
|
188
|
-
###
|
|
229
|
+
### Cline
|
|
230
|
+
|
|
231
|
+
<details>
|
|
232
|
+
<summary>Cline MCP Config</summary>
|
|
189
233
|
|
|
190
234
|
Location:
|
|
191
|
-
-
|
|
192
|
-
|
|
235
|
+
- VS Code settings JSON for Cline MCP integration
|
|
236
|
+
|
|
237
|
+
Remote (recommended):
|
|
193
238
|
|
|
194
239
|
```json
|
|
195
240
|
{
|
|
196
241
|
"mcpServers": {
|
|
197
242
|
"dynamsoft": {
|
|
198
|
-
"
|
|
199
|
-
"args": ["-y", "simple-dynamsoft-mcp@latest"]
|
|
243
|
+
"url": "https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp"
|
|
200
244
|
}
|
|
201
245
|
}
|
|
202
246
|
}
|
|
203
247
|
```
|
|
204
248
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
Location:
|
|
208
|
-
- macOS: `~/.codeium/windsurf/mcp_config.json`
|
|
209
|
-
- Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`
|
|
249
|
+
Local:
|
|
210
250
|
|
|
211
251
|
```json
|
|
212
252
|
{
|
|
@@ -219,6 +259,38 @@ Location:
|
|
|
219
259
|
}
|
|
220
260
|
```
|
|
221
261
|
|
|
262
|
+
</details>
|
|
263
|
+
|
|
264
|
+
### Continue
|
|
265
|
+
|
|
266
|
+
<details>
|
|
267
|
+
<summary>Continue MCP Config</summary>
|
|
268
|
+
|
|
269
|
+
Location:
|
|
270
|
+
- `~/.continue/config.yaml` (or workspace Continue config)
|
|
271
|
+
|
|
272
|
+
Remote (recommended):
|
|
273
|
+
|
|
274
|
+
```yaml
|
|
275
|
+
mcpServers:
|
|
276
|
+
dynamsoft:
|
|
277
|
+
transport: streamable-http
|
|
278
|
+
url: https://simple-dynamsoft-mcp.wonderfulwave-69908b91.eastus2.azurecontainerapps.io/mcp
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Local:
|
|
282
|
+
|
|
283
|
+
```yaml
|
|
284
|
+
mcpServers:
|
|
285
|
+
dynamsoft:
|
|
286
|
+
command: npx
|
|
287
|
+
args:
|
|
288
|
+
- -y
|
|
289
|
+
- simple-dynamsoft-mcp@latest
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
</details>
|
|
293
|
+
|
|
222
294
|
## Available Tools
|
|
223
295
|
|
|
224
296
|
The server exposes this minimal tool surface:
|
|
@@ -230,25 +302,6 @@ The server exposes this minimal tool surface:
|
|
|
230
302
|
- `get_quickstart` -- opinionated quickstart: picks a sample by scenario, returns code + install instructions
|
|
231
303
|
- `get_sample_files` -- get full project files for a known sample (discovered via list_samples or search)
|
|
232
304
|
|
|
233
|
-
## Companion: Dynamsoft SDK Skills
|
|
234
|
-
|
|
235
|
-
For AI agents that support skills (Claude Code, OpenCode, Codex), install [dynamsoft-sdk-skills](https://github.com/user/dynamsoft-sdk-skills) for guided integration workflows:
|
|
236
|
-
|
|
237
|
-
npx dynamsoft-sdk-skills install --all
|
|
238
|
-
|
|
239
|
-
- **Skills** provide integration patterns, gotchas, and decision trees (loaded into agent context)
|
|
240
|
-
- **MCP Server** provides runtime tools: version resolution, doc search, sample browsing, and retrieval of full sample project files
|
|
241
|
-
|
|
242
|
-
Both work independently, but together the skills guide agents to use MCP tools at the right moments.
|
|
243
|
-
|
|
244
|
-
## Quick Troubleshooting
|
|
245
|
-
|
|
246
|
-
- If startup says data is incomplete, run `npm run data:bootstrap` and `npm run data:sync` in clone-based deployments.
|
|
247
|
-
- For HTTP deployments, check service logs first:
|
|
248
|
-
- `journalctl -u simple-dynamsoft-mcp -f`
|
|
249
|
-
- For Gemini mode, confirm `GEMINI_API_KEY` is present in service environment.
|
|
250
|
-
- Structured startup logs include `[data]`, `[transport]`, and `[rag]` event lines.
|
|
251
|
-
|
|
252
305
|
## Advanced Configuration And Operator Docs
|
|
253
306
|
|
|
254
307
|
Advanced settings, CI/runbook details, and maintenance workflows live in:
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"branch": "master",
|
|
89
89
|
"owner": "dynamsoft-docs",
|
|
90
90
|
"repo": "web-twain-docs",
|
|
91
|
-
"commit": "
|
|
92
|
-
"archiveUrl": "https://codeload.github.com/dynamsoft-docs/web-twain-docs/zip/
|
|
91
|
+
"commit": "275eefb2a97512e91cfca139ac58f8a8b6317f8a",
|
|
92
|
+
"archiveUrl": "https://codeload.github.com/dynamsoft-docs/web-twain-docs/zip/275eefb2a97512e91cfca139ac58f8a8b6317f8a"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "data/samples/dynamic-web-twain",
|
|
@@ -455,7 +455,7 @@
|
|
|
455
455
|
"dwt": {
|
|
456
456
|
"name": "Dynamic Web TWAIN",
|
|
457
457
|
"description": "Document scanning SDK for web applications. Supports TWAIN, WIA, ICA, SANE scanners.",
|
|
458
|
-
"version": "19.3",
|
|
458
|
+
"version": "19.3.2",
|
|
459
459
|
"default_platform": "web",
|
|
460
460
|
"snippet_path": "dynamic-web-twain",
|
|
461
461
|
"api_docs": "web-twain-api-docs.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-dynamsoft-mcp",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "MCP server for Dynamsoft SDKs - Capture Vision, Barcode Reader (Mobile/Python/Web), Dynamic Web TWAIN, and Document Viewer. Provides documentation, code snippets, and API guidance.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,10 +24,8 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"start": "node src/index.js",
|
|
26
26
|
"test": "npm run test:lite",
|
|
27
|
-
"test:unit": "node --test test/unit/gemini-retry.test.js test/unit/profile-config.test.js test/unit/lexical-provider.test.js test/unit/hydration-mode.test.js test/unit/hydration-policy.test.js test/unit/repo-map.test.js test/unit/download-utils.test.js test/unit/logging.test.js test/unit/create-server.test.js test/unit/server-helpers.test.js",
|
|
27
|
+
"test:unit": "node --test test/unit/gemini-retry.test.js test/unit/providers.test.js test/unit/profile-config.test.js test/unit/lexical-provider.test.js test/unit/hydration-mode.test.js test/unit/hydration-policy.test.js test/unit/repo-map.test.js test/unit/download-utils.test.js test/unit/logging.test.js test/unit/rag-logger.test.js test/unit/create-server.test.js test/unit/server-helpers.test.js test/unit/shared-state.test.js test/unit/vector-cache.test.js test/unit/compute-repo-signatures.test.js test/unit/data-sync-azure.test.js",
|
|
28
28
|
"test:lite": "npm run test:stdio && npm run test:http && npm run test:package",
|
|
29
|
-
"test:fuse": "npm run test:lite",
|
|
30
|
-
"test:local": "node --test test/integration/stdio.test.js test/integration/http.test.js",
|
|
31
29
|
"test:lexical": "node --test test/integration/stdio.test.js test/integration/http.test.js",
|
|
32
30
|
"test:gemini": "node scripts/run-gemini-tests.mjs",
|
|
33
31
|
"test:stdio": "node --test test/integration/stdio.test.js",
|
|
@@ -67,7 +65,6 @@
|
|
|
67
65
|
],
|
|
68
66
|
"dependencies": {
|
|
69
67
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
70
|
-
"@xenova/transformers": "^2.17.2",
|
|
71
68
|
"dotenv": "^16.4.5",
|
|
72
69
|
"extract-zip": "^2.0.1",
|
|
73
70
|
"fuse.js": "^7.0.0",
|