mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-04-23 10:15:34 +02:00
Update __init__.py to ensure proper module execution
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
"""Professional Dolibarr MCP Server package.
|
||||
"""Dolibarr MCP - Model Context Protocol Server for Dolibarr ERP."""
|
||||
|
||||
This package provides a comprehensive Model Context Protocol (MCP) server
|
||||
for Dolibarr ERP integration with full CRUD operations.
|
||||
"""
|
||||
|
||||
__version__ = "1.0.0"
|
||||
__version__ = "1.0.1"
|
||||
__author__ = "Dolibarr MCP Team"
|
||||
__email__ = "support@dolibarr-mcp.com"
|
||||
|
||||
from .config import Config
|
||||
from .dolibarr_client import DolibarrClient, DolibarrAPIError
|
||||
# Make the main function available at package level
|
||||
try:
|
||||
from .dolibarr_mcp_server import main
|
||||
except ImportError:
|
||||
# If relative import fails, we might be running directly
|
||||
import sys
|
||||
import os
|
||||
# Add parent directory to path
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from dolibarr_mcp.dolibarr_mcp_server import main
|
||||
|
||||
# Export main components
|
||||
__all__ = [
|
||||
"Config",
|
||||
"DolibarrClient",
|
||||
"DolibarrAPIError",
|
||||
"__version__"
|
||||
'main',
|
||||
'__version__',
|
||||
'__author__'
|
||||
]
|
||||
|
||||
# Support both execution methods
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user