From 50da90285ade8ff03525d01ba761f42fe3c7fb22 Mon Sep 17 00:00:00 2001 From: Kesku Date: Thu, 18 Dec 2025 15:14:55 +0100 Subject: [PATCH] feat: add smithery configuration schema for Perplexity API key and timeout settings --- smithery.yaml | 12 +++++++++++- src/http.ts | 7 ++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/smithery.yaml b/smithery.yaml index 9582cde..d5e02c6 100644 --- a/smithery.yaml +++ b/smithery.yaml @@ -4,4 +4,14 @@ build: dockerBuildPath: "." startCommand: type: "http" - +configSchema: + type: "object" + required: + - "PERPLEXITY_API_KEY" + properties: + PERPLEXITY_API_KEY: + type: "string" + description: "Your Perplexity API key from https://www.perplexity.ai/settings/api" + PERPLEXITY_TIMEOUT_MS: + type: "string" + description: "Request timeout in milliseconds (default: 300000)" \ No newline at end of file diff --git a/src/http.ts b/src/http.ts index fb3a3f2..1673189 100644 --- a/src/http.ts +++ b/src/http.ts @@ -15,11 +15,8 @@ if (!PERPLEXITY_API_KEY) { const app = express(); const PORT = parseInt(process.env.PORT || "8080", 10); -const BIND_ADDRESS = process.env.BIND_ADDRESS || "127.0.0.1"; -const ALLOWED_ORIGINS = process.env.ALLOWED_ORIGINS?.split(",") || [ - "http://localhost:3000", - "http://127.0.0.1:3000", -]; +const BIND_ADDRESS = process.env.BIND_ADDRESS || "0.0.0.0"; +const ALLOWED_ORIGINS = process.env.ALLOWED_ORIGINS?.split(",") || ["*"]; // CORS configuration for browser-based MCP clients app.use(cors({