fix: add configurable API base URL for MCP server

This commit is contained in:
Addison Waldow 2026-02-10 20:24:58 -07:00
parent c9adfde9f3
commit 92adaa2c6f
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,9 @@ export function generateEnvExample(
# Server configuration
PORT=3000
LOG_LEVEL=info
# If you have a server outside the servers list from OpenAPI, define it here.
# Otherwise, omit this.
API_BASE_URL=your_api_base_url_here
`;

View File

@ -130,7 +130,8 @@ interface McpToolDefinition {
*/
export const SERVER_NAME = "${serverName}";
export const SERVER_VERSION = "${serverVersion}";
export const API_BASE_URL = "${determinedBaseUrl || ''}";
// Base URL for the API, can be set via environment variable or determined from OpenAPI spec
export const API_BASE_URL = process.env.API_BASE_URL || "${determinedBaseUrl || ''}";
/**
* MCP Server instance