@olane/o-mcp 0.7.2 → 0.7.4
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 +849 -53
- package/dist/src/mcp-bridge.tool.d.ts +2 -2
- package/dist/src/mcp-bridge.tool.d.ts.map +1 -1
- package/dist/src/mcp-bridge.tool.js +1 -1
- package/dist/test/tools.spec.js +2 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,86 +1,882 @@
|
|
|
1
|
-
|
|
1
|
+
# @olane/o-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Bridge Model Context Protocol (MCP) servers into Olane OS tool nodes.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## TL;DR {#tldr}
|
|
6
6
|
|
|
7
|
-
MCP servers
|
|
7
|
+
`o-mcp` connects MCP servers to Olane networks as discoverable tool nodes, enabling agents (human or AI) to use MCP capabilities through natural language intents.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
2. You pay for intelligent models that can reason / do chain of thought processing.
|
|
9
|
+
```typescript
|
|
10
|
+
import { McpBridgeTool } from '@olane/o-mcp';
|
|
11
|
+
import { oAddress } from '@olane/o-core';
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
// Create MCP bridge node
|
|
14
|
+
const mcpBridge = new McpBridgeTool({
|
|
15
|
+
address: new oAddress('o://mcp-bridge')
|
|
16
|
+
});
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
await mcpBridge.start();
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
// Add remote MCP server
|
|
21
|
+
await mcpBridge.use({
|
|
22
|
+
method: 'add_remote_server',
|
|
23
|
+
params: {
|
|
24
|
+
mcpServerUrl: 'https://mcp.example.com',
|
|
25
|
+
name: 'github_mcp',
|
|
26
|
+
description: 'GitHub integration via MCP'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
// Now agents can discover and use GitHub tools
|
|
31
|
+
// The MCP server becomes: o://github_mcp
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## What is o-mcp? {#what-is-o-mcp}
|
|
37
|
+
|
|
38
|
+
**o-mcp** is a bridge package that connects [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers to Olane OS networks. It transforms MCP servers into Olane **tool nodes**, making them discoverable and usable by agents through natural language.
|
|
39
|
+
|
|
40
|
+
### Key Capabilities
|
|
41
|
+
|
|
42
|
+
- **Add MCP Servers**: Connect remote (HTTP) or local (stdio) MCP servers
|
|
43
|
+
- **Automatic Discovery**: MCP tools become searchable in the network registry
|
|
44
|
+
- **Intent Wrapping**: Adds Olane intent metadata to all MCP requests
|
|
45
|
+
- **Agent-Agnostic**: Human and AI agents use the same interface
|
|
46
|
+
- **Search Integration**: Find and validate MCP servers using AI search
|
|
47
|
+
|
|
48
|
+
### Why Use o-mcp?
|
|
49
|
+
|
|
50
|
+
<CardGroup cols={2}>
|
|
51
|
+
<Card title="Unified Interface" icon="plug" color="#0D9373">
|
|
52
|
+
Use MCP servers alongside native Olane tools through the same `o://` addressing
|
|
53
|
+
</Card>
|
|
54
|
+
<Card title="Network Discovery" icon="magnifying-glass" color="#0D9373">
|
|
55
|
+
MCP tools indexed in vector store for semantic search
|
|
56
|
+
</Card>
|
|
57
|
+
<Card title="Intent Preservation" icon="brain" color="#0D9373">
|
|
58
|
+
Maintains execution context across MCP boundaries
|
|
59
|
+
</Card>
|
|
60
|
+
<Card title="Instant Integration" icon="rocket" color="#0D9373">
|
|
61
|
+
Add existing MCP servers without code changes
|
|
62
|
+
</Card>
|
|
63
|
+
</CardGroup>
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Quick Start {#quick-start}
|
|
68
|
+
|
|
69
|
+
### Installation
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install @olane/o-mcp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Basic Usage
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { McpBridgeTool } from '@olane/o-mcp';
|
|
79
|
+
import { oAddress } from '@olane/o-core';
|
|
80
|
+
|
|
81
|
+
// 1. Create MCP bridge
|
|
82
|
+
const bridge = new McpBridgeTool({
|
|
83
|
+
address: new oAddress('o://mcp-bridge')
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
await bridge.start();
|
|
87
|
+
|
|
88
|
+
// 2. Add a remote MCP server
|
|
89
|
+
await bridge.use({
|
|
90
|
+
method: 'add_remote_server',
|
|
91
|
+
params: {
|
|
92
|
+
mcpServerUrl: 'https://api.example.com/mcp',
|
|
93
|
+
name: 'example_mcp',
|
|
94
|
+
description: 'Example MCP server'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// 3. Use the MCP tools
|
|
99
|
+
const result = await bridge.use(new oAddress('o://example_mcp'), {
|
|
100
|
+
method: 'some_mcp_tool',
|
|
101
|
+
params: { input: 'data' }
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## How It Works {#how-it-works}
|
|
108
|
+
|
|
109
|
+
### Architecture
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
┌─────────────────────────────────────────────────────────┐
|
|
113
|
+
│ Agent (Human or AI) │
|
|
114
|
+
│ Sends intent or direct tool call │
|
|
115
|
+
└─────────────────────────────────────────────────────────┘
|
|
116
|
+
⬇
|
|
117
|
+
┌─────────────────────────────────────────────────────────┐
|
|
118
|
+
│ McpBridgeTool (o://mcp-bridge) │
|
|
119
|
+
│ • Discovers MCP servers │
|
|
120
|
+
│ • Adds servers to network │
|
|
121
|
+
│ • Manages MCP connections │
|
|
122
|
+
└─────────────────────────────────────────────────────────┘
|
|
123
|
+
⬇ creates
|
|
124
|
+
┌─────────────────────────────────────────────────────────┐
|
|
125
|
+
│ McpTool (o://server_name) │
|
|
126
|
+
│ • Wraps individual MCP server │
|
|
127
|
+
│ • Exposes MCP tools as Olane tools │
|
|
128
|
+
│ • Adds intent metadata to requests │
|
|
129
|
+
└─────────────────────────────────────────────────────────┘
|
|
130
|
+
⬇ connects to
|
|
131
|
+
┌─────────────────────────────────────────────────────────┐
|
|
132
|
+
│ External MCP Server │
|
|
133
|
+
│ • Standard MCP implementation │
|
|
134
|
+
│ • Unmodified third-party server │
|
|
135
|
+
└─────────────────────────────────────────────────────────┘
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### The Bridge Process
|
|
139
|
+
|
|
140
|
+
1. **Discovery**: Agent searches for or adds MCP server URL
|
|
141
|
+
2. **Connection**: Bridge connects to MCP server (HTTP or stdio)
|
|
142
|
+
3. **Tool Extraction**: Bridge reads MCP server's tool list
|
|
143
|
+
4. **Wrapping**: Each MCP tool becomes an Olane tool method (`_tool_*`)
|
|
144
|
+
5. **Registration**: New tool node registered with network leader
|
|
145
|
+
6. **Indexing**: Tools indexed in vector store for discovery
|
|
146
|
+
7. **Usage**: Agents can now discover and use MCP tools via `o://` addresses
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## API Reference {#api-reference}
|
|
151
|
+
|
|
152
|
+
### McpBridgeTool {#mcpbridgetool}
|
|
153
|
+
|
|
154
|
+
Complex node (uses `o-lane`) that discovers and adds MCP servers to the network.
|
|
155
|
+
|
|
156
|
+
#### Constructor
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
new McpBridgeTool(config: oNodeConfig)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Parameters:**
|
|
163
|
+
- `config` (oNodeConfig): Node configuration
|
|
164
|
+
- `address` (oAddress, optional): Bridge address (default: `o://mcp`)
|
|
165
|
+
- `leader` (oAddress, optional): Leader node address
|
|
166
|
+
- `...rest`: Standard oNodeConfig options
|
|
167
|
+
|
|
168
|
+
**Example:**
|
|
169
|
+
```typescript
|
|
170
|
+
import { McpBridgeTool } from '@olane/o-mcp';
|
|
171
|
+
import { oAddress } from '@olane/o-core';
|
|
172
|
+
|
|
173
|
+
const bridge = new McpBridgeTool({
|
|
174
|
+
address: new oAddress('o://mcp-bridge'),
|
|
175
|
+
leader: new oAddress('o://leader')
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
#### Tool: add_remote_server {#tool-add-remote-server}
|
|
182
|
+
|
|
183
|
+
Add a remote MCP server hosted over HTTP/SSE.
|
|
184
|
+
|
|
185
|
+
**Parameters:**
|
|
186
|
+
- `mcpServerUrl` (string, required): URL of the MCP server
|
|
187
|
+
- `name` (string, required): Name for the tool node (lowercase snake_case)
|
|
188
|
+
- `description` (string, optional): Human-readable description
|
|
189
|
+
- `headers` (object, optional): HTTP headers (e.g., authorization)
|
|
190
|
+
|
|
191
|
+
**Returns:**
|
|
192
|
+
- `message` (string): Success message with tool count
|
|
193
|
+
|
|
194
|
+
**Example:**
|
|
195
|
+
```typescript
|
|
196
|
+
// Add GitHub MCP server with authentication
|
|
197
|
+
await bridge.use({
|
|
198
|
+
method: 'add_remote_server',
|
|
199
|
+
params: {
|
|
200
|
+
mcpServerUrl: 'https://github-mcp.example.com',
|
|
201
|
+
name: 'github',
|
|
202
|
+
description: 'GitHub repository management',
|
|
203
|
+
headers: {
|
|
204
|
+
'Authorization': 'Bearer YOUR_TOKEN'
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// Server now available at o://github
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
#### Tool: add_local_server {#tool-add-local-server}
|
|
215
|
+
|
|
216
|
+
Add a local MCP server that runs as a child process via stdio.
|
|
217
|
+
|
|
218
|
+
**Parameters:**
|
|
219
|
+
- `command` (string, required): Command to execute
|
|
220
|
+
- `args` (string[], required): Command arguments
|
|
221
|
+
- `name` (string, required): Name for the tool node
|
|
222
|
+
|
|
223
|
+
**Returns:**
|
|
224
|
+
- `message` (string): Success message
|
|
225
|
+
- `_save` (boolean): Indicates configuration should be saved
|
|
226
|
+
|
|
227
|
+
**Example:**
|
|
228
|
+
```typescript
|
|
229
|
+
// Add local MCP server (e.g., filesystem MCP)
|
|
230
|
+
await bridge.use({
|
|
231
|
+
method: 'add_local_server',
|
|
232
|
+
params: {
|
|
233
|
+
command: 'npx',
|
|
234
|
+
args: ['-y', '@modelcontextprotocol/server-filesystem', '/path/to/files'],
|
|
235
|
+
name: 'filesystem'
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// Server now available at o://filesystem
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
#### Tool: search {#tool-search}
|
|
245
|
+
|
|
246
|
+
Search for MCP servers using AI-powered search.
|
|
247
|
+
|
|
248
|
+
**Parameters:**
|
|
249
|
+
- `name` (string, optional): MCP server name
|
|
250
|
+
- `provider` (string, optional): Provider/creator name
|
|
251
|
+
- `functionality` (string, optional): Description of functionality
|
|
252
|
+
|
|
253
|
+
**Returns:**
|
|
254
|
+
- `result` (string): Search results with connection information
|
|
255
|
+
|
|
256
|
+
**Example:**
|
|
257
|
+
```typescript
|
|
258
|
+
// Search for Slack MCP server
|
|
259
|
+
const result = await bridge.use({
|
|
260
|
+
method: 'search',
|
|
261
|
+
params: {
|
|
262
|
+
provider: 'Slack',
|
|
263
|
+
functionality: 'Send messages and manage channels'
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
console.log(result.result);
|
|
268
|
+
// Returns instructions on how to connect to Slack MCP
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
#### Tool: validate_url {#tool-validate-url}
|
|
274
|
+
|
|
275
|
+
Validate whether a URL points to a valid MCP server.
|
|
276
|
+
|
|
277
|
+
**Parameters:**
|
|
278
|
+
- `mcpServerUrl` (string, required): URL to validate
|
|
279
|
+
|
|
280
|
+
**Returns:**
|
|
281
|
+
- `result` (string): Validation result and description
|
|
282
|
+
|
|
283
|
+
**Example:**
|
|
284
|
+
```typescript
|
|
285
|
+
const validation = await bridge.use({
|
|
286
|
+
method: 'validate_url',
|
|
287
|
+
params: {
|
|
288
|
+
mcpServerUrl: 'https://example.com/mcp'
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
console.log(validation.result);
|
|
293
|
+
// "Yes, this is a valid MCP server providing..."
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### McpTool {#mcptool}
|
|
299
|
+
|
|
300
|
+
Wraps an individual MCP server as an Olane tool node.
|
|
301
|
+
|
|
302
|
+
**Note**: You typically don't instantiate this directly - `McpBridgeTool` creates it for you.
|
|
303
|
+
|
|
304
|
+
#### Constructor
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
new McpTool(config: oNodeToolConfig & {
|
|
308
|
+
address: oAddress;
|
|
309
|
+
mcpClient: Client
|
|
310
|
+
})
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**Parameters:**
|
|
314
|
+
- `config.address` (oAddress, required): Node address
|
|
315
|
+
- `config.mcpClient` (Client, required): Connected MCP client
|
|
316
|
+
- `config.name` (string, optional): Display name
|
|
317
|
+
- `config.description` (string, optional): Description
|
|
318
|
+
- `config.leader` (oAddress, optional): Leader node
|
|
319
|
+
- `config.parent` (oAddress, optional): Parent node address
|
|
320
|
+
|
|
321
|
+
#### Dynamic Tools
|
|
322
|
+
|
|
323
|
+
`McpTool` automatically creates `_tool_*` methods for each tool exposed by the MCP server.
|
|
324
|
+
|
|
325
|
+
**Example:**
|
|
326
|
+
```typescript
|
|
327
|
+
// If MCP server has tools: 'create_issue', 'list_repos'
|
|
328
|
+
// McpTool will expose:
|
|
329
|
+
// - _tool_create_issue(request)
|
|
330
|
+
// - _tool_list_repos(request)
|
|
331
|
+
|
|
332
|
+
// Use via standard Olane interface
|
|
333
|
+
const issues = await mcpTool.use({
|
|
334
|
+
method: 'list_repos',
|
|
335
|
+
params: { owner: 'olane-labs' }
|
|
336
|
+
});
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
### oClient & oServer {#oclient-oserver}
|
|
342
|
+
|
|
343
|
+
Extended MCP client and server implementations that add **intent wrapping**.
|
|
344
|
+
|
|
345
|
+
#### oClient
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
import { oClient } from '@olane/o-mcp';
|
|
349
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
350
|
+
|
|
351
|
+
const client = new oClient(
|
|
352
|
+
{ name: 'my-client', version: '1.0.0' },
|
|
353
|
+
{ intent: 'Analyze user behavior patterns' }
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
const transport = new StreamableHTTPClientTransport(
|
|
357
|
+
new URL('https://mcp.example.com')
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
await client.connect(transport);
|
|
361
|
+
|
|
362
|
+
// All requests will include:
|
|
363
|
+
// { params: { _meta: { intent: 'Analyze user behavior patterns' } } }
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Intent Options:**
|
|
367
|
+
- **Static**: `intent: 'Fixed intent string'`
|
|
368
|
+
- **Dynamic**: `intent: () => getCurrentIntent()`
|
|
369
|
+
|
|
370
|
+
#### oServer
|
|
371
|
+
|
|
372
|
+
```typescript
|
|
373
|
+
import { oServer } from '@olane/o-mcp';
|
|
374
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
375
|
+
|
|
376
|
+
const server = new oServer(
|
|
377
|
+
{ name: 'my-server', version: '1.0.0' },
|
|
378
|
+
{ requireIntent: true } // Reject requests without intent
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
const transport = new StdioServerTransport();
|
|
382
|
+
await server.connect(transport);
|
|
383
|
+
|
|
384
|
+
// Server will enforce intent presence on all requests
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
---
|
|
21
388
|
|
|
22
|
-
##
|
|
389
|
+
## Common Use Cases {#common-use-cases}
|
|
23
390
|
|
|
24
|
-
|
|
391
|
+
### Use Case 1: Add GitHub MCP Server {#use-case-github}
|
|
25
392
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
4. How can we improve the speed of MCP usage?
|
|
393
|
+
```typescript
|
|
394
|
+
import { McpBridgeTool } from '@olane/o-mcp';
|
|
395
|
+
import { oAddress } from '@olane/o-core';
|
|
30
396
|
|
|
31
|
-
|
|
397
|
+
const bridge = new McpBridgeTool({
|
|
398
|
+
address: new oAddress('o://mcp')
|
|
399
|
+
});
|
|
32
400
|
|
|
33
|
-
|
|
34
|
-
>
|
|
401
|
+
await bridge.start();
|
|
35
402
|
|
|
36
|
-
|
|
37
|
-
|
|
403
|
+
// Add GitHub MCP with authentication
|
|
404
|
+
await bridge.use({
|
|
405
|
+
method: 'add_remote_server',
|
|
406
|
+
params: {
|
|
407
|
+
mcpServerUrl: 'https://github-mcp.example.com/mcp',
|
|
408
|
+
name: 'github',
|
|
409
|
+
description: 'GitHub repository and issue management',
|
|
410
|
+
headers: {
|
|
411
|
+
'Authorization': `Bearer ${process.env.GITHUB_TOKEN}`
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
});
|
|
38
415
|
|
|
39
|
-
|
|
416
|
+
// Now use GitHub tools
|
|
417
|
+
const repos = await bridge.use(new oAddress('o://github'), {
|
|
418
|
+
method: 'list_repositories',
|
|
419
|
+
params: { organization: 'olane-labs' }
|
|
420
|
+
});
|
|
40
421
|
|
|
41
|
-
|
|
422
|
+
console.log(repos);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
### Use Case 2: Local Filesystem MCP {#use-case-filesystem}
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
// Add filesystem MCP server as local child process
|
|
431
|
+
await bridge.use({
|
|
432
|
+
method: 'add_local_server',
|
|
433
|
+
params: {
|
|
434
|
+
command: 'npx',
|
|
435
|
+
args: [
|
|
436
|
+
'-y',
|
|
437
|
+
'@modelcontextprotocol/server-filesystem',
|
|
438
|
+
'/Users/you/Documents'
|
|
439
|
+
],
|
|
440
|
+
name: 'documents'
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
// Use filesystem tools
|
|
445
|
+
const files = await bridge.use(new oAddress('o://documents'), {
|
|
446
|
+
method: 'list_directory',
|
|
447
|
+
params: { path: '/Users/you/Documents/projects' }
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
const content = await bridge.use(new oAddress('o://documents'), {
|
|
451
|
+
method: 'read_file',
|
|
452
|
+
params: { path: '/Users/you/Documents/notes.txt' }
|
|
453
|
+
});
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
### Use Case 3: Intent-Driven MCP Discovery {#use-case-intent-driven}
|
|
459
|
+
|
|
460
|
+
```typescript
|
|
461
|
+
import { oLaneTool } from '@olane/o-lane';
|
|
462
|
+
import { oAddress } from '@olane/o-core';
|
|
463
|
+
|
|
464
|
+
// Agent sends high-level intent to bridge
|
|
465
|
+
const result = await bridge.use({
|
|
466
|
+
method: 'intent',
|
|
467
|
+
params: {
|
|
468
|
+
intent: 'I need to analyze my GitHub repositories. Find and add the GitHub MCP server.'
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
// Bridge will:
|
|
473
|
+
// 1. Search for GitHub MCP using the search tool
|
|
474
|
+
// 2. Validate the URL
|
|
475
|
+
// 3. Add the MCP server to the network
|
|
476
|
+
// 4. Return confirmation
|
|
477
|
+
|
|
478
|
+
// Then agent can use GitHub tools
|
|
479
|
+
const analysis = await bridge.use(new oAddress('o://github'), {
|
|
480
|
+
method: 'analyze_repository',
|
|
481
|
+
params: { repo: 'olane-labs/olane' }
|
|
482
|
+
});
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
### Use Case 4: Custom Intent Wrapping {#use-case-custom-intent}
|
|
488
|
+
|
|
489
|
+
```typescript
|
|
490
|
+
import { oClient } from '@olane/o-mcp';
|
|
491
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
492
|
+
|
|
493
|
+
// Dynamic intent based on current execution context
|
|
494
|
+
let currentTask = 'Onboarding new user';
|
|
495
|
+
|
|
496
|
+
const client = new oClient(
|
|
497
|
+
{ name: 'custom-client', version: '1.0.0' },
|
|
498
|
+
{
|
|
499
|
+
// Intent function called for each request
|
|
500
|
+
intent: () => `Current task: ${currentTask}`
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
|
|
504
|
+
const transport = new StreamableHTTPClientTransport(
|
|
505
|
+
new URL('https://mcp.example.com')
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
await client.connect(transport);
|
|
509
|
+
|
|
510
|
+
// Call MCP tools with dynamic intent
|
|
511
|
+
await client.callTool({
|
|
512
|
+
name: 'create_user_profile',
|
|
513
|
+
arguments: { name: 'John Doe' }
|
|
514
|
+
});
|
|
515
|
+
// Request includes: _meta.intent = "Current task: Onboarding new user"
|
|
516
|
+
|
|
517
|
+
// Change intent for subsequent requests
|
|
518
|
+
currentTask = 'User profile management';
|
|
519
|
+
|
|
520
|
+
await client.callTool({
|
|
521
|
+
name: 'update_user_settings',
|
|
522
|
+
arguments: { userId: '123', theme: 'dark' }
|
|
523
|
+
});
|
|
524
|
+
// Request includes: _meta.intent = "Current task: User profile management"
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Troubleshooting {#troubleshooting}
|
|
530
|
+
|
|
531
|
+
### Error: "MCP server already added"
|
|
532
|
+
|
|
533
|
+
**Problem**: Attempting to add the same MCP server URL twice.
|
|
534
|
+
|
|
535
|
+
**Solution**: Each MCP server URL can only be added once per bridge instance. Use a different name or restart the bridge.
|
|
536
|
+
|
|
537
|
+
```typescript
|
|
538
|
+
// Check if server was already added
|
|
539
|
+
const children = bridge.hierarchyManager.getChildren();
|
|
540
|
+
const isAdded = children.some(c => c.toString() === 'o://github');
|
|
541
|
+
|
|
542
|
+
if (!isAdded) {
|
|
543
|
+
await bridge.use({
|
|
544
|
+
method: 'add_remote_server',
|
|
545
|
+
params: { mcpServerUrl: '...', name: 'github' }
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
### Error: "Missing required _meta.intent"
|
|
553
|
+
|
|
554
|
+
**Problem**: MCP server configured with `requireIntent: true` but client not sending intent.
|
|
555
|
+
|
|
556
|
+
**Solution**: Use `oClient` instead of standard MCP `Client`:
|
|
557
|
+
|
|
558
|
+
```typescript
|
|
559
|
+
// ❌ Wrong - no intent
|
|
560
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
561
|
+
const client = new Client({ name: 'my-client', version: '1.0.0' });
|
|
562
|
+
|
|
563
|
+
// ✅ Correct - includes intent
|
|
564
|
+
import { oClient } from '@olane/o-mcp';
|
|
565
|
+
const client = new oClient(
|
|
566
|
+
{ name: 'my-client', version: '1.0.0' },
|
|
567
|
+
{ intent: 'My current task' }
|
|
568
|
+
);
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### Error: Connection timeout to MCP server
|
|
574
|
+
|
|
575
|
+
**Problem**: Cannot connect to remote MCP server URL.
|
|
576
|
+
|
|
577
|
+
**Solution**:
|
|
578
|
+
1. Verify URL is correct and server is running
|
|
579
|
+
2. Check network connectivity
|
|
580
|
+
3. Validate authentication headers if required
|
|
581
|
+
|
|
582
|
+
```typescript
|
|
583
|
+
// Use validate_url to test connection first
|
|
584
|
+
const validation = await bridge.use({
|
|
585
|
+
method: 'validate_url',
|
|
586
|
+
params: { mcpServerUrl: 'https://mcp.example.com' }
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
console.log(validation.result);
|
|
590
|
+
// If validation fails, check URL and network
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
### MCP tools not appearing in network
|
|
596
|
+
|
|
597
|
+
**Problem**: Added MCP server but tools not discoverable.
|
|
598
|
+
|
|
599
|
+
**Solution**: Ensure indexing completed:
|
|
42
600
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
601
|
+
```typescript
|
|
602
|
+
// After adding MCP server, trigger indexing
|
|
603
|
+
await bridge.use(new oAddress('o://mcp_server_name'), {
|
|
604
|
+
method: 'index_network',
|
|
605
|
+
params: {}
|
|
606
|
+
});
|
|
47
607
|
|
|
48
|
-
|
|
608
|
+
// Verify tools are indexed
|
|
609
|
+
const whoami = await bridge.use(new oAddress('o://mcp_server_name'), {
|
|
610
|
+
method: 'whoami',
|
|
611
|
+
params: {}
|
|
612
|
+
});
|
|
49
613
|
|
|
50
|
-
|
|
614
|
+
console.log(whoami.tools); // Should list all MCP tools
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## Package Combinations {#package-combinations}
|
|
620
|
+
|
|
621
|
+
`o-mcp` is typically used with:
|
|
51
622
|
|
|
52
|
-
|
|
623
|
+
| Package | Purpose | When to Include |
|
|
624
|
+
|---------|---------|-----------------|
|
|
625
|
+
| **@olane/o-core** | Addressing and routing | Always (peer dependency) |
|
|
626
|
+
| **@olane/o-node** | P2P networking | Always (peer dependency) |
|
|
627
|
+
| **@olane/o-tool** | Tool system | Always (peer dependency) |
|
|
628
|
+
| **@olane/o-lane** | Intent-driven execution | Always (used by McpBridgeTool) |
|
|
629
|
+
| **@olane/o-leader** | Network coordination | For production networks |
|
|
630
|
+
| **@olane/o-intelligence** | AI agents for intent processing | For autonomous MCP usage |
|
|
631
|
+
| **@modelcontextprotocol/sdk** | MCP protocol implementation | Always (peer dependency) |
|
|
632
|
+
|
|
633
|
+
### Minimal Setup
|
|
634
|
+
|
|
635
|
+
```json
|
|
636
|
+
{
|
|
637
|
+
"dependencies": {
|
|
638
|
+
"@olane/o-mcp": "^0.7.2",
|
|
639
|
+
"@olane/o-core": "^0.7.2",
|
|
640
|
+
"@olane/o-node": "^0.7.2",
|
|
641
|
+
"@olane/o-tool": "^0.7.2",
|
|
642
|
+
"@olane/o-lane": "^0.7.2",
|
|
643
|
+
"@modelcontextprotocol/sdk": "^1.18.1"
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
```
|
|
53
647
|
|
|
54
|
-
|
|
648
|
+
---
|
|
55
649
|
|
|
56
|
-
|
|
57
|
-
💡
|
|
650
|
+
## Architecture Notes {#architecture-notes}
|
|
58
651
|
|
|
59
|
-
|
|
652
|
+
### Node Type
|
|
60
653
|
|
|
61
|
-
|
|
654
|
+
`McpBridgeTool` is a **complex node** - it uses `o-lane` capability loops to handle high-level intents autonomously.
|
|
62
655
|
|
|
63
|
-
**
|
|
656
|
+
**What this means:**
|
|
657
|
+
- Accepts natural language intents (e.g., "Add GitHub MCP server")
|
|
658
|
+
- Autonomously decides which tools to use (search, validate, add)
|
|
659
|
+
- Coordinates multi-step operations
|
|
660
|
+
- Ideal for agents that don't know exact MCP server details
|
|
64
661
|
|
|
662
|
+
**Alternative**: For direct control, call specific tools (`add_remote_server`, etc.) instead of using intents.
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
### Tool Node Hierarchy
|
|
667
|
+
|
|
668
|
+
When you add an MCP server, it becomes a **child node** of the bridge:
|
|
669
|
+
|
|
670
|
+
```
|
|
671
|
+
o://mcp-bridge (McpBridgeTool)
|
|
672
|
+
├── o://github (McpTool wrapping GitHub MCP)
|
|
673
|
+
├── o://slack (McpTool wrapping Slack MCP)
|
|
674
|
+
└── o://filesystem (McpTool wrapping Filesystem MCP)
|
|
65
675
|
```
|
|
66
|
-
“Get my latest pull requests”
|
|
67
|
-
Results in the following steps:
|
|
68
676
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
677
|
+
Each child node (`McpTool`) is a complete Olane tool node with:
|
|
678
|
+
- Its own `o://` address
|
|
679
|
+
- Discoverable tools in the network
|
|
680
|
+
- Standard Olane tool interface
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
### Intent Metadata Flow
|
|
685
|
+
|
|
686
|
+
The intent wrapping system preserves execution context across MCP boundaries:
|
|
687
|
+
|
|
688
|
+
```
|
|
689
|
+
┌─────────────────────────────────────────────────┐
|
|
690
|
+
│ Agent Intent: "Analyze Q4 sales using GitHub" │
|
|
691
|
+
└─────────────────────────────────────────────────┘
|
|
692
|
+
⬇
|
|
693
|
+
┌─────────────────────────────────────────────────┐
|
|
694
|
+
│ oLane: Execute with context │
|
|
695
|
+
│ _meta.intent = "Analyze Q4 sales using GitHub" │
|
|
696
|
+
└─────────────────────────────────────────────────┘
|
|
697
|
+
⬇
|
|
698
|
+
┌─────────────────────────────────────────────────┐
|
|
699
|
+
│ McpTool: Call MCP server │
|
|
700
|
+
│ Adds intent to MCP request parameters │
|
|
701
|
+
└─────────────────────────────────────────────────┘
|
|
702
|
+
⬇
|
|
703
|
+
┌─────────────────────────────────────────────────┐
|
|
704
|
+
│ MCP Server: Receives request │
|
|
705
|
+
│ params._meta.intent = "Analyze Q4..." │
|
|
706
|
+
│ Can use intent for logging, routing, etc. │
|
|
707
|
+
└─────────────────────────────────────────────────┘
|
|
73
708
|
```
|
|
74
709
|
|
|
75
|
-
|
|
710
|
+
This enables:
|
|
711
|
+
- **Audit trails**: Track why tools were called
|
|
712
|
+
- **Context-aware responses**: MCP servers can adapt to intent
|
|
713
|
+
- **Error debugging**: Understand execution context when failures occur
|
|
714
|
+
|
|
715
|
+
---
|
|
716
|
+
|
|
717
|
+
## Real-World Examples {#real-world-examples}
|
|
718
|
+
|
|
719
|
+
### Example 1: Multi-MCP Research Assistant
|
|
720
|
+
|
|
721
|
+
```typescript
|
|
722
|
+
import { McpBridgeTool } from '@olane/o-mcp';
|
|
723
|
+
import { oAddress } from '@olane/o-core';
|
|
724
|
+
|
|
725
|
+
// Setup bridge
|
|
726
|
+
const bridge = new McpBridgeTool({
|
|
727
|
+
address: new oAddress('o://research-mcp')
|
|
728
|
+
});
|
|
729
|
+
|
|
730
|
+
await bridge.start();
|
|
731
|
+
|
|
732
|
+
// Add multiple research-related MCPs
|
|
733
|
+
await bridge.use({
|
|
734
|
+
method: 'add_remote_server',
|
|
735
|
+
params: {
|
|
736
|
+
mcpServerUrl: 'https://arxiv-mcp.example.com',
|
|
737
|
+
name: 'arxiv',
|
|
738
|
+
description: 'Academic paper search and retrieval'
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
await bridge.use({
|
|
743
|
+
method: 'add_remote_server',
|
|
744
|
+
params: {
|
|
745
|
+
mcpServerUrl: 'https://wikipedia-mcp.example.com',
|
|
746
|
+
name: 'wikipedia',
|
|
747
|
+
description: 'Wikipedia article search and summaries'
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
await bridge.use({
|
|
752
|
+
method: 'add_local_server',
|
|
753
|
+
params: {
|
|
754
|
+
command: 'npx',
|
|
755
|
+
args: ['-y', '@modelcontextprotocol/server-filesystem', '/papers'],
|
|
756
|
+
name: 'research_files'
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
|
|
760
|
+
// Agent can now coordinate research across all sources
|
|
761
|
+
const result = await bridge.use({
|
|
762
|
+
method: 'intent',
|
|
763
|
+
params: {
|
|
764
|
+
intent: 'Research quantum computing papers from 2024, summarize key findings, and save to research_files'
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// Bridge autonomously:
|
|
769
|
+
// 1. Searches arxiv for quantum computing papers
|
|
770
|
+
// 2. Gets Wikipedia context on quantum computing
|
|
771
|
+
// 3. Synthesizes findings
|
|
772
|
+
// 4. Saves summary using filesystem MCP
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
### Example 2: Development Workflow Automation
|
|
778
|
+
|
|
779
|
+
```typescript
|
|
780
|
+
// Add development-related MCPs
|
|
781
|
+
const devBridge = new McpBridgeTool({
|
|
782
|
+
address: new oAddress('o://dev-tools')
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
await devBridge.start();
|
|
786
|
+
|
|
787
|
+
// GitHub for repository management
|
|
788
|
+
await devBridge.use({
|
|
789
|
+
method: 'add_remote_server',
|
|
790
|
+
params: {
|
|
791
|
+
mcpServerUrl: 'https://github-mcp.example.com',
|
|
792
|
+
name: 'github',
|
|
793
|
+
headers: { 'Authorization': `Bearer ${GITHUB_TOKEN}` }
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
// Slack for notifications
|
|
798
|
+
await devBridge.use({
|
|
799
|
+
method: 'add_remote_server',
|
|
800
|
+
params: {
|
|
801
|
+
mcpServerUrl: 'https://slack-mcp.example.com',
|
|
802
|
+
name: 'slack',
|
|
803
|
+
headers: { 'Authorization': `Bearer ${SLACK_TOKEN}` }
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
// Local filesystem for logs
|
|
808
|
+
await devBridge.use({
|
|
809
|
+
method: 'add_local_server',
|
|
810
|
+
params: {
|
|
811
|
+
command: 'npx',
|
|
812
|
+
args: ['-y', '@modelcontextprotocol/server-filesystem', '/var/logs'],
|
|
813
|
+
name: 'logs'
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
// Automated workflow
|
|
818
|
+
const workflow = await devBridge.use({
|
|
819
|
+
method: 'intent',
|
|
820
|
+
params: {
|
|
821
|
+
intent: 'Check for failed CI builds in our GitHub org, read error logs, and send summary to #dev-alerts Slack channel'
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
// Bridge coordinates across all MCPs to complete the workflow
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
---
|
|
829
|
+
|
|
830
|
+
## Related Resources {#related-resources}
|
|
831
|
+
|
|
832
|
+
### Olane Packages
|
|
833
|
+
- **[@olane/o-core](/packages/o-core)** - Core abstractions and addressing
|
|
834
|
+
- **[@olane/o-node](/packages/o-node)** - P2P networking implementation
|
|
835
|
+
- **[@olane/o-tool](/packages/o-tool)** - Tool system and conventions
|
|
836
|
+
- **[@olane/o-lane](/packages/o-lane)** - Intent-driven execution loops
|
|
837
|
+
- **[@olane/o-leader](/packages/o-leader)** - Network coordination
|
|
838
|
+
|
|
839
|
+
### Concepts
|
|
840
|
+
- **[Tools, Nodes, Applications](/concepts/tools-nodes-applications)** - Architectural levels
|
|
841
|
+
- **[Simple vs Complex Nodes](/concepts/tool-nodes/overview)** - Node types explained
|
|
842
|
+
- **[Building Tool Nodes](/guides/building-tool-nodes)** - Create custom nodes
|
|
843
|
+
|
|
844
|
+
### External Resources
|
|
845
|
+
- **[Model Context Protocol](https://modelcontextprotocol.io)** - MCP specification
|
|
846
|
+
- **[MCP SDK Documentation](https://github.com/modelcontextprotocol/sdk)** - Official SDK
|
|
847
|
+
- **[MCP Server Examples](https://github.com/modelcontextprotocol/servers)** - Reference implementations
|
|
848
|
+
|
|
849
|
+
---
|
|
850
|
+
|
|
851
|
+
## Next Steps {#next-steps}
|
|
852
|
+
|
|
853
|
+
<CardGroup cols={2}>
|
|
854
|
+
<Card title="Build Your First Node" icon="hammer" href="/guides/quickstart">
|
|
855
|
+
Learn Olane fundamentals
|
|
856
|
+
</Card>
|
|
857
|
+
<Card title="Explore MCP Servers" icon="server" href="https://github.com/modelcontextprotocol/servers">
|
|
858
|
+
Find existing MCP servers
|
|
859
|
+
</Card>
|
|
860
|
+
<Card title="Package Combinations" icon="box" href="/packages/package-combinations">
|
|
861
|
+
Choose the right packages
|
|
862
|
+
</Card>
|
|
863
|
+
<Card title="o-lane Documentation" icon="brain" href="/packages/o-lane">
|
|
864
|
+
Learn intent-driven execution
|
|
865
|
+
</Card>
|
|
866
|
+
</CardGroup>
|
|
867
|
+
|
|
868
|
+
---
|
|
869
|
+
|
|
870
|
+
## License {#license}
|
|
871
|
+
|
|
872
|
+
ISC © oLane Inc.
|
|
873
|
+
|
|
874
|
+
## Contributing {#contributing}
|
|
76
875
|
|
|
77
|
-
|
|
78
|
-
2. Reduce token usage → avoid sending irrelevant context when possible / refine tool offerings & also reduce model size requirements
|
|
79
|
-
3. More deterministic → by learning from past failures & successes, we know how to stay within the bounds of success with clear guardrails
|
|
80
|
-
4. Speed improvement → less tokens to process = more speed
|
|
876
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for contribution guidelines.
|
|
81
877
|
|
|
82
|
-
|
|
878
|
+
## Support {#support}
|
|
83
879
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
880
|
+
- **Issues**: [GitHub Issues](https://github.com/olane-labs/olane/issues)
|
|
881
|
+
- **Discussions**: [GitHub Discussions](https://github.com/olane-labs/olane/discussions)
|
|
882
|
+
- **Discord**: [Join our community](https://discord.gg/olane)
|
|
@@ -3,10 +3,10 @@ import { oRequest } from '@olane/o-core';
|
|
|
3
3
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
4
4
|
import { McpTool } from './mcp.tool.js';
|
|
5
5
|
import { oLaneTool } from '@olane/o-lane';
|
|
6
|
-
import {
|
|
6
|
+
import { oNodeConfig } from '@olane/o-node';
|
|
7
7
|
export declare class McpBridgeTool extends oLaneTool {
|
|
8
8
|
private addedRemoteServers;
|
|
9
|
-
constructor(config:
|
|
9
|
+
constructor(config: oNodeConfig);
|
|
10
10
|
_tool_validate_url(request: oRequest): Promise<ToolResult>;
|
|
11
11
|
_tool_add_remote_server(request: oRequest): Promise<ToolResult>;
|
|
12
12
|
_tool_add_local_server(request: oRequest): Promise<ToolResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-bridge.tool.d.ts","sourceRoot":"","sources":["../../src/mcp-bridge.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp-bridge.tool.d.ts","sourceRoot":"","sources":["../../src/mcp-bridge.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAE7D,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,CAAC,kBAAkB,CAA0B;gBAExC,MAAM,EAAE,WAAW;IAUzB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAsB1D,uBAAuB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAgD/D,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA+B9D,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwBpD,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC;CAuBpB"}
|
|
@@ -9,7 +9,7 @@ export class McpBridgeTool extends oLaneTool {
|
|
|
9
9
|
constructor(config) {
|
|
10
10
|
super({
|
|
11
11
|
...config,
|
|
12
|
-
address: new oAddress('o://mcp'),
|
|
12
|
+
address: config.address || new oAddress('o://mcp'),
|
|
13
13
|
description: 'Model context protocol (MCP) tool for adding MCP servers to the network',
|
|
14
14
|
methods: MCP_BRIDGE_METHODS,
|
|
15
15
|
});
|
package/dist/test/tools.spec.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import { McpBridgeTool } from '../src/index.js';
|
|
3
|
+
import { oAddress } from '@olane/o-core';
|
|
3
4
|
const mcpTool = new McpBridgeTool({
|
|
4
5
|
parent: null,
|
|
5
6
|
leader: null,
|
|
7
|
+
address: new oAddress('o://mcp'),
|
|
6
8
|
});
|
|
7
9
|
describe('o-mcp verify myTools works', () => {
|
|
8
10
|
it('should be able to stop a node', async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"url": "git+https://github.com/olane-labs/olane.git"
|
|
34
34
|
},
|
|
35
35
|
"author": "oLane Inc.",
|
|
36
|
-
"license": "
|
|
36
|
+
"license": "(MIT OR Apache-2.0)",
|
|
37
37
|
"description": "oLane Core",
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.18.1",
|
|
40
|
-
"@olane/o-config": "^0.7.
|
|
41
|
-
"@olane/o-core": "^0.7.
|
|
42
|
-
"@olane/o-intelligence": "^0.7.
|
|
43
|
-
"@olane/o-lane": "^0.7.
|
|
44
|
-
"@olane/o-leader": "^0.7.
|
|
45
|
-
"@olane/o-node": "^0.7.
|
|
46
|
-
"@olane/o-protocol": "^0.7.
|
|
47
|
-
"@olane/o-storage": "^0.7.
|
|
48
|
-
"@olane/o-tool": "^0.7.
|
|
40
|
+
"@olane/o-config": "^0.7.3",
|
|
41
|
+
"@olane/o-core": "^0.7.3",
|
|
42
|
+
"@olane/o-intelligence": "^0.7.3",
|
|
43
|
+
"@olane/o-lane": "^0.7.3",
|
|
44
|
+
"@olane/o-leader": "^0.7.3",
|
|
45
|
+
"@olane/o-node": "^0.7.3",
|
|
46
|
+
"@olane/o-protocol": "^0.7.3",
|
|
47
|
+
"@olane/o-storage": "^0.7.3",
|
|
48
|
+
"@olane/o-tool": "^0.7.3"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"debug": "^4.4.1",
|