@lanonasis/cli 3.0.8 → 3.0.9
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.
|
@@ -29,10 +29,7 @@ export class LanonasisMCPServer {
|
|
|
29
29
|
// Initialize config and API client
|
|
30
30
|
this.config = new CLIConfig();
|
|
31
31
|
this.apiClient = new APIClient();
|
|
32
|
-
//
|
|
33
|
-
this.registerTools();
|
|
34
|
-
this.registerResources();
|
|
35
|
-
this.registerPrompts();
|
|
32
|
+
// Note: registerTools is now async and called in initialize()
|
|
36
33
|
// Setup error handling
|
|
37
34
|
this.setupErrorHandling();
|
|
38
35
|
}
|
|
@@ -56,6 +53,10 @@ export class LanonasisMCPServer {
|
|
|
56
53
|
this.apiClient = new APIClient();
|
|
57
54
|
// APIClient will use the config internally
|
|
58
55
|
}
|
|
56
|
+
// Register tools, resources, and prompts after config is loaded
|
|
57
|
+
await this.registerTools();
|
|
58
|
+
this.registerResources();
|
|
59
|
+
this.registerPrompts();
|
|
59
60
|
if (this.options.verbose) {
|
|
60
61
|
console.log(chalk.cyan('🚀 Lanonasis MCP Server initialized'));
|
|
61
62
|
console.log(chalk.gray(`API URL: ${apiUrl}`));
|
|
@@ -65,9 +66,9 @@ export class LanonasisMCPServer {
|
|
|
65
66
|
/**
|
|
66
67
|
* Register MCP tools
|
|
67
68
|
*/
|
|
68
|
-
registerTools() {
|
|
69
|
-
// Import request schemas
|
|
70
|
-
const { ListToolsRequestSchema, CallToolRequestSchema } =
|
|
69
|
+
async registerTools() {
|
|
70
|
+
// Import request schemas dynamically for ES modules
|
|
71
|
+
const { ListToolsRequestSchema, CallToolRequestSchema } = await import('@modelcontextprotocol/sdk/types.js');
|
|
71
72
|
// List available tools
|
|
72
73
|
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
73
74
|
tools: [
|
package/package.json
CHANGED