@onivoro/server-mcp-llm-adapter 24.39.0 → 25.0.2
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/README.md +54 -13
- package/package.json +2 -2
- package/src/lib/mcp-llm-tool-adapter.js +26 -0
- package/src/lib/mcp-llm-tool-adapter.js.map +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ The same principle applies outside Bedrock — pick the config that matches the
|
|
|
48
48
|
|
|
49
49
|
## Usage
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
`McpLlmAdapterModule.forProvider()` (and every `for*()` shortcut) imports `McpRegistryModule.registerOnly()` itself and injects that module's `McpToolRegistry`. Listing `McpRegistryModule.registerOnly()` in your own imports as well, as below, resolves to the same module:
|
|
52
52
|
|
|
53
53
|
```typescript
|
|
54
54
|
import { Module } from '@nestjs/common';
|
|
@@ -64,6 +64,8 @@ import { ChatService } from './services/chat.service';
|
|
|
64
64
|
export class AppModule {}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
If the same app also imports `McpHttpModule` or `McpStdioModule`, those modules have their own `McpToolRegistry` instance. Tools are discovered into both, but an `authStrategy` or interceptors registered on the transport's registry do not apply to calls made through the adapter.
|
|
68
|
+
|
|
67
69
|
Then inject `McpLlmToolAdapter` wherever you need provider-specific functionality:
|
|
68
70
|
|
|
69
71
|
```typescript
|
|
@@ -113,7 +115,7 @@ for (const r of results) {
|
|
|
113
115
|
}
|
|
114
116
|
```
|
|
115
117
|
|
|
116
|
-
Each tool call goes through the full `@onivoro/server-mcp` execution pipeline independently (guards, validation, interceptors, handler) via `registry.executeToolRaw()`. The core MCP library is unchanged — the batch coordination lives entirely in the adapter.
|
|
118
|
+
Each tool call goes through the full `@onivoro/server-mcp` execution pipeline independently (auth strategy, guards, validation, interceptors, handler) via `registry.executeToolRaw()`. Non-string results are `JSON.stringify`-ed. An unknown provider name, a thrown error, a result the tool marked `isError: true`, or a tool asking for user input with `inputRequired(...)` (which needs an MCP client to answer it) becomes `{ success: false, error: message }` for that call only. For an `isError` result, `message` is the result's text content (or `Tool execution failed` when it has none). Error messages are passed on as thrown: unlike an MCP transport, the adapter runs in your process, so it does not hide them. The core MCP library is unchanged — the batch coordination lives entirely in the adapter.
|
|
117
119
|
|
|
118
120
|
## Output schemas
|
|
119
121
|
|
|
@@ -180,18 +182,48 @@ McpLlmAdapterModule.forProvider(MY_CONFIG);
|
|
|
180
182
|
|
|
181
183
|
## McpLlmToolAdapter API
|
|
182
184
|
|
|
183
|
-
| Method
|
|
184
|
-
|
|
|
185
|
-
| `toProviderTools()`
|
|
186
|
-
| `getOutputSchemas()`
|
|
187
|
-
| `resolveProviderToolName(providerName)`
|
|
188
|
-
| `executeToolForProvider(providerName, params, authInfo?)` | Resolves name, executes tool, returns stringified result
|
|
189
|
-
| `executeToolCallForProvider(toolCall, authInfo?)` | Executes a single `ProviderToolCall`, returns `ProviderToolCallResult` with id passthrough
|
|
190
|
-
| `executeToolsForProvider(toolCalls, authInfo?)` | Executes multiple tool calls in parallel. Returns `ProviderToolCallResult[]` with per-call success/error
|
|
185
|
+
| Method | Description |
|
|
186
|
+
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
187
|
+
| `toProviderTools()` | Returns `T[]` — tool definitions in the provider's format |
|
|
188
|
+
| `getOutputSchemas()` | Returns `Map<string, Record<string, unknown>>` — provider tool names to output JSON Schemas (only tools with `outputSchema`) |
|
|
189
|
+
| `resolveProviderToolName(providerName)` | Maps a provider-specific tool name back to the MCP tool name, or `undefined` |
|
|
190
|
+
| `executeToolForProvider(providerName, params, authInfo?, extra?)` | Resolves name, executes tool, returns stringified result. Throws if the name is unknown, the tool throws, or it returns `isError: true` or `inputRequired(...)` |
|
|
191
|
+
| `executeToolCallForProvider(toolCall, authInfo?, extra?)` | Executes a single `ProviderToolCall`, returns `ProviderToolCallResult` with id passthrough (never throws) |
|
|
192
|
+
| `executeToolsForProvider(toolCalls, authInfo?, extra?)` | Executes multiple tool calls in parallel. Returns `ProviderToolCallResult[]` with per-call success/error |
|
|
193
|
+
|
|
194
|
+
The provider-name map is cached and rebuilt when the registry reports a registration change.
|
|
195
|
+
|
|
196
|
+
### Execution context (`extra`)
|
|
197
|
+
|
|
198
|
+
Every execute method takes an optional `McpToolExecutionExtra`, forwarded to the tool as part of its `McpToolContext`:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import type { McpToolExecutionExtra } from '@onivoro/server-mcp-llm-adapter';
|
|
202
|
+
|
|
203
|
+
const controller = new AbortController();
|
|
204
|
+
const extra: McpToolExecutionExtra = {
|
|
205
|
+
sessionId: conversationId,
|
|
206
|
+
signal: controller.signal, // the tool sees context.signal and can stop when the turn is cancelled
|
|
207
|
+
sendProgress: async (progress, total, message) => emitProgress({ progress, total, message }),
|
|
208
|
+
sendLog: async (level, data) => logger.log({ level, data }),
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const results = await this.adapter.executeToolsForProvider(calls, authInfo, extra);
|
|
212
|
+
```
|
|
191
213
|
|
|
192
214
|
## Name handling
|
|
193
215
|
|
|
194
|
-
Each config has an `aliasKey`
|
|
216
|
+
Each config has an `aliasKey` used to look up per-provider name overrides from the `@McpTool` decorator's `aliases` parameter:
|
|
217
|
+
|
|
218
|
+
| Config | `aliasKey` | Sanitizer |
|
|
219
|
+
| ------------------------- | -------------------- | ----------------------------------- |
|
|
220
|
+
| `BEDROCK_CONVERSE_CONFIG` | `'bedrock-converse'` | non `[a-zA-Z0-9_]` characters → `_` |
|
|
221
|
+
| `BEDROCK_MANTLE_CONFIG` | `'bedrock-mantle'` | none |
|
|
222
|
+
| `BEDROCK_OPENAI_CONFIG` | `'bedrock-openai'` | none |
|
|
223
|
+
| `OPENAI_CONFIG` | `'openai'` | none |
|
|
224
|
+
| `CLAUDE_CONFIG` | `'claude'` | none |
|
|
225
|
+
| `GEMINI_CONFIG` | `'gemini'` | non `[a-zA-Z0-9_]` characters → `_` |
|
|
226
|
+
| `MISTRAL_CONFIG` | `'mistral'` | none |
|
|
195
227
|
|
|
196
228
|
Resolution order:
|
|
197
229
|
|
|
@@ -201,13 +233,21 @@ Resolution order:
|
|
|
201
233
|
|
|
202
234
|
```typescript
|
|
203
235
|
// Explicit alias for Bedrock Converse
|
|
204
|
-
@McpTool({ name: 'insert-emojis', description: 'Insert emojis', schema, aliases: { bedrock: 'insertEmojis' } })
|
|
236
|
+
@McpTool({ name: 'insert-emojis', description: 'Insert emojis', schema, aliases: { 'bedrock-converse': 'insertEmojis' } })
|
|
205
237
|
|
|
206
238
|
// No alias needed for OpenAI (hyphens are valid)
|
|
207
239
|
@McpTool({ name: 'insert-emojis', description: 'Insert emojis', schema })
|
|
208
240
|
```
|
|
209
241
|
|
|
210
|
-
Providers that require name sanitization (Bedrock Converse, Gemini) apply it automatically — hyphens
|
|
242
|
+
Providers that require name sanitization (Bedrock Converse, Gemini) apply it automatically — every character outside `[a-zA-Z0-9_]` (hyphens, dots, and so on) becomes an underscore. An alias is used as-is, without sanitizing.
|
|
243
|
+
|
|
244
|
+
`resolveProviderName(metadata, config)` applies this same resolution and is exported for custom code:
|
|
245
|
+
|
|
246
|
+
```typescript
|
|
247
|
+
import { resolveProviderName, GEMINI_CONFIG } from '@onivoro/server-mcp-llm-adapter';
|
|
248
|
+
|
|
249
|
+
resolveProviderName({ name: 'insert-emojis', description: 'Insert emojis' }, GEMINI_CONFIG); // 'insert_emojis'
|
|
250
|
+
```
|
|
211
251
|
|
|
212
252
|
## Exports
|
|
213
253
|
|
|
@@ -219,6 +259,7 @@ McpLlmAdapterModule; // NestJS module — forProvider(), forBedrockConverse(), f
|
|
|
219
259
|
McpLlmToolAdapter; // Injectable — toProviderTools(), getOutputSchemas(), resolveProviderToolName(), executeToolForProvider(), executeToolCallForProvider(), executeToolsForProvider()
|
|
220
260
|
ProviderToolCall; // Input type for single/batch execution — { providerName, params, id? }
|
|
221
261
|
ProviderToolCallResult; // Output type for single/batch execution — { providerName, id?, result?, error?, success }
|
|
262
|
+
McpToolExecutionExtra; // Optional execution context — { sessionId?, signal?, sendProgress?, sendLog? }
|
|
222
263
|
|
|
223
264
|
// Config
|
|
224
265
|
LlmAdapterConfig; // Interface for custom provider configs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onivoro/server-mcp-llm-adapter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.2",
|
|
4
4
|
"description": "LLM provider tool format adapter for MCP — supports OpenAI, Claude, Bedrock, Gemini, and Mistral",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"adapter"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@onivoro/server-mcp": "^
|
|
34
|
+
"@onivoro/server-mcp": "^25.0.2",
|
|
35
35
|
"tslib": "^2.3.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -60,6 +60,9 @@ let McpLlmToolAdapter = class McpLlmToolAdapter {
|
|
|
60
60
|
throw new Error(`No MCP tool found for provider name "${providerName}".`);
|
|
61
61
|
}
|
|
62
62
|
const result = await this.registry.executeToolRaw(mcpName, params, authInfo, extra);
|
|
63
|
+
const errorText = toolErrorText(result);
|
|
64
|
+
if (errorText !== undefined)
|
|
65
|
+
throw new Error(errorText);
|
|
63
66
|
return typeof result === 'string' ? result : JSON.stringify(result);
|
|
64
67
|
}
|
|
65
68
|
async executeToolCallForProvider(toolCall, authInfo, extra) {
|
|
@@ -74,6 +77,9 @@ let McpLlmToolAdapter = class McpLlmToolAdapter {
|
|
|
74
77
|
throw new Error(`No MCP tool found for provider name "${providerName}".`);
|
|
75
78
|
}
|
|
76
79
|
const rawResult = await this.registry.executeToolRaw(mcpName, params, authInfo, extra);
|
|
80
|
+
const errorText = toolErrorText(rawResult);
|
|
81
|
+
if (errorText !== undefined)
|
|
82
|
+
throw new Error(errorText);
|
|
77
83
|
const result = typeof rawResult === 'string' ? rawResult : JSON.stringify(rawResult);
|
|
78
84
|
return {
|
|
79
85
|
providerName,
|
|
@@ -104,4 +110,24 @@ exports.McpLlmToolAdapter = McpLlmToolAdapter = tslib_1.__decorate([
|
|
|
104
110
|
tslib_1.__param(1, (0, common_1.Inject)(llm_adapter_config_token_1.LLM_ADAPTER_CONFIG)),
|
|
105
111
|
tslib_1.__metadata("design:paramtypes", [server_mcp_1.McpToolRegistry, Object])
|
|
106
112
|
], McpLlmToolAdapter);
|
|
113
|
+
function toolErrorText(result) {
|
|
114
|
+
if (!!result &&
|
|
115
|
+
typeof result === 'object' &&
|
|
116
|
+
result.resultType === 'input_required') {
|
|
117
|
+
return 'The tool needs input from the user (inputRequired), which is only available to MCP clients.';
|
|
118
|
+
}
|
|
119
|
+
if (!result ||
|
|
120
|
+
typeof result !== 'object' ||
|
|
121
|
+
result.isError !== true) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
const content = result.content;
|
|
125
|
+
const text = Array.isArray(content)
|
|
126
|
+
? content
|
|
127
|
+
.filter((block) => !!block && block.type === 'text' && typeof block.text === 'string')
|
|
128
|
+
.map((block) => block.text)
|
|
129
|
+
.join('\n')
|
|
130
|
+
: '';
|
|
131
|
+
return text || 'Tool execution failed';
|
|
132
|
+
}
|
|
107
133
|
//# sourceMappingURL=mcp-llm-tool-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-llm-tool-adapter.js","sourceRoot":"","sources":["../../../../../../libs/server/mcp-llm-adapter/src/lib/mcp-llm-tool-adapter.ts"],"names":[],"mappings":";;;;AAAA,2CAAkE;AAClE,oDAI6B;AAC7B,yEAAgE;AAEhE,mEAA8D;AAuBvD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAKT;IAEA;IANX,YAAY,GAA+B,IAAI,CAAC;IAChD,WAAW,CAAc;IAEjC,YACmB,QAAyB,EAEz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S,CAAC,MAAM,CAAC,CAAC;IACtE,CAAC;IAGD,KAAK,CAAC,0BAA0B,CAC9B,QAA0B,EAC1B,QAAsB,EACtB,KAA6B;QAE7B,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,uBAAuB,CACjD,CAAC,QAAQ,CAAC,EACV,QAAQ,EACR,KAAK,CACN,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,SAA6B,EAC7B,QAAsB,EACtB,KAA6B;QAE7B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CACtC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE;YACnD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CACb,wCAAwC,YAAY,IAAI,CACzD,CAAC;YACJ,CAAC;YACD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAClD,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,CACN,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-llm-tool-adapter.js","sourceRoot":"","sources":["../../../../../../libs/server/mcp-llm-adapter/src/lib/mcp-llm-tool-adapter.ts"],"names":[],"mappings":";;;;AAAA,2CAAkE;AAClE,oDAI6B;AAC7B,yEAAgE;AAEhE,mEAA8D;AAuBvD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAKT;IAEA;IANX,YAAY,GAA+B,IAAI,CAAC;IAChD,WAAW,CAAc;IAEjC,YACmB,QAAyB,EAEzB,MAA2B;QAF3B,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,WAAM,GAAN,MAAM,CAAqB;IAC3C,C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