From 836704d074320be3b50204093e84ff6d895b5a87 Mon Sep 17 00:00:00 2001 From: prpeh Date: Sat, 12 Apr 2025 17:20:51 +0700 Subject: [PATCH] fix: update smithery.yaml to match correct format --- smithery.yaml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/smithery.yaml b/smithery.yaml index 3f318c1..5c11f3d 100644 --- a/smithery.yaml +++ b/smithery.yaml @@ -1,6 +1,8 @@ +# Smithery.ai configuration startCommand: type: stdio configSchema: + # JSON Schema defining the configuration options for the MCP. type: object properties: httpServer: @@ -12,22 +14,16 @@ startCommand: description: Port number for HTTP server default: 3000 additionalProperties: false - -commandFunction: | - function(config) { - const args = []; - const env = {}; - - if (config.httpServer) { - env.HTTP_SERVER = 'true'; - if (config.port) { - env.PORT = config.port.toString(); + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ + "command": "node", + "args": [ + "dist/index.js" + ], + "env": { + ...(config.httpServer ? { HTTP_SERVER: "true" } : {}), + ...(config.port ? { PORT: config.port.toString() } : {}) } - } - - return { - command: 'node', - args: ['dist/index.js'], - env: env - }; - } \ No newline at end of file + }) \ No newline at end of file