@olane/o-mcp 0.8.2 → 0.8.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 +94 -43
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -47,20 +47,10 @@ await mcpBridge.use({
|
|
|
47
47
|
|
|
48
48
|
### Why Use o-mcp?
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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>
|
|
50
|
+
- **Unified Interface**: Use MCP servers alongside native Olane tools through the same `o://` addressing
|
|
51
|
+
- **Network Discovery**: MCP tools indexed in vector store for semantic search
|
|
52
|
+
- **Intent Preservation**: Maintains execution context across MCP boundaries
|
|
53
|
+
- **Instant Integration**: Add existing MCP servers without code changes
|
|
64
54
|
|
|
65
55
|
---
|
|
66
56
|
|
|
@@ -69,7 +59,7 @@ await mcpBridge.use({
|
|
|
69
59
|
### Installation
|
|
70
60
|
|
|
71
61
|
```bash
|
|
72
|
-
|
|
62
|
+
pnpm install @olane/o-mcp
|
|
73
63
|
```
|
|
74
64
|
|
|
75
65
|
### Basic Usage
|
|
@@ -245,6 +235,8 @@ await bridge.use({
|
|
|
245
235
|
|
|
246
236
|
Search for MCP servers using AI-powered search.
|
|
247
237
|
|
|
238
|
+
> **Dependency**: This tool requires `o://perplexity` to be available in the network. Ensure a Perplexity tool node is registered before using search.
|
|
239
|
+
|
|
248
240
|
**Parameters:**
|
|
249
241
|
- `name` (string, optional): MCP server name
|
|
250
242
|
- `provider` (string, optional): Provider/creator name
|
|
@@ -256,7 +248,7 @@ Search for MCP servers using AI-powered search.
|
|
|
256
248
|
**Example:**
|
|
257
249
|
```typescript
|
|
258
250
|
// Search for Slack MCP server
|
|
259
|
-
const
|
|
251
|
+
const response = await bridge.use({
|
|
260
252
|
method: 'search',
|
|
261
253
|
params: {
|
|
262
254
|
provider: 'Slack',
|
|
@@ -264,8 +256,10 @@ const result = await bridge.use({
|
|
|
264
256
|
}
|
|
265
257
|
});
|
|
266
258
|
|
|
267
|
-
|
|
268
|
-
|
|
259
|
+
if (response.result.success) {
|
|
260
|
+
console.log(response.result.data);
|
|
261
|
+
// Returns instructions on how to connect to Slack MCP
|
|
262
|
+
}
|
|
269
263
|
```
|
|
270
264
|
|
|
271
265
|
---
|
|
@@ -274,6 +268,8 @@ console.log(result.result);
|
|
|
274
268
|
|
|
275
269
|
Validate whether a URL points to a valid MCP server.
|
|
276
270
|
|
|
271
|
+
> **Dependency**: This tool requires `o://perplexity` to be available in the network. Ensure a Perplexity tool node is registered before using validate_url.
|
|
272
|
+
|
|
277
273
|
**Parameters:**
|
|
278
274
|
- `mcpServerUrl` (string, required): URL to validate
|
|
279
275
|
|
|
@@ -282,15 +278,17 @@ Validate whether a URL points to a valid MCP server.
|
|
|
282
278
|
|
|
283
279
|
**Example:**
|
|
284
280
|
```typescript
|
|
285
|
-
const
|
|
281
|
+
const response = await bridge.use({
|
|
286
282
|
method: 'validate_url',
|
|
287
283
|
params: {
|
|
288
284
|
mcpServerUrl: 'https://example.com/mcp'
|
|
289
285
|
}
|
|
290
286
|
});
|
|
291
287
|
|
|
292
|
-
|
|
293
|
-
|
|
288
|
+
if (response.result.success) {
|
|
289
|
+
console.log(response.result.data);
|
|
290
|
+
// "Yes, this is a valid MCP server providing..."
|
|
291
|
+
}
|
|
294
292
|
```
|
|
295
293
|
|
|
296
294
|
---
|
|
@@ -419,7 +417,9 @@ const repos = await bridge.use(new oAddress('o://github'), {
|
|
|
419
417
|
params: { organization: 'olane-labs' }
|
|
420
418
|
});
|
|
421
419
|
|
|
422
|
-
|
|
420
|
+
if (repos.result.success) {
|
|
421
|
+
console.log(repos.result.data);
|
|
422
|
+
}
|
|
423
423
|
```
|
|
424
424
|
|
|
425
425
|
---
|
|
@@ -581,13 +581,17 @@ const client = new oClient(
|
|
|
581
581
|
|
|
582
582
|
```typescript
|
|
583
583
|
// Use validate_url to test connection first
|
|
584
|
-
const
|
|
584
|
+
const response = await bridge.use({
|
|
585
585
|
method: 'validate_url',
|
|
586
586
|
params: { mcpServerUrl: 'https://mcp.example.com' }
|
|
587
587
|
});
|
|
588
588
|
|
|
589
|
-
|
|
590
|
-
|
|
589
|
+
if (response.result.success) {
|
|
590
|
+
console.log(response.result.data);
|
|
591
|
+
} else {
|
|
592
|
+
console.error('Validation failed:', response.result.error);
|
|
593
|
+
// Check URL and network connectivity
|
|
594
|
+
}
|
|
591
595
|
```
|
|
592
596
|
|
|
593
597
|
---
|
|
@@ -611,7 +615,9 @@ const whoami = await bridge.use(new oAddress('o://mcp_server_name'), {
|
|
|
611
615
|
params: {}
|
|
612
616
|
});
|
|
613
617
|
|
|
614
|
-
|
|
618
|
+
if (whoami.result.success) {
|
|
619
|
+
console.log(whoami.result.data.tools); // Should list all MCP tools
|
|
620
|
+
}
|
|
615
621
|
```
|
|
616
622
|
|
|
617
623
|
---
|
|
@@ -669,9 +675,9 @@ When you add an MCP server, it becomes a **child node** of the bridge:
|
|
|
669
675
|
|
|
670
676
|
```
|
|
671
677
|
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)
|
|
678
|
+
├── o://mcp-bridge/github (McpTool wrapping GitHub MCP)
|
|
679
|
+
├── o://mcp-bridge/slack (McpTool wrapping Slack MCP)
|
|
680
|
+
└── o://mcp-bridge/filesystem (McpTool wrapping Filesystem MCP)
|
|
675
681
|
```
|
|
676
682
|
|
|
677
683
|
Each child node (`McpTool`) is a complete Olane tool node with:
|
|
@@ -679,6 +685,24 @@ Each child node (`McpTool`) is a complete Olane tool node with:
|
|
|
679
685
|
- Discoverable tools in the network
|
|
680
686
|
- Standard Olane tool interface
|
|
681
687
|
|
|
688
|
+
#### Child Node Address Nesting
|
|
689
|
+
|
|
690
|
+
Child `McpTool` nodes are created with **simple addresses** and linked to the bridge via `parent`. The system automatically creates the nested address during registration:
|
|
691
|
+
|
|
692
|
+
```typescript
|
|
693
|
+
// Internally, McpBridgeTool creates children like this:
|
|
694
|
+
const mcpTool = new McpTool({
|
|
695
|
+
address: new oAddress(`o://${name}`), // Simple address
|
|
696
|
+
parent: this.address, // Parent linkage
|
|
697
|
+
leader: this.leader,
|
|
698
|
+
mcpClient: client,
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// After start(), mcpTool.address becomes 'o://mcp-bridge/{name}'
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
> **Important**: Never construct nested addresses manually (e.g., `new oAddress('o://mcp-bridge/github')`). Always use simple addresses with `parent` linkage and let the system create the hierarchy at runtime.
|
|
705
|
+
|
|
682
706
|
---
|
|
683
707
|
|
|
684
708
|
### Intent Metadata Flow
|
|
@@ -714,6 +738,43 @@ This enables:
|
|
|
714
738
|
|
|
715
739
|
---
|
|
716
740
|
|
|
741
|
+
### Response Structure {#response-structure}
|
|
742
|
+
|
|
743
|
+
All `use()` calls return responses following the standard Olane response wrapping pattern:
|
|
744
|
+
|
|
745
|
+
```typescript
|
|
746
|
+
const response = await bridge.use({
|
|
747
|
+
method: 'add_remote_server',
|
|
748
|
+
params: {
|
|
749
|
+
mcpServerUrl: 'https://mcp.example.com',
|
|
750
|
+
name: 'example',
|
|
751
|
+
description: 'Example MCP server'
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
// Response structure:
|
|
756
|
+
// {
|
|
757
|
+
// jsonrpc: "2.0",
|
|
758
|
+
// id: "request-id",
|
|
759
|
+
// result: {
|
|
760
|
+
// success: boolean, // Whether the operation succeeded
|
|
761
|
+
// data: any, // The returned data (on success)
|
|
762
|
+
// error?: string // Error details (on failure)
|
|
763
|
+
// }
|
|
764
|
+
// }
|
|
765
|
+
|
|
766
|
+
// Always check success before accessing data
|
|
767
|
+
if (response.result.success) {
|
|
768
|
+
console.log(response.result.data.message);
|
|
769
|
+
} else {
|
|
770
|
+
console.error('Error:', response.result.error);
|
|
771
|
+
}
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
> **Important**: Access data via `response.result.data`, not `response.result` directly. Always check `response.result.success` before accessing `response.result.data`.
|
|
775
|
+
|
|
776
|
+
---
|
|
777
|
+
|
|
717
778
|
## Real-World Examples {#real-world-examples}
|
|
718
779
|
|
|
719
780
|
### Example 1: Multi-MCP Research Assistant
|
|
@@ -850,20 +911,10 @@ const workflow = await devBridge.use({
|
|
|
850
911
|
|
|
851
912
|
## Next Steps {#next-steps}
|
|
852
913
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
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>
|
|
914
|
+
- **[Build Your First Node](/guides/quickstart)** - Learn Olane fundamentals
|
|
915
|
+
- **[Explore MCP Servers](https://github.com/modelcontextprotocol/servers)** - Find existing MCP servers
|
|
916
|
+
- **[Package Combinations](/packages/package-combinations)** - Choose the right packages
|
|
917
|
+
- **[o-lane Documentation](/packages/o-lane)** - Learn intent-driven execution
|
|
867
918
|
|
|
868
919
|
---
|
|
869
920
|
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"description": "oLane Core",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.18.1",
|
|
38
|
-
"@olane/o-config": "0.8.
|
|
39
|
-
"@olane/o-core": "0.8.
|
|
40
|
-
"@olane/o-intelligence": "0.8.
|
|
41
|
-
"@olane/o-lane": "0.8.
|
|
42
|
-
"@olane/o-leader": "0.8.
|
|
43
|
-
"@olane/o-node": "0.8.
|
|
44
|
-
"@olane/o-protocol": "0.8.
|
|
45
|
-
"@olane/o-storage": "0.8.
|
|
46
|
-
"@olane/o-tool": "0.8.
|
|
38
|
+
"@olane/o-config": "0.8.4",
|
|
39
|
+
"@olane/o-core": "0.8.4",
|
|
40
|
+
"@olane/o-intelligence": "0.8.4",
|
|
41
|
+
"@olane/o-lane": "0.8.4",
|
|
42
|
+
"@olane/o-leader": "0.8.4",
|
|
43
|
+
"@olane/o-node": "0.8.4",
|
|
44
|
+
"@olane/o-protocol": "0.8.4",
|
|
45
|
+
"@olane/o-storage": "0.8.4",
|
|
46
|
+
"@olane/o-tool": "0.8.4",
|
|
47
47
|
"debug": "^4.4.1",
|
|
48
48
|
"dotenv": "^16.5.0",
|
|
49
49
|
"express": "^4.21.2",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"tsx": "^4.20.3",
|
|
71
71
|
"typescript": "5.4.5"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b53623b1ad4365133911722f80d5597a72b65bf2"
|
|
74
74
|
}
|