mattrguerra/meridian-crm-mcpmainPrivate on GitHub, published here in full

README.md

Language Markdown4.2 KB90 lines

mcpb/README.md

  1. # Bitrix24 CRM: Desktop Extension (`.mcpb`)
  2. Packages `../server.py` as a one-click **desktop extension** so it can be shared
  3. with the team through **Organization settings → Connectors → Add → Custom →
  4. Desktop**, instead of hand-installing a `.env` on each machine.
  5. Why this is the better distribution path:
  6. - **The webhook secret moves to the OS keychain.** Each person enters their own
  7. webhook URL at install (`user_config.webhook_url`, `sensitive: true`); Claude
  8. Desktop stores it securely and injects it as `BITRIX_WEBHOOK_URL`. No plaintext
  9. `.env` to copy around or `chmod 600`.
  10. - **Central control.** Owners upload the bundle to the org and gate installs with
  11. the **Desktop extension allowlist** (only allowlisted extensions can be
  12. installed). That's the "deny anyone outside the org" lever.
  13. - **One-click install** for members, with a config UI for every setting.
  14. ## Runtime model (uv): why this bundle is Python-agnostic
  15. Since **v1.15.0** this extension uses the MCPB **`uv` runtime** (`server.type:
  16. "uv"`, `manifest_version: 0.4`). Dependencies are declared in
  17. [`pyproject.toml`](pyproject.toml), **not** bundled as wheels. At install/first
  18. run, the host (Claude Desktop) runs the server via:
  19. ```
  20. uv run --directory <ext-dir> src/server.py
  21. ```
  22. `uv` resolves the dependencies (including native ones like `pydantic-core`)
  23. against a **compatible Python it provisions itself**, per platform and CPU. That
  24. means:
  25. - **No pinned Python.** Works on Python `>=3.10`; there is no `cp312`-only ABI
  26. lock. uv fetches a matching interpreter if the machine doesn't have one.
  27. - **No dependence on the user's `python` being on PATH.** This is what fixes the
  28. Windows *"Server disconnected"* failures (Microsoft Store `python` stub, wrong
  29. version, or ABI mismatch).
  30. - **One universal bundle** for macOS, Windows, and Linux (Intel + ARM), ~100 KB.
  31. It can be built on any OS: no per-platform builds, no cross-fetching wheels.
  32. **Requirement:** the member's Claude Desktop must support uv-type extensions
  33. (manifest 0.4). Current app builds do, and the host provides/manages `uv`. If a
  34. machine somehow can't run the extension, the **manual install** (venv + `.env`,
  35. see the top-level README) is the fallback, with the same server.
  36. ## Build
  37. ```bash
  38. cd mcpb
  39. ./build.sh # → bitrix24-crm-<version>.mcpb (universal)
  40. ```
  41. `build.sh` copies `../server.py` → `src/server.py`, then `mcpb validate` +
  42. `mcpb pack`. [`.mcpbignore`](.mcpbignore) keeps `.venv/`, caches, docs, and old
  43. artifacts out of the package. Only `manifest.json`, `pyproject.toml`,
  44. `.mcpbignore`, `build.sh`, and this README are committed; `src/`, `.venv/`, and
  45. `*.mcpb` are build/runtime artifacts (gitignored).
  46. ### Versioning for org uploads
  47. The org rejects an upload whose `version` is not greater than what's stored
  48. (`dxt_version_not_greater`). Bump `version` in **both** `manifest.json` and
  49. `pyproject.toml`, and keep them in step with the server's `VERSION` in
  50. `../server.py`, for every upload.
  51. ## Settings exposed at install (`user_config`)
  52. | Config | Env var | Default |
  53. | ------ | ------- | ------- |
  54. | Bitrix24 Webhook URL (sensitive) | `BITRIX_WEBHOOK_URL` | – (required) |
  55. | Local timezone | `BITRIX_LOCAL_TZ` | America/Chicago |
  56. | Enable writes | `BITRIX_WRITES` | on |
  57. | Write-enabled deal funnels | `BITRIX_WRITE_FUNNELS` | `24,26,36` (categoryIds: 24 Partner Tier Upgrade, 26 Winback, 36 Quarterly Check-In Flow; names also accepted but break on rename) |
  58. | Enable contact/company writes | `BITRIX_WRITE_PARTIES` | on |
  59. | Call-log redaction mode | `BITRIX_LOG_ARGS` | redact |
  60. | Enable local transcription | `BITRIX_TRANSCRIBE` | off |
  61. | Data folder (logs + schema) | `BITRIX_DATA_DIR` | `~/.bitrix24-mcp` |
  62. Data (logs + schema snapshots) is written to `BITRIX_DATA_DIR` so it survives
  63. extension updates (the install dir is replaced on update).
  64. ## Deploy to the org
  65. 1. Build the `.mcpb` (above).
  66. 2. As an Owner/Primary Owner: **Organization settings → Connectors → Add →
  67. Custom → Desktop**, upload the `.mcpb`.
  68. 3. Turn on **Desktop extension allowlist** and add this extension so the team can
  69. install it (and only what you allow).
  70. 4. Members install it from Claude Desktop and enter **their own** webhook URL.
  71. Bump `version` in `manifest.json` and `pyproject.toml` (in step with the server)
  72. when you ship an update.