openclaw-mcp-router 0.2.6 → 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/.github/pull_request_template.md +14 -0
- package/README.md +110 -158
- package/docs/CLI_FIRST_WORKFLOW.md +76 -0
- package/openclaw.plugin.json +163 -34
- package/package.json +8 -2
- package/skills/mcp-router/SKILL.md +94 -0
- package/skills/mcp-router/references/workflows.md +184 -0
- package/skills/mcp-server-manager/SKILL.md +89 -0
- package/skills/packages/mcp-router.skill +0 -0
- package/skills/packages/mcp-server-manager.skill +0 -0
- package/src/commands/add-server.ts +90 -0
- package/src/commands/disable-server.ts +33 -0
- package/src/commands/enable-server.ts +37 -0
- package/src/commands/list-servers.ts +106 -0
- package/src/commands/remove-server.ts +33 -0
- package/src/config.ts +58 -14
- package/src/constants.ts +19 -0
- package/src/index.ts +160 -34
- package/src/indexer.ts +74 -9
- package/src/mcp-client.ts +2 -2
- package/src/setup/config-writer.ts +184 -0
- package/src/setup/control-command.ts +467 -0
- package/src/setup/setup-command.ts +225 -0
- package/src/test/config.test.ts +72 -2
- package/src/test/indexer.test.ts +1 -1
- package/src/test/tools/mcp-call-tool.test.ts +3 -2
- package/src/test/tools/mcp-search-tool.test.ts +12 -2
- package/src/tools/mcp-call-tool.ts +7 -7
- package/src/tools/mcp-search-tool.ts +61 -16
- package/src/vector-store.ts +18 -0
- package/tsconfig.json +2 -1
- package/.claude/settings.local.json +0 -9
- package/CLAUDE.md +0 -54
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
-
|
|
3
|
+
|
|
4
|
+
## Why
|
|
5
|
+
-
|
|
6
|
+
|
|
7
|
+
## Validation
|
|
8
|
+
- [ ] `npm test` passes locally
|
|
9
|
+
|
|
10
|
+
## Documentation Checklist
|
|
11
|
+
- [ ] README updated (if behavior/config/user workflow changed)
|
|
12
|
+
- [ ] docs/ updated to match README and implementation
|
|
13
|
+
- [ ] No README/docs drift introduced
|
|
14
|
+
- [ ] skills/ content updated to match behavior/config changes (if applicable)
|
package/README.md
CHANGED
|
@@ -1,207 +1,159 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OpenClaw MCP Router 🚀
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OpenClaw MCP Router is an OpenClaw plugin that keeps MCP tool catalogs out of the system prompt until needed.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Instead of injecting every MCP schema up front, it provides two lightweight meta-tools:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- `mcp_search` → discover the right tool at runtime
|
|
8
|
+
- `mcp_call` → execute as JSON fallback
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
This cuts context bloat and improves tool selection quality on large MCP catalogs.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
---
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
- **`mcp_call(tool_name, params_json)`** — look up the owning MCP server, execute the call, return the result
|
|
14
|
+
## Why this exists
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Large MCP catalogs are expensive in prompt space.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- **Token waste:** tens of thousands of tokens before first user turn
|
|
19
|
+
- **Reasoning quality loss:** "lost in the middle" on oversized prompts
|
|
20
|
+
- **Higher cost:** more prompt tokens every turn
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
openclaw plugins install openclaw-mcp-router
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Alternative: install from source**
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
git clone https://github.com/lunarmoon26/openclaw-mcp-router.git
|
|
28
|
-
openclaw plugins install ./openclaw-mcp-router
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Requires [Ollama](https://ollama.ai) running locally with an embedding model:
|
|
22
|
+
MCP Router applies Anthropic's tool-search pattern so only relevant tools are surfaced when needed.
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Configuration
|
|
39
|
-
|
|
40
|
-
Add to `~/.openclaw/openclaw.yml`:
|
|
41
|
-
|
|
42
|
-
```yaml
|
|
43
|
-
tools:
|
|
44
|
-
alsoAllow:
|
|
45
|
-
- mcp_search
|
|
46
|
-
- mcp_call
|
|
47
|
-
|
|
48
|
-
plugins:
|
|
49
|
-
openclaw-mcp-router:
|
|
50
|
-
enabled: true
|
|
51
|
-
config:
|
|
52
|
-
servers:
|
|
53
|
-
- name: filesystem
|
|
54
|
-
transport: stdio
|
|
55
|
-
command: npx
|
|
56
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
|
57
|
-
- name: github
|
|
58
|
-
transport: sse
|
|
59
|
-
url: https://api.githubcopilot.com/mcp/
|
|
60
|
-
embedding:
|
|
61
|
-
provider: ollama
|
|
62
|
-
model: embeddinggemma # or qwen3-embedding:0.6b, all-minilm
|
|
63
|
-
url: http://localhost:11434
|
|
64
|
-
search:
|
|
65
|
-
topK: 5 # tools returned per search (1–20)
|
|
66
|
-
minScore: 0.3 # minimum similarity threshold (0–1)
|
|
67
|
-
```
|
|
24
|
+
Refs:
|
|
25
|
+
- Tool search / advanced tool use: <https://www.anthropic.com/engineering/advanced-tool-use>
|
|
26
|
+
- Code execution with MCP: <https://www.anthropic.com/engineering/code-execution-with-mcp>
|
|
68
27
|
|
|
69
|
-
|
|
28
|
+
---
|
|
70
29
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
If the plugin is running and `openclaw openclaw-mcp-router stats` shows indexed tools, but your agent can't call `mcp_search` — this is why. Add the allowlist to your config:
|
|
74
|
-
|
|
75
|
-
```yaml
|
|
76
|
-
# Global — all agents get access
|
|
77
|
-
tools:
|
|
78
|
-
alsoAllow:
|
|
79
|
-
- mcp_search
|
|
80
|
-
- mcp_call
|
|
81
|
-
```
|
|
30
|
+
## Core model
|
|
82
31
|
|
|
83
|
-
|
|
32
|
+
### 1) Index time (`reindex`)
|
|
33
|
+
- Connect to configured MCP servers
|
|
34
|
+
- List tools
|
|
35
|
+
- Embed tool text
|
|
36
|
+
- Store vectors in LanceDB
|
|
37
|
+
- Register tool→server ownership
|
|
38
|
+
- *(Optional)* generate CLI artifacts via `mcporter generate-cli`
|
|
84
39
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- mcp_search
|
|
92
|
-
- mcp_call
|
|
93
|
-
```
|
|
40
|
+
### 2) Runtime (`mcp_search`)
|
|
41
|
+
- Semantic search over indexed tools
|
|
42
|
+
- Default schema verbosity is adaptive:
|
|
43
|
+
- if `mcporter` is available: compact cards by default
|
|
44
|
+
- if `mcporter` is not available: include JSON params by default
|
|
45
|
+
- Full JSON schema can always be forced with `include_schema=true`
|
|
94
46
|
|
|
95
|
-
|
|
47
|
+
### 3) Execute (`mcp_call`)
|
|
48
|
+
- JSON-based execution path (classic MCP params flow)
|
|
96
49
|
|
|
97
|
-
|
|
50
|
+
---
|
|
98
51
|
|
|
99
|
-
|
|
52
|
+
## CLI-first behavior (new)
|
|
100
53
|
|
|
101
|
-
|
|
102
|
-
|-------|----------|-------------|
|
|
103
|
-
| `name` | yes | Unique server identifier |
|
|
104
|
-
| `transport` | yes | `stdio`, `sse`, or `http` |
|
|
105
|
-
| `command` | stdio only | Executable to run |
|
|
106
|
-
| `args` | stdio only | Arguments array |
|
|
107
|
-
| `env` | no | Extra env vars merged over process.env; supports `${VAR}` expansion |
|
|
108
|
-
| `url` | sse/http only | Server endpoint URL |
|
|
109
|
-
| `timeout` | no | Per-server connect timeout in ms; overrides `indexer.connectTimeout` |
|
|
54
|
+
Router is now optimized for a CLI-first workflow:
|
|
110
55
|
|
|
111
|
-
|
|
56
|
+
- Prefer: `mcporter call <server>.<tool> ...`
|
|
57
|
+
- Fallback: `mcp_call(tool_name, params_json)`
|
|
112
58
|
|
|
113
|
-
|
|
114
|
-
|-------|---------|-------------|
|
|
115
|
-
| `provider` | `ollama` | Only Ollama is supported |
|
|
116
|
-
| `model` | `embeddinggemma` | Embedding model name |
|
|
117
|
-
| `url` | `http://localhost:11434` | Ollama base URL (must be localhost) |
|
|
59
|
+
`mcp_search` adapts to environment: compact when mcporter is present, schema-forward when it is not (so agents can drive `mcp_call` reliably).
|
|
118
60
|
|
|
119
|
-
|
|
61
|
+
---
|
|
120
62
|
|
|
121
|
-
|
|
122
|
-
|-------|---------|-------------|
|
|
123
|
-
| `path` | `~/.openclaw/openclaw-mcp-router/lancedb` | LanceDB database directory |
|
|
63
|
+
## Quick start
|
|
124
64
|
|
|
125
|
-
###
|
|
65
|
+
### Prerequisites
|
|
126
66
|
|
|
127
|
-
|
|
67
|
+
```bash
|
|
68
|
+
ollama pull embeddinggemma
|
|
69
|
+
```
|
|
128
70
|
|
|
129
|
-
|
|
130
|
-
|-------|---------|-------------|
|
|
131
|
-
| `connectTimeout` | `60000` | Per-server default connect timeout in ms |
|
|
132
|
-
| `maxRetries` | `3` | Retry attempts per server (0 = no retry) |
|
|
133
|
-
| `initialRetryDelay` | `2000` | Initial backoff delay in ms |
|
|
134
|
-
| `maxRetryDelay` | `30000` | Max backoff cap in ms |
|
|
135
|
-
| `maxChunkChars` | `500` | Max characters per chunk for long tool descriptions. `0` = disable chunking |
|
|
136
|
-
| `overlapChars` | `100` | Overlap characters between adjacent chunks |
|
|
71
|
+
### Install
|
|
137
72
|
|
|
138
|
-
|
|
73
|
+
```bash
|
|
74
|
+
openclaw plugins install openclaw-mcp-router
|
|
75
|
+
```
|
|
139
76
|
|
|
140
|
-
|
|
77
|
+
### Setup + index
|
|
141
78
|
|
|
142
|
-
|
|
79
|
+
```bash
|
|
80
|
+
openclaw openclaw-mcp-router setup
|
|
81
|
+
openclaw openclaw-mcp-router reindex
|
|
82
|
+
```
|
|
143
83
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
84
|
+
The setup wizard auto-detects whether `mcporter` is installed and suggests a sensible default for `mcp_search` schema verbosity.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Key configuration
|
|
89
|
+
|
|
90
|
+
In `~/.openclaw/openclaw.json` under `plugins.entries.openclaw-mcp-router.config`:
|
|
91
|
+
|
|
92
|
+
```json5
|
|
93
|
+
{
|
|
94
|
+
"search": {
|
|
95
|
+
"topK": 5,
|
|
96
|
+
"minScore": 0.3
|
|
97
|
+
// includeParametersDefault optional:
|
|
98
|
+
// true -> always include params
|
|
99
|
+
// false -> always compact
|
|
100
|
+
// unset -> auto (based on mcporter availability)
|
|
101
|
+
},
|
|
102
|
+
"indexer": {
|
|
103
|
+
"connectTimeout": 60000,
|
|
104
|
+
"maxRetries": 3,
|
|
105
|
+
"initialRetryDelay": 2000,
|
|
106
|
+
"maxRetryDelay": 30000,
|
|
107
|
+
"maxChunkChars": 500,
|
|
108
|
+
"overlapChars": 100,
|
|
109
|
+
"generateCliArtifacts": false
|
|
110
|
+
}
|
|
111
|
+
}
|
|
156
112
|
```
|
|
157
113
|
|
|
158
|
-
###
|
|
114
|
+
### Notes
|
|
159
115
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| `minScore` | `0.3` | Minimum similarity score (0–1) |
|
|
116
|
+
- `search.includeParametersDefault` is optional; if omitted, router auto-decides based on mcporter availability.
|
|
117
|
+
- `indexer.generateCliArtifacts=true` enables best-effort per-server `mcporter generate-cli` during reindex.
|
|
118
|
+
- `mcp_call` stays the classic JSON meta-tool (no backend mode flag).
|
|
164
119
|
|
|
165
|
-
|
|
120
|
+
---
|
|
166
121
|
|
|
167
|
-
|
|
168
|
-
# Re-index all configured MCP servers
|
|
169
|
-
openclaw openclaw-mcp-router reindex
|
|
122
|
+
## Server management
|
|
170
123
|
|
|
171
|
-
|
|
172
|
-
openclaw openclaw-mcp-router
|
|
124
|
+
```bash
|
|
125
|
+
openclaw openclaw-mcp-router control
|
|
126
|
+
openclaw openclaw-mcp-router list
|
|
127
|
+
openclaw openclaw-mcp-router add <name> <command-or-url> [...]
|
|
128
|
+
openclaw openclaw-mcp-router reindex
|
|
173
129
|
```
|
|
174
130
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
1. At gateway startup, the plugin connects to each MCP server in parallel (with retry and configurable timeouts), lists its tools, embeds each description via Ollama, and stores them in a local LanceDB index.
|
|
178
|
-
2. When the agent needs to use an MCP capability, it calls `mcp_search("what I want to do")` to find relevant tools.
|
|
179
|
-
3. The agent then calls `mcp_call("tool_name", '{"param": "value"}')` to execute the chosen tool.
|
|
131
|
+
---
|
|
180
132
|
|
|
181
|
-
|
|
133
|
+
## MCPorter inspiration
|
|
182
134
|
|
|
183
|
-
|
|
135
|
+
Huge thanks to **@steipete** and [mcporter](https://github.com/steipete/mcporter) for the CLI-first MCP execution model inspiration.
|
|
184
136
|
|
|
185
|
-
|
|
186
|
-
|-------|------|-------|
|
|
187
|
-
| `embeddinggemma` | 768 | Good balance, recommended default |
|
|
188
|
-
| `qwen3-embedding:0.6b` | 1024 | Higher quality, larger footprint |
|
|
189
|
-
| `all-minilm` | 384 | Fast and lightweight |
|
|
137
|
+
---
|
|
190
138
|
|
|
191
|
-
|
|
139
|
+
## Documentation
|
|
192
140
|
|
|
193
|
-
|
|
141
|
+
- Architecture + flow details: `docs/CLI_FIRST_WORKFLOW.md`
|
|
142
|
+
- Plugin config schema: `openclaw.plugin.json`
|
|
143
|
+
- Skill usage examples: `skills/mcp-router/`
|
|
194
144
|
|
|
195
|
-
|
|
145
|
+
---
|
|
196
146
|
|
|
197
|
-
|
|
147
|
+
## Contributing
|
|
198
148
|
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
- **Programmatic tool calling.** Anthropic's guide describes letting the agent compose tool calls inside code blocks rather than pure JSON — reducing context pollution and enabling multi-step tool pipelines.
|
|
149
|
+
PRs welcome — especially around:
|
|
150
|
+
- better reranking
|
|
151
|
+
- hybrid retrieval (vector + lexical)
|
|
203
152
|
|
|
204
|
-
|
|
153
|
+
PR hygiene:
|
|
154
|
+
- keep README + docs in sync for every behavior/config/workflow change
|
|
155
|
+
- keep `skills/` guidance in sync when user-facing behavior changes
|
|
156
|
+
- run test suite before opening PR
|
|
205
157
|
|
|
206
158
|
## License
|
|
207
159
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# CLI-First Workflow (MCP Router + MCPorter)
|
|
2
|
+
|
|
3
|
+
This document explains the intended execution model:
|
|
4
|
+
|
|
5
|
+
1. Reindex tools + metadata
|
|
6
|
+
2. Search tools with adaptive schema verbosity
|
|
7
|
+
3. Prefer CLI calls when available
|
|
8
|
+
4. Use `mcp_call` as classic JSON fallback
|
|
9
|
+
|
|
10
|
+
## Reindex behavior
|
|
11
|
+
|
|
12
|
+
During `openclaw openclaw-mcp-router reindex`:
|
|
13
|
+
|
|
14
|
+
- Router connects to enabled MCP servers
|
|
15
|
+
- Lists tools
|
|
16
|
+
- Chunks/embeds descriptions
|
|
17
|
+
- Stores vectors + metadata in LanceDB
|
|
18
|
+
|
|
19
|
+
Optional:
|
|
20
|
+
- If `indexer.generateCliArtifacts=true`, router runs best-effort `mcporter generate-cli` per server.
|
|
21
|
+
- Generation failures do **not** block indexing.
|
|
22
|
+
|
|
23
|
+
## `mcp_search` behavior
|
|
24
|
+
|
|
25
|
+
`mcp_search` supports adaptive defaults:
|
|
26
|
+
|
|
27
|
+
- If `mcporter` is installed: default to compact cards (save tokens)
|
|
28
|
+
- If `mcporter` is not installed: include JSON params by default (so agents can call `mcp_call` reliably)
|
|
29
|
+
|
|
30
|
+
Overrides:
|
|
31
|
+
- request-level: `include_schema=true|false`
|
|
32
|
+
- config-level: `search.includeParametersDefault=true|false`
|
|
33
|
+
- if unset, auto mode is used
|
|
34
|
+
|
|
35
|
+
## `mcp_call` behavior
|
|
36
|
+
|
|
37
|
+
`mcp_call` remains the original JSON meta-tool path:
|
|
38
|
+
|
|
39
|
+
- resolve tool owner by registry
|
|
40
|
+
- open MCP connection
|
|
41
|
+
- call tool with `params_json`
|
|
42
|
+
- return content/errors
|
|
43
|
+
|
|
44
|
+
No backend mode flag is required.
|
|
45
|
+
|
|
46
|
+
## Recommended config
|
|
47
|
+
|
|
48
|
+
```json5
|
|
49
|
+
{
|
|
50
|
+
"plugins": {
|
|
51
|
+
"entries": {
|
|
52
|
+
"openclaw-mcp-router": {
|
|
53
|
+
"enabled": true,
|
|
54
|
+
"config": {
|
|
55
|
+
"search": {
|
|
56
|
+
"topK": 5,
|
|
57
|
+
"minScore": 0.3
|
|
58
|
+
// includeParametersDefault optional (true|false)
|
|
59
|
+
},
|
|
60
|
+
"indexer": {
|
|
61
|
+
"generateCliArtifacts": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Acknowledgement
|
|
71
|
+
|
|
72
|
+
Special thanks to **@steipete** and **MCPorter**:
|
|
73
|
+
<https://github.com/steipete/mcporter>
|
|
74
|
+
|
|
75
|
+
Anthropic reference:
|
|
76
|
+
<https://www.anthropic.com/engineering/code-execution-with-mcp>
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-mcp-router",
|
|
3
3
|
"name": "MCP Router",
|
|
4
|
-
"description": "Semantic search across MCP tool catalogs. Reduces context bloat from ~77k
|
|
4
|
+
"description": "Semantic search across MCP tool catalogs. Reduces context bloat from ~77k\u21928.7k tokens by dynamically surfacing only relevant tools.",
|
|
5
5
|
"configSchema": {
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
@@ -12,36 +12,101 @@
|
|
|
12
12
|
"additionalProperties": {
|
|
13
13
|
"type": "object",
|
|
14
14
|
"properties": {
|
|
15
|
-
"command":
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
"command": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"args": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"env": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"url": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"serverUrl": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"type": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"stdio",
|
|
40
|
+
"sse",
|
|
41
|
+
"http"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"headers": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"timeout": {
|
|
51
|
+
"type": "number",
|
|
52
|
+
"description": "Per-server connect timeout in ms; overrides indexer.connectTimeout"
|
|
53
|
+
}
|
|
23
54
|
}
|
|
24
55
|
}
|
|
25
56
|
},
|
|
26
57
|
"mcpServersFile": {
|
|
27
58
|
"type": "string",
|
|
28
|
-
"description": "Path to a .mcp.json file. Default: ~/.openclaw/.mcp.json"
|
|
59
|
+
"description": "Path to a .mcp.json file. Default: ~/.openclaw/openclaw-mcp-router/.mcp.json"
|
|
29
60
|
},
|
|
30
61
|
"servers": {
|
|
31
62
|
"type": "array",
|
|
32
63
|
"description": "Legacy server array format. Prefer mcpServers dict.",
|
|
33
64
|
"items": {
|
|
34
65
|
"type": "object",
|
|
35
|
-
"required": [
|
|
66
|
+
"required": [
|
|
67
|
+
"name",
|
|
68
|
+
"transport"
|
|
69
|
+
],
|
|
36
70
|
"properties": {
|
|
37
|
-
"name":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
71
|
+
"name": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"transport": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"stdio",
|
|
78
|
+
"sse",
|
|
79
|
+
"http"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"command": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"args": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"env": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"url": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"headers": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"timeout": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"description": "Per-server connect timeout in ms; overrides indexer.connectTimeout"
|
|
109
|
+
}
|
|
45
110
|
}
|
|
46
111
|
}
|
|
47
112
|
},
|
|
@@ -49,34 +114,98 @@
|
|
|
49
114
|
"type": "object",
|
|
50
115
|
"description": "Indexer retry and timeout settings",
|
|
51
116
|
"properties": {
|
|
52
|
-
"connectTimeout":
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
117
|
+
"connectTimeout": {
|
|
118
|
+
"type": "number",
|
|
119
|
+
"description": "Per-server default connect timeout in ms (default: 60000)"
|
|
120
|
+
},
|
|
121
|
+
"maxRetries": {
|
|
122
|
+
"type": "number",
|
|
123
|
+
"minimum": 0,
|
|
124
|
+
"description": "Retry attempts per server, 0 = no retry (default: 3)"
|
|
125
|
+
},
|
|
126
|
+
"initialRetryDelay": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"description": "Initial backoff delay in ms (default: 2000)"
|
|
129
|
+
},
|
|
130
|
+
"maxRetryDelay": {
|
|
131
|
+
"type": "number",
|
|
132
|
+
"description": "Max backoff cap in ms (default: 30000)"
|
|
133
|
+
},
|
|
134
|
+
"maxChunkChars": {
|
|
135
|
+
"type": "number",
|
|
136
|
+
"minimum": 0,
|
|
137
|
+
"description": "Max chars per chunk for long tool descriptions. 0 = disable chunking (default: 500)"
|
|
138
|
+
},
|
|
139
|
+
"overlapChars": {
|
|
140
|
+
"type": "number",
|
|
141
|
+
"minimum": 0,
|
|
142
|
+
"description": "Overlap chars between adjacent chunks (default: 100)"
|
|
143
|
+
},
|
|
144
|
+
"generateCliArtifacts": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"description": "Generate mcporter CLI artifacts during reindex (default: false)"
|
|
147
|
+
}
|
|
58
148
|
}
|
|
59
149
|
},
|
|
60
150
|
"embedding": {
|
|
61
151
|
"type": "object",
|
|
62
152
|
"properties": {
|
|
63
|
-
"provider": {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
153
|
+
"provider": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"enum": [
|
|
156
|
+
"openai",
|
|
157
|
+
"gemini",
|
|
158
|
+
"voyage",
|
|
159
|
+
"mistral",
|
|
160
|
+
"ollama"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"model": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"baseUrl": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"url": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Deprecated: use baseUrl. Old Ollama URL (gets /v1 appended)."
|
|
172
|
+
},
|
|
173
|
+
"apiKey": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"headers": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
69
182
|
}
|
|
70
183
|
},
|
|
71
184
|
"vectorDb": {
|
|
72
185
|
"type": "object",
|
|
73
|
-
"properties": {
|
|
186
|
+
"properties": {
|
|
187
|
+
"path": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
74
191
|
},
|
|
75
192
|
"search": {
|
|
76
193
|
"type": "object",
|
|
77
194
|
"properties": {
|
|
78
|
-
"topK":
|
|
79
|
-
|
|
195
|
+
"topK": {
|
|
196
|
+
"type": "number",
|
|
197
|
+
"minimum": 1,
|
|
198
|
+
"maximum": 20
|
|
199
|
+
},
|
|
200
|
+
"minScore": {
|
|
201
|
+
"type": "number",
|
|
202
|
+
"minimum": 0,
|
|
203
|
+
"maximum": 1
|
|
204
|
+
},
|
|
205
|
+
"includeParametersDefault": {
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"description": "Include full input schema by default in mcp_search results. If omitted, defaults automatically based on mcporter availability."
|
|
208
|
+
}
|
|
80
209
|
}
|
|
81
210
|
}
|
|
82
211
|
}
|