INSTALL-WINDOWS.md
Language Markdown2.9 KB82 lines
# Windows Install: Bitrix24 MCP ServerFor a hands-on install on a staff member's Windows machine. Assumes Python3.10+ is installed (check: `py --version` in PowerShell; install frompython.org if missing, and check "Add python.exe to PATH" during setup).> **This build performs writes** (lead/deal/contact/company) by default. To> install a read-only copy, set `BITRIX_WRITES=off` in `.env`.## 1. UnzipUnzip the package to a local, non-synced folder, e.g.:```C:\Users\<username>\mcp-servers\bitrix-mcp```**Not** OneDrive, Google Drive, or any synced folder: the `.env` secret andlogs must stay local.## 2. Run setupDouble-click `setup-windows.bat` (or run it from PowerShell). It creates thevenv, installs the pinned dependencies (including `tzdata`, required onWindows for timezone support), and creates `.env` from the template.## 3. Webhook: created by the machine's owner, not copiedIn **their own** Bitrix24 account (not yours): Developer resources → Other →Inbound webhook. Scopes: **CRM, Users (user_brief), Tasks, Telephony, andOpen Channels + Messenger (imopenlines + im)**, nothing else. (OpenChannels/Messenger need a commercial plan; without them the chat tools justreport a missing scope.) Paste the URL into `.env` (Notepad is fine):```BITRIX_WEBHOOK_URL=https://yourcompany.bitrix24.com/rest/NNNN/token/BITRIX_LOCAL_TZ=America/Chicago```Never copy a `.env` from another machine: the webhook must belong to theperson whose computer this is. That's what keeps permissions and auditper-user.## 4. Smoke testDouble-click `smoke-test-windows.bat`. A startup line followed by silencemeans it works. Close the window to stop. If it warns about timezones,re-run `setup-windows.bat` (tzdata didn't install).## 5. Wire into Claude DesktopEdit `%APPDATA%\Claude\claude_desktop_config.json` (Win+R →`%APPDATA%\Claude` → open the file in Notepad). Note the **doublebackslashes**, which JSON requires:```json{"mcpServers": {"bitrix24": {"command": "C:\\Users\\<username>\\mcp-servers\\bitrix-mcp\\.venv\\Scripts\\python.exe","args": ["C:\\Users\\<username>\\mcp-servers\\bitrix-mcp\\server.py"]}}}```Fully quit Claude Desktop (system tray → right-click → Quit, not just the X)and reopen. The `bitrix24` tools (about 30) should appear.## 6. VerifyAsk Claude: *"How many leads are in the pipeline?"* It should return livecounts with stage names. Then confirm `logs\calls.jsonl` appeared inside theinstall folder.## Security notes (Windows-specific)- The `.env` file is protected by the Windows user account, so make sure themachine's login is the owner's own and the screen locks automatically.- BitLocker should be on (Settings → Privacy & security → Device encryption).- Rotate the webhook token quarterly, rotate it immediately on any suspectedexposure, and tell whoever administers the Bitrix24 portal.