chore: Enhance MCP server execution and compatibility with Cursor mode
- 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
This commit is contained in:
13
test-cursor.sh
Executable file
13
test-cursor.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user