- Introduce environment variables for Cursor compatibility in silent-mcp.sh and npx-entry.cjs - Implement process cleanup for existing MCP instances to prevent conflicts - Adjust logging behavior based on execution context to ensure proper message handling - Add test-cursor.sh script to simulate Cursor environment for testing purposes - Refactor stdio-server.ts to manage logging and message flushing based on compatibility mode
13 lines
346 B
Bash
Executable File
13 lines
346 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Clean up any existing processes first
|
|
pkill -f "node.*stdio-server" >/dev/null 2>&1 || true
|
|
|
|
# Simulate Cursor environment by setting env variables
|
|
export CURSOR_SESSION=test-session
|
|
export CURSOR_COMPATIBLE=true
|
|
export USE_STDIO_TRANSPORT=true
|
|
export LOG_LEVEL=info
|
|
|
|
# Run npx with the simulated environment
|
|
npx homeassistant-mcp |