diff --git a/setup_manual.bat b/setup_manual.bat new file mode 100644 index 0000000..57b56d3 --- /dev/null +++ b/setup_manual.bat @@ -0,0 +1,72 @@ +@echo off +echo ๐Ÿ”ง Manual Setup for Dolibarr MCP (Windows Fix) +echo. + +REM Activate virtual environment first +echo ๐Ÿ Activating virtual environment... +call venv_dolibarr\Scripts\activate.bat + +REM Verify Python installation +echo โœ… Checking Python version... +venv_dolibarr\Scripts\python.exe --version + +REM Install requirements again with explicit encoding +echo ๐Ÿ“ฆ Installing requirements with UTF-8 encoding... +set PYTHONIOENCODING=utf-8 +venv_dolibarr\Scripts\python.exe -m pip install --upgrade pip +venv_dolibarr\Scripts\python.exe -m pip install aiohttp>=3.9.0 +venv_dolibarr\Scripts\python.exe -m pip install pydantic>=2.5.0 +venv_dolibarr\Scripts\python.exe -m pip install python-dotenv>=1.0.0 +venv_dolibarr\Scripts\python.exe -m pip install click>=8.1.0 +venv_dolibarr\Scripts\python.exe -m pip install typing-extensions>=4.8.0 + +REM Install MCP manually - try different sources +echo ๐Ÿ”— Installing MCP framework... +venv_dolibarr\Scripts\python.exe -m pip install mcp==1.0.0 +if errorlevel 1 ( + echo ๐Ÿ”„ Trying alternative MCP installation... + venv_dolibarr\Scripts\python.exe -m pip install git+https://github.com/modelcontextprotocol/python-sdk.git +) + +REM Create .env file if it doesn't exist +if not exist .env ( + echo ๐Ÿ“ Creating .env file... + copy .env.example .env 2>nul || ( + echo # Dolibarr MCP Configuration > .env + echo DOLIBARR_URL=https://your-dolibarr-instance.com/api/index.php >> .env + echo DOLIBARR_API_KEY=your_api_key_here >> .env + echo LOG_LEVEL=INFO >> .env + ) +) + +REM Test Python module import manually +echo ๐Ÿงช Testing module import... +venv_dolibarr\Scripts\python.exe -c "import sys; sys.path.insert(0, 'src'); from dolibarr_mcp.config import Config; print('โœ… Module import successful')" 2>nul +if errorlevel 1 ( + echo โš ๏ธ Direct import failed, but this is expected without development installation +) else ( + echo โœ… Module import working! +) + +REM Test basic connection +echo ๐Ÿ”Œ Testing Dolibarr connection (if configured)... +venv_dolibarr\Scripts\python.exe test_connection.py 2>nul +if errorlevel 1 ( + echo โš ๏ธ Connection test failed - please check your .env configuration +) else ( + echo โœ… Connection test passed! +) + +echo. +echo ๐ŸŽฏ Manual Setup Complete! +echo. +echo ๐Ÿ“‹ Next Steps: +echo 1. Edit .env file: notepad .env +echo 2. Configure your Dolibarr URL and API key +echo 3. Test: venv_dolibarr\Scripts\python.exe test_connection.py +echo 4. Run MCP: venv_dolibarr\Scripts\python.exe -m dolibarr_mcp.dolibarr_mcp_server +echo. +echo ๐Ÿ’ก Alternative: Use Docker instead: docker-compose up +echo. + +pause