Skip to content

Commit c20384e

Browse files
authored
Merge pull request #286 from DevanshuNEU/hotfix/mcp-api-key-conflict
fix: MCP_API_KEY to avoid Railway shared variable conflict
2 parents 76af000 + f7de41b commit c20384e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

mcp-server/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
BACKEND_BASE_URL = os.getenv("BACKEND_API_URL", "http://localhost:8000")
1212
BACKEND_API_URL = f"{BACKEND_BASE_URL}{API_PREFIX}"
13-
API_KEY = os.getenv("API_KEY", "")
13+
# MCP_API_KEY takes precedence over API_KEY to avoid conflicts
14+
# when Railway shares env vars across services in the same project
15+
API_KEY = os.getenv("MCP_API_KEY", "") or os.getenv("API_KEY", "")
1416

1517
SERVER_NAME = "codeintel-mcp"
1618
SERVER_VERSION = "0.5.0"

0 commit comments

Comments
 (0)