🔧 MCP Development Infrastructure: - lsl_mcp_server.py (414 lines): Complete MCP server for LSL validation • LSL file listing and validation capabilities • Memory usage analysis and reporting • Git status integration • Architecture analysis tools 📋 Testing & Documentation: - test_lslint_mcp.py: MCP server testing framework - test_mcp_server.py: Server functionality tests - test_validate_lsl.py: LSL validation testing - debug_mcp.py: MCP debugging utilities - MCP_README.md: Complete documentation and setup guide - mcp_config.json: MCP server configuration 🎯 Development Benefits: - Enhanced LSL development workflow - Automated validation and analysis - Professional debugging capabilities - Integration with existing LSL validator - Support for AI-assisted development These tools were used during development of the GitHub Update System and provide foundation for future LSL development automation.
50 lines
No EOL
1.8 KiB
Python
50 lines
No EOL
1.8 KiB
Python
#!/usr/bin/env python3
|
|
import sys
|
|
import json
|
|
import traceback
|
|
|
|
def debug_main():
|
|
"""Debug version to see what's happening"""
|
|
print('{"debug": "server started"}', flush=True)
|
|
|
|
try:
|
|
while True:
|
|
line = sys.stdin.readline()
|
|
print(f'{{"debug": "received line: {line.strip()[:100]}"}}', flush=True)
|
|
|
|
if not line:
|
|
print('{"debug": "EOF received, exiting"}', flush=True)
|
|
break
|
|
|
|
line = line.strip()
|
|
if not line:
|
|
continue
|
|
|
|
try:
|
|
request = json.loads(line)
|
|
print(f'{{"debug": "parsed request: {request.get("method", "unknown")}"}}', flush=True)
|
|
|
|
if request.get("method") == "initialize":
|
|
response = {
|
|
"jsonrpc": "2.0",
|
|
"id": request.get("id"),
|
|
"result": {
|
|
"protocolVersion": "2025-03-26",
|
|
"capabilities": {"tools": {}, "resources": {}},
|
|
"serverInfo": {"name": "Debug LSL Server", "version": "1.0.0"}
|
|
}
|
|
}
|
|
print(json.dumps(response), flush=True)
|
|
print('{"debug": "sent initialize response"}', flush=True)
|
|
|
|
except Exception as e:
|
|
print(f'{{"debug": "error parsing: {str(e)}"}}', flush=True)
|
|
|
|
except Exception as e:
|
|
print(f'{{"debug": "main loop error: {str(e)}"}}', flush=True)
|
|
traceback.print_exc(file=sys.stderr)
|
|
|
|
print('{"debug": "server exiting"}', flush=True)
|
|
|
|
if __name__ == "__main__":
|
|
debug_main() |