fix: add configurable API base URL for MCP server
This commit is contained in:
parent
c9adfde9f3
commit
92adaa2c6f
@ -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
|
||||
|
||||
`;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user