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.
@@ -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
- # openclaw-mcp-router
1
+ # OpenClaw MCP Router 🚀
2
2
 
3
- Dynamic MCP tool router for [OpenClaw](https://openclaw.ai) — semantic search over large MCP tool catalogs to eliminate context bloat.
3
+ OpenClaw MCP Router is an OpenClaw plugin that keeps MCP tool catalogs out of the system prompt until needed.
4
4
 
5
- ## The problem
5
+ Instead of injecting every MCP schema up front, it provides two lightweight meta-tools:
6
6
 
7
- Loading all MCP tool schemas upfront burns 55k–134k tokens before your agent processes a single message. With 58 tools across 5 MCP servers, that's ~77k tokens wasted on schemas the agent may never use.
7
+ - `mcp_search` → discover the right tool at runtime
8
+ - `mcp_call` → execute as JSON fallback
8
9
 
9
- ## The solution
10
+ This cuts context bloat and improves tool selection quality on large MCP catalogs.
10
11
 
11
- Two tiny tools replace the full schema dump:
12
+ ---
12
13
 
13
- - **`mcp_search(query)`** — embed the query via Ollama, search a local LanceDB index, return only matching tool definitions (~8.7k tokens, 95% reduction)
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
- The agent asks for tools it needs instead of receiving every schema upfront.
16
+ Large MCP catalogs are expensive in prompt space.
17
17
 
18
- ## Install
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
- ```sh
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
- ```sh
34
- ollama pull embeddinggemma
35
- ollama serve
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
- ### Important: `tools.alsoAllow` is required
28
+ ---
70
29
 
71
- The plugin registers `mcp_search` and `mcp_call` as **optional tools** (`optional: true`). This means the gateway loads them, but they are **not exposed to agents** unless explicitly allowlisted.
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
- Or scope it to specific agents:
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
- ```yaml
86
- # Per-agent or under agents.defaults
87
- agents:
88
- defaults:
89
- tools:
90
- alsoAllow:
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
- Restart the gateway after changing the config.
47
+ ### 3) Execute (`mcp_call`)
48
+ - JSON-based execution path (classic MCP params flow)
96
49
 
97
- ## Configuration reference
50
+ ---
98
51
 
99
- ### `servers[]`
52
+ ## CLI-first behavior (new)
100
53
 
101
- | Field | Required | Description |
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
- ### `embedding`
56
+ - Prefer: `mcporter call <server>.<tool> ...`
57
+ - Fallback: `mcp_call(tool_name, params_json)`
112
58
 
113
- | Field | Default | Description |
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
- ### `vectorDb`
61
+ ---
120
62
 
121
- | Field | Default | Description |
122
- |-------|---------|-------------|
123
- | `path` | `~/.openclaw/openclaw-mcp-router/lancedb` | LanceDB database directory |
63
+ ## Quick start
124
64
 
125
- ### `indexer`
65
+ ### Prerequisites
126
66
 
127
- Controls retry behavior and timeouts when connecting to MCP servers at startup. Useful for self-hosted servers (e.g. started via `uvx`) that take time to start up.
67
+ ```bash
68
+ ollama pull embeddinggemma
69
+ ```
128
70
 
129
- | Field | Default | Description |
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
- Retries use exponential backoff: delays are `initialRetryDelay * 2^(attempt-1)`, capped at `maxRetryDelay`. With defaults, a slow server gets attempts at ~0s, ~2s, ~4s, ~8s before giving up.
73
+ ```bash
74
+ openclaw plugins install openclaw-mcp-router
75
+ ```
139
76
 
140
- **Chunking:** When a tool description exceeds `maxChunkChars`, it is split into overlapping chunks at semantic boundaries (paragraphs, lines, sentences). Each chunk is stored as a separate vector, and search results are deduplicated so each tool appears once with its best matching score. Short descriptions (the common case) are unaffected.
77
+ ### Setup + index
141
78
 
142
- Example for a slow-starting Python server:
79
+ ```bash
80
+ openclaw openclaw-mcp-router setup
81
+ openclaw openclaw-mcp-router reindex
82
+ ```
143
83
 
144
- ```yaml
145
- plugins:
146
- openclaw-mcp-router:
147
- config:
148
- mcpServers:
149
- my-python-server:
150
- command: uvx
151
- args: ["my-mcp-server"]
152
- timeout: 120000 # this server needs 2 minutes to start
153
- indexer:
154
- maxRetries: 5
155
- initialRetryDelay: 3000
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
- ### `search`
114
+ ### Notes
159
115
 
160
- | Field | Default | Description |
161
- |-------|---------|-------------|
162
- | `topK` | `5` | Max tools returned per search |
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
- ## CLI commands
120
+ ---
166
121
 
167
- ```sh
168
- # Re-index all configured MCP servers
169
- openclaw openclaw-mcp-router reindex
122
+ ## Server management
170
123
 
171
- # Show indexed tool count
172
- openclaw openclaw-mcp-router stats
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
- ## How it works
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
- Disabling the plugin (`openclaw plugins disable openclaw-mcp-router`) cancels any in-progress indexing immediately. Re-enabling starts fresh.
133
+ ## MCPorter inspiration
182
134
 
183
- ## Supported embedding models
135
+ Huge thanks to **@steipete** and [mcporter](https://github.com/steipete/mcporter) for the CLI-first MCP execution model inspiration.
184
136
 
185
- | Model | Dims | Notes |
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
- Any Ollama embedding model works — dimensions are detected automatically for unknown models.
139
+ ## Documentation
192
140
 
193
- ## Background
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
- This plugin is a basic implementation of the [Tool Search Tool](https://www.anthropic.com/engineering/advanced-tool-use) pattern from Anthropic's advanced tool use guide. The core idea: instead of injecting all tool schemas into the system prompt, provide a search tool that dynamically surfaces only relevant tools at runtime. Anthropic's benchmarks showed this improved tool selection accuracy from 49% to 74% (Opus 4) and 79.5% to 88.1% (Opus 4.5).
145
+ ---
196
146
 
197
- Our approach is intentionally simple — pure vector similarity over tool descriptions. There's plenty of room to improve:
147
+ ## Contributing
198
148
 
199
- - **Hybrid search (BM25 + embedding).** Pure embedding search can miss exact keyword matches. Combining sparse retrieval (BM25/TF-IDF) with dense vectors would improve recall, especially for tools with distinctive names like `git_diff` or `kubectl_apply`.
200
- - **LLM-based reranking.** After the initial vector search returns candidates, a small LLM could rerank them based on the full query context — catching semantic nuances that cosine similarity misses.
201
- - **Tool use examples.** Indexing not just descriptions but example invocations (input/output pairs) would let the search match against concrete usage patterns, not just what the tool claims to do.
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
- Contributions welcome if any of these interest you.
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>
@@ -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→8.7k tokens by dynamically surfacing only relevant tools.",
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": { "type": "string" },
16
- "args": { "type": "array", "items": { "type": "string" } },
17
- "env": { "type": "object", "additionalProperties": { "type": "string" } },
18
- "url": { "type": "string" },
19
- "serverUrl": { "type": "string" },
20
- "type": { "type": "string", "enum": ["stdio", "sse", "http"] },
21
- "headers": { "type": "object", "additionalProperties": { "type": "string" } },
22
- "timeout": { "type": "number", "description": "Per-server connect timeout in ms; overrides indexer.connectTimeout" }
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": ["name", "transport"],
66
+ "required": [
67
+ "name",
68
+ "transport"
69
+ ],
36
70
  "properties": {
37
- "name": { "type": "string" },
38
- "transport": { "type": "string", "enum": ["stdio", "sse", "http"] },
39
- "command": { "type": "string" },
40
- "args": { "type": "array", "items": { "type": "string" } },
41
- "env": { "type": "object", "additionalProperties": { "type": "string" } },
42
- "url": { "type": "string" },
43
- "headers": { "type": "object", "additionalProperties": { "type": "string" } },
44
- "timeout": { "type": "number", "description": "Per-server connect timeout in ms; overrides indexer.connectTimeout" }
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": { "type": "number", "description": "Per-server default connect timeout in ms (default: 60000)" },
53
- "maxRetries": { "type": "number", "minimum": 0, "description": "Retry attempts per server, 0 = no retry (default: 3)" },
54
- "initialRetryDelay": { "type": "number", "description": "Initial backoff delay in ms (default: 2000)" },
55
- "maxRetryDelay": { "type": "number", "description": "Max backoff cap in ms (default: 30000)" },
56
- "maxChunkChars": { "type": "number", "minimum": 0, "description": "Max chars per chunk for long tool descriptions. 0 = disable chunking (default: 500)" },
57
- "overlapChars": { "type": "number", "minimum": 0, "description": "Overlap chars between adjacent chunks (default: 100)" }
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": { "type": "string", "enum": ["openai", "gemini", "voyage", "mistral", "ollama"] },
64
- "model": { "type": "string" },
65
- "baseUrl": { "type": "string" },
66
- "url": { "type": "string", "description": "Deprecated: use baseUrl. Old Ollama URL (gets /v1 appended)." },
67
- "apiKey": { "type": "string" },
68
- "headers": { "type": "object", "additionalProperties": { "type": "string" } }
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": { "path": { "type": "string" } }
186
+ "properties": {
187
+ "path": {
188
+ "type": "string"
189
+ }
190
+ }
74
191
  },
75
192
  "search": {
76
193
  "type": "object",
77
194
  "properties": {
78
- "topK": { "type": "number", "minimum": 1, "maximum": 20 },
79
- "minScore": { "type": "number", "minimum": 0, "maximum": 1 }
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
  }