mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-05-01 05:45:35 +02:00
Fix module entry point for MCP server
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
"""Main entry point for Dolibarr MCP server."""
|
||||
#!/usr/bin/env python3
|
||||
"""Main entry point for the Dolibarr MCP server module."""
|
||||
|
||||
import sys
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
from .dolibarr_mcp_server import main
|
||||
# Add the src directory to the Python path if needed
|
||||
src_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if src_dir not in sys.path:
|
||||
sys.path.insert(0, src_dir)
|
||||
|
||||
from dolibarr_mcp.dolibarr_mcp_server import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
print("\n👋 Server stopped by user", file=sys.stderr)
|
||||
sys.exit(0)
|
||||
except Exception as e:
|
||||
print(f"❌ Server error: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user