fix: Hardcode DB config and start server before DB connection
- db.ts: Hardcode 10.0.1.1 (infra VM) to prevent env var issues - index.ts: Start MCP server before DB connection (fixes Claude Code timing) - run.sh/run.js: Add wrapper scripts with embedded env vars - start.sh: Update with correct WireGuard config Fixes task-mcp failing to connect in Claude Code sessions after WireGuard migration. The server must respond to MCP initialize before stdin closes, which requires starting before slow DB ops. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
14
start.sh
14
start.sh
@@ -1,3 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Wrapper script for task-mcp that logs errors
|
||||
exec node /Users/christian.gick/Development/Infrastructure/mcp-servers/task-mcp/dist/index.js 2>> /tmp/task-mcp.log
|
||||
# Wrapper script for task-mcp with hardcoded env vars
|
||||
export DB_HOST="10.0.1.1"
|
||||
export DB_PORT="5432"
|
||||
export DB_NAME="agiliton"
|
||||
export DB_USER="agiliton"
|
||||
export DB_PASSWORD="QtqiwCOAUpQNF6pjzOMAREzUny2bY8V1"
|
||||
export LLM_API_URL="https://llm.agiliton.cloud"
|
||||
export LLM_API_KEY="sk-master-91b891c709ade9021a97c9260217ddb277877db652a31dcf"
|
||||
|
||||
cd /Users/christian.gick/Development/Infrastructure/mcp-servers/task-mcp
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
exec node dist/index.js
|
||||
|
||||
Reference in New Issue
Block a user