mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-04-24 18:45:35 +02:00
Add __main__.py for direct module execution
This commit is contained in:
17
src/dolibarr_mcp/__main__.py
Normal file
17
src/dolibarr_mcp/__main__.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
"""Main entry point for Dolibarr MCP server."""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
from .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)
|
||||||
Reference in New Issue
Block a user