@olane/o-mcp 0.6.12 → 0.7.1

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.
@@ -1,12 +1,16 @@
1
- import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
1
+ import { ToolResult } from '@olane/o-tool';
2
2
  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
- export declare class McpBridgeTool extends oVirtualTool {
6
- constructor(config: oToolConfig);
5
+ import { oLaneTool } from '@olane/o-lane';
6
+ import { oNodeToolConfig } from '@olane/o-node';
7
+ export declare class McpBridgeTool extends oLaneTool {
8
+ private addedRemoteServers;
9
+ constructor(config: oNodeToolConfig);
7
10
  _tool_validate_url(request: oRequest): Promise<ToolResult>;
8
11
  _tool_add_remote_server(request: oRequest): Promise<ToolResult>;
9
12
  _tool_add_local_server(request: oRequest): Promise<ToolResult>;
10
- createMcpTool(mcpClient: Client, url: string, name?: string): Promise<McpTool>;
13
+ _tool_search(request: oRequest): Promise<ToolResult>;
14
+ createMcpTool(mcpClient: Client, url: string, name?: string, description?: string): Promise<McpTool>;
11
15
  }
12
16
  //# sourceMappingURL=mcp-bridge.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-bridge.tool.d.ts","sourceRoot":"","sources":["../../src/mcp-bridge.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAY,QAAQ,EAAc,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxC,qBAAa,aAAc,SAAQ,YAAY;gBACjC,MAAM,EAAE,WAAW;IASzB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAsB1D,uBAAuB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAuC/D,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA+B9D,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC;CAuBpB"}
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,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,CAAC,kBAAkB,CAA0B;gBAExC,MAAM,EAAE,eAAe;IAU7B,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"}
@@ -1,18 +1,19 @@
1
- import { oVirtualTool } from '@olane/o-tool';
2
1
  import { oAddress } from '@olane/o-core';
3
2
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
4
3
  import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
5
4
  import { McpTool } from './mcp.tool.js';
6
5
  import { MCP_BRIDGE_METHODS } from './methods/mcp-bridge.methods.js';
7
6
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
8
- export class McpBridgeTool extends oVirtualTool {
7
+ import { oLaneTool } from '@olane/o-lane';
8
+ export class McpBridgeTool extends oLaneTool {
9
9
  constructor(config) {
10
10
  super({
11
11
  ...config,
12
12
  address: new oAddress('o://mcp'),
13
- description: 'Tool to help add MCP servers to the network',
13
+ description: 'Model context protocol (MCP) tool for adding MCP servers to the network',
14
14
  methods: MCP_BRIDGE_METHODS,
15
15
  });
16
+ this.addedRemoteServers = new Set();
16
17
  }
17
18
  async _tool_validate_url(request) {
18
19
  const params = request.params;
@@ -37,8 +38,11 @@ export class McpBridgeTool extends oVirtualTool {
37
38
  async _tool_add_remote_server(request) {
38
39
  const params = request.params;
39
40
  // params have already been validated
40
- const { mcpServerUrl, headers } = params;
41
+ const { mcpServerUrl, headers, name, description } = params;
41
42
  try {
43
+ if (this.addedRemoteServers.has(mcpServerUrl)) {
44
+ throw new Error('MCP server already added: ' + mcpServerUrl);
45
+ }
42
46
  this.logger.debug('Adding MCP server: ' + mcpServerUrl);
43
47
  const transport = new StreamableHTTPClientTransport(new URL(mcpServerUrl), {
44
48
  requestInit: {
@@ -51,10 +55,11 @@ export class McpBridgeTool extends oVirtualTool {
51
55
  headers: headers,
52
56
  });
53
57
  await mcpClient.connect(transport);
54
- await this.createMcpTool(mcpClient, mcpServerUrl);
58
+ await this.createMcpTool(mcpClient, mcpServerUrl, name, description);
59
+ this.addedRemoteServers.add(mcpServerUrl);
55
60
  return {
56
61
  message: 'Successfully added MCP server with ' +
57
- this.childNodes.length +
62
+ this.hierarchyManager.getChildren().length +
58
63
  ' tools',
59
64
  };
60
65
  }
@@ -86,21 +91,44 @@ export class McpBridgeTool extends oVirtualTool {
86
91
  message: 'Successfully added local MCP server',
87
92
  };
88
93
  }
89
- async createMcpTool(mcpClient, url, name) {
94
+ async _tool_search(request) {
95
+ const params = request.params;
96
+ const { name, provider, functionality } = params;
97
+ let count = 0;
98
+ const response = await this.use(new oAddress('o://perplexity'), {
99
+ method: 'completion',
100
+ params: {
101
+ model: 'sonar',
102
+ messages: [
103
+ {
104
+ role: 'user',
105
+ content: `Search for model context protocol servers. Return all of the information necessary to connect or run the MCP server. Necessary information may include: command to run the MCP server, arguments to run the MCP server, headers to send to the MCP server, remote mcp url, and any other information necessary to run the MCP server. The MCP server is described by:
106
+ ${provider ? `${++count}. Provider: ${provider}` : ''}
107
+ ${name ? `${++count}. Name: ${name}` : ''}
108
+ ${functionality ? `${++count}. Functionality: ${functionality}` : ''}`,
109
+ },
110
+ ],
111
+ },
112
+ });
113
+ return {
114
+ result: response.result.data.message,
115
+ };
116
+ }
117
+ async createMcpTool(mcpClient, url, name, description) {
90
118
  this.logger.debug('Creating MCP tool: ', name, url);
91
119
  const mcpTool = new McpTool({
92
120
  name: name || 'mcp-' + Date.now(),
93
- description: 'MCP server for ' + url,
121
+ description: description || 'MCP server for ' + url,
94
122
  address: new oAddress(`o://${name || `mcp-${Date.now()}`}`),
95
123
  mcpClient: mcpClient,
96
124
  dependencies: [],
97
- leader: this.config.leader,
125
+ leader: this.leader,
98
126
  parent: this.address,
99
127
  });
100
- this.addChildNode(mcpTool);
101
- await this.startChildren();
102
128
  await mcpTool.setupTools();
103
- await this.use(new oAddress(mcpTool.address.toString()), {
129
+ await mcpTool.start();
130
+ this.addChildNode(mcpTool);
131
+ await this.useChild(mcpTool.address, {
104
132
  method: 'index_network',
105
133
  params: {},
106
134
  });
@@ -1,15 +1,22 @@
1
- import { oToolConfig, oVirtualTool } from '@olane/o-tool';
2
1
  import { oAddress } from '@olane/o-core';
3
2
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
4
- export declare class McpTool extends oVirtualTool {
3
+ import { oLaneTool } from '@olane/o-lane';
4
+ import { oNodeToolConfig } from '@olane/o-node';
5
+ export declare class McpTool extends oLaneTool {
5
6
  private mcpClient;
6
- constructor(config: oToolConfig & {
7
+ constructor(config: oNodeToolConfig & {
7
8
  address: oAddress;
8
9
  mcpClient: Client;
9
10
  });
10
11
  setupTools(): Promise<void>;
11
12
  myTools(): Promise<string[]>;
12
- index(): Promise<any>;
13
+ index(): Promise<{
14
+ provider: string;
15
+ summary: string;
16
+ } | {
17
+ summary: string | null;
18
+ provider?: undefined;
19
+ }>;
13
20
  whoami(): Promise<any>;
14
21
  }
15
22
  //# sourceMappingURL=mcp.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAyC,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGnE,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAYpE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAiC3B,OAAO;IAQP,KAAK;IA2BL,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;CAmB7B"}
1
+ {"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,OAAQ,SAAQ,SAAS;IACpC,OAAO,CAAC,SAAS,CAAS;gBAGxB,MAAM,EAAE,eAAe,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAa9D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgC3B,OAAO;IAQP,KAAK;;;;;;;IAuBL,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;CAoB7B"}
@@ -1,7 +1,7 @@
1
- import { oVirtualTool } from '@olane/o-tool';
2
- import { oAddress, oToolError, oToolErrorCodes } from '@olane/o-core';
1
+ import { oAddress, oError, oErrorCodes } from '@olane/o-core';
3
2
  import { v4 as uuidv4 } from 'uuid';
4
- export class McpTool extends oVirtualTool {
3
+ import { oLaneTool } from '@olane/o-lane';
4
+ export class McpTool extends oLaneTool {
5
5
  constructor(config) {
6
6
  super({
7
7
  ...config,
@@ -34,12 +34,11 @@ export class McpTool extends oVirtualTool {
34
34
  });
35
35
  this.logger.debug('MCP tool result: ', result);
36
36
  if (result.isError) {
37
- throw new oToolError(oToolErrorCodes.TOOL_ERROR, JSON.stringify(result.content));
37
+ throw new oError(oErrorCodes.UNKNOWN, JSON.stringify(result.content));
38
38
  }
39
39
  return result.content;
40
40
  };
41
41
  });
42
- await this.startChildren();
43
42
  }
44
43
  async myTools() {
45
44
  const tools = await this.mcpClient.listTools();
@@ -52,8 +51,8 @@ export class McpTool extends oVirtualTool {
52
51
  const result = await super.index();
53
52
  // add each mcp tool to the vector store
54
53
  const tools = await this.mcpClient.listTools();
55
- await Promise.all(tools.tools.map((tool) => {
56
- return this.use(new oAddress('o://vector-store'), {
54
+ for (const tool of tools.tools) {
55
+ await this.use(new oAddress('o://vector-store'), {
57
56
  method: 'add_documents',
58
57
  params: {
59
58
  documents: [
@@ -67,15 +66,14 @@ export class McpTool extends oVirtualTool {
67
66
  ],
68
67
  },
69
68
  });
70
- })).catch((err) => {
71
- this.logger.error('Error adding MCP tools to vector store: ', err);
72
- });
69
+ }
73
70
  return result;
74
71
  }
75
72
  async whoami() {
76
73
  // do nothing
77
74
  const tools = await this.mcpClient.listTools();
78
75
  return {
76
+ description: this.description,
79
77
  tools: tools.tools.map((tool) => {
80
78
  this.logger.debug('MCP Tool Definition: ', tool.name, tool.description, tool.inputSchema);
81
79
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-bridge.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/mcp-bridge.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAkExD,CAAC"}
1
+ {"version":3,"file":"mcp-bridge.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/mcp-bridge.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CA8GxD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export const MCP_BRIDGE_METHODS = {
2
2
  validate_url: {
3
3
  name: 'validate_url',
4
- description: 'Validate if a URL is a valid MCP server or a link to something else.',
4
+ description: 'Validate the URL of an MCP server',
5
5
  dependencies: [],
6
6
  parameters: [
7
7
  {
@@ -25,6 +25,20 @@ export const MCP_BRIDGE_METHODS = {
25
25
  description: 'The URL of the MCP server to use',
26
26
  required: true,
27
27
  },
28
+ {
29
+ name: 'name',
30
+ type: 'string',
31
+ value: 'string',
32
+ description: 'The name for the MCP server. Generate this in lowercase snake_case if not provided.',
33
+ required: true,
34
+ },
35
+ {
36
+ name: 'description',
37
+ type: 'string',
38
+ value: 'string',
39
+ description: 'The description for the MCP server. Generate this if not provided.',
40
+ required: false,
41
+ },
28
42
  {
29
43
  name: 'headers',
30
44
  type: 'object',
@@ -34,6 +48,34 @@ export const MCP_BRIDGE_METHODS = {
34
48
  },
35
49
  ],
36
50
  },
51
+ search: {
52
+ name: 'search',
53
+ description: 'Search for MCP servers',
54
+ dependencies: [],
55
+ parameters: [
56
+ {
57
+ name: 'name',
58
+ type: 'string',
59
+ value: 'string',
60
+ description: 'The mcp server name to search for',
61
+ required: false,
62
+ },
63
+ {
64
+ name: 'provider',
65
+ type: 'string',
66
+ value: 'string',
67
+ description: 'Who the MCP server is provided by. This is inferred from the user intent.',
68
+ required: false,
69
+ },
70
+ {
71
+ name: 'functionality',
72
+ type: 'string',
73
+ value: 'string',
74
+ description: 'Description of the functionality of the MCP server',
75
+ required: false,
76
+ },
77
+ ],
78
+ },
37
79
  add_local_server: {
38
80
  name: 'add_local_server',
39
81
  description: 'Add a local MCP server to the bridge using command and arguments',
@@ -1 +1 @@
1
- {"version":3,"file":"o-client.mcp.d.ts","sourceRoot":"","sources":["../../src/o-client.mcp.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,MAAM,EACN,aAAa,EACd,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEL,cAAc,EAEf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C,sFAAsF;IACtF,MAAM,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,qBAAa,OAAQ,SAAQ,MAAM;IACjC,OAAO,CAAC,cAAc,CAAC,CAAoC;gBAE/C,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc;IAK3D,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7E"}
1
+ {"version":3,"file":"o-client.mcp.d.ts","sourceRoot":"","sources":["../../src/o-client.mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,aAAa,EACd,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C,sFAAsF;IACtF,MAAM,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;CAC5C,CAAC;AAEF,qBAAa,OAAQ,SAAQ,MAAM;IACjC,OAAO,CAAC,cAAc,CAAC,CAAoC;gBAE/C,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc;IAK3D,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7E"}
@@ -1,2 +1 @@
1
- export {};
2
1
  //# sourceMappingURL=benchmark.spec.d.ts.map
@@ -1,48 +1,49 @@
1
- import { expect } from 'chai';
2
- import { GITHUB_TEST_CASES } from './benchmarks/github/github.test-cases.js';
3
- import { McpBridgeTool } from '../src/index.js';
4
- import { NodeState } from '@olane/o-core';
5
- import { IntelligenceTool } from '@olane/o-intelligence';
6
- import { oLeaderNode } from '@olane/o-leader';
7
- const leader = new oLeaderNode({
8
- parent: null,
9
- leader: null,
10
- });
11
- const mcpTool = new McpBridgeTool({
12
- parent: null,
13
- leader: null,
14
- });
15
- leader.addChildNode(mcpTool);
16
- const intelligenceTool = new IntelligenceTool({
17
- parent: mcpTool.address,
18
- leader: mcpTool.address,
19
- });
20
- leader.addChildNode(intelligenceTool);
21
- describe('o-mcp start node', () => {
22
- it('should be able to start a node', async () => {
23
- await leader.start();
24
- expect(mcpTool.state).to.equal(NodeState.RUNNING);
25
- });
26
- });
27
- describe('o-mcp github-benchmarks', () => {
28
- it('should be able to test github benchmarks', async () => {
29
- for (const testCase of GITHUB_TEST_CASES) {
30
- console.log(testCase.input);
31
- const handshakeResponse = await mcpTool.use(mcpTool.address, {
32
- method: 'handshake',
33
- params: {
34
- intent: testCase.input,
35
- },
36
- });
37
- console.log(handshakeResponse.result.data);
38
- // const result = await testCase.output;
39
- // expect(result).to.contain(testCase.output.contains);
40
- }
41
- });
42
- });
43
- describe('o-mcp stop node', () => {
44
- it('should be able to stop a node', async () => {
45
- await leader.stop();
46
- expect(mcpTool.state).to.equal(NodeState.STOPPED);
47
- });
48
- });
1
+ "use strict";
2
+ // import { expect } from 'chai';
3
+ // import { GITHUB_TEST_CASES } from './benchmarks/github/github.test-cases.js';
4
+ // import { McpBridgeTool } from '../src/index.js';
5
+ // import { NodeState, oAddress } from '@olane/o-core';
6
+ // import { IntelligenceTool } from '@olane/o-intelligence';
7
+ // import { oLeaderNode } from '@olane/o-leader';
8
+ // const leader = new oLeaderNode({
9
+ // parent: null,
10
+ // leader: null,
11
+ // });
12
+ // const mcpTool = new McpBridgeTool({
13
+ // parent: null,
14
+ // leader: null,
15
+ // });
16
+ // leader.addChildNode(mcpTool);
17
+ // const intelligenceTool = new IntelligenceTool({
18
+ // parent: mcpTool.address,
19
+ // leader: mcpTool.address,
20
+ // });
21
+ // leader.addChildNode(intelligenceTool);
22
+ // describe('o-mcp start node', () => {
23
+ // it('should be able to start a node', async () => {
24
+ // await leader.start();
25
+ // expect(mcpTool.state).to.equal(NodeState.RUNNING);
26
+ // });
27
+ // });
28
+ // describe('o-mcp github-benchmarks', () => {
29
+ // it('should be able to test github benchmarks', async () => {
30
+ // for (const testCase of GITHUB_TEST_CASES) {
31
+ // console.log(testCase.input);
32
+ // const handshakeResponse = await mcpTool.use(mcpTool.address, {
33
+ // method: 'handshake',
34
+ // params: {
35
+ // intent: testCase.input,
36
+ // },
37
+ // });
38
+ // console.log(handshakeResponse.result.data);
39
+ // // const result = await testCase.output;
40
+ // // expect(result).to.contain(testCase.output.contains);
41
+ // }
42
+ // });
43
+ // });
44
+ // describe('o-mcp stop node', () => {
45
+ // it('should be able to stop a node', async () => {
46
+ // await leader.stop();
47
+ // expect(mcpTool.state).to.equal(NodeState.STOPPED);
48
+ // });
49
+ // });
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tools.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.spec.d.ts","sourceRoot":"","sources":["../../test/tools.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { expect } from 'chai';
2
+ import { McpBridgeTool } from '../src/index.js';
3
+ const mcpTool = new McpBridgeTool({
4
+ parent: null,
5
+ leader: null,
6
+ });
7
+ describe('o-mcp verify myTools works', () => {
8
+ it('should be able to stop a node', async () => {
9
+ const tools = await mcpTool.myTools();
10
+ console.log(tools);
11
+ expect(tools.length).to.be.greaterThan(0);
12
+ });
13
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-mcp",
3
- "version": "0.6.12",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -56,13 +56,14 @@
56
56
  "typescript": "5.4.5"
57
57
  },
58
58
  "peerDependencies": {
59
- "@modelcontextprotocol/sdk": "^1.13.0",
60
- "@olane/o-config": "^0.6.11",
61
- "@olane/o-core": "^0.6.11",
62
- "@olane/o-intelligence": "^0.6.7",
63
- "@olane/o-leader": "^0.6.11",
64
- "@olane/o-protocol": "^0.6.11",
65
- "@olane/o-tool": "^0.6.11"
59
+ "@modelcontextprotocol/sdk": "^1.18.1",
60
+ "@olane/o-config": "^0.7.0",
61
+ "@olane/o-core": "^0.7.0",
62
+ "@olane/o-intelligence": "^0.7.0",
63
+ "@olane/o-leader": "^0.7.0",
64
+ "@olane/o-protocol": "^0.7.0",
65
+ "@olane/o-tool": "^0.7.0",
66
+ "@olane/o-lane": "^0.7.0"
66
67
  },
67
68
  "dependencies": {
68
69
  "debug": "^4.4.1",