Skip to content

Releases

v0.10.0

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 04 Dec 04:04

Added

  • 15 core support-bot tools: account agent bot list/get/update and inbox assign/remove; internally paginated chronological transcript (latest 1-1000 messages, 20 s total time budget, default approximate PII masking, delivery status and content_attributes.external_error per message); account message search; dashboard app list/create/update/delete; confined attachment download/upload (private note by default); CSAT responses and metrics. Contracts and version evidence. 115 core / 171 total tools.
  • MCP read/write annotations on all tools (destructiveHint only for deletes, sends to a customer and customer-facing configuration); MCP_READ_ONLY enforced in the existing gate and registry. OAuth stays closed: no new tool exposed by default and private_only still refuses every write except send_message.
  • MCP_ATTACHMENTS_DIR opt-in and MCP_ATTACHMENT_MAX_BYTES; files are isolated per account (<dir>/<account_id>/, created 0700; download and send only touch the call's account directory), direct-child confinement, symlink/hard-link checks, no overwrite, byte limits (a Content-Length over the cap is refused up front and streaming stops at the cap). Downloads follow at most 3 redirects by hand (ActiveStorage), each only to the CHATWOOT_BASE_URL origin, the optional MCP_ATTACHMENT_PUBLIC_ORIGIN (internal base URL with public links; the destination is built from path and query on a fixed base URL, //host and backslash paths are rejected and every hop is revalidated) or a host in MCP_ATTACHMENT_STORAGE_HOSTS (S3/CDN, empty by default); no API token or auth header is ever sent.
  • MCP_ALLOW_PRIVATE_URLS: agent bot outgoing_url (update_agent_bot, enterprise_create_agent_bot, enterprise_update_agent_bot, which share one client method, and platform_create_agent_bot/platform_update_agent_bot; MCP_PLATFORM_SAFE_MODE is unchanged) and dashboard app URLs reject loopback, link-local, private-range and internal hosts (localhost, 169.254.169.254, 10.x, single-label names, ...) unless this variable is true. Names are also resolved (A and AAAA, 3 s) and rejected if they resolve to such an address (127.0.0.1.nip.io) or cannot be resolved; this is a partial defense (Chatwoot makes the request and DNS can change afterwards). A slow DNS can reject legitimate URLs after 3 s: MCP_ALLOW_PRIVATE_URLS=true is the way out (it disables every check). MCP_ATTACHMENT_STORAGE_HOSTS entries are normalized like URLs (host:443 matches https://host/) and invalid ones stop the server at startup. MCP_TRANSCRIPT_TIME_BUDGET_MS tunes the transcript budget.
  • Plugin 0.2.0: strict read-only bot diagnostics with conversation/time handoff to n8n; updated search and reports skills. Build supports new non-ignored skills and an external output directory; no real app ID or distributable is retained.

Changed

  • Behavior change: set_conversation_custom_attributes now merges by default (merge: true): it reads the conversation's current custom_attributes, merges the received top-level keys on top and writes the result. The merge is shallow: a nested object you send replaces the existing nested object entirely. If the read does not return a custom_attributes object nothing is written, and an empty input with merge: true is rejected (to clear all attributes pass merge: false). This is a client-side read-modify-write, not atomic (a concurrent write between the read and the write can be lost). Callers that relied on omitting keys to delete them must now pass merge: false, which keeps the previous replace behavior. Chatwoot 4.13 replaces the whole hash on POST and ignores a merge parameter.
  • list_webhooks returns the same fields as before plus has_secret (true/false, null if the API omits it); the secret value is never returned. Webhook secret rotation is not implemented: no verified API route.
  • Credential filtering also strips token, api_token, api_access_token, refresh_token, client_secret, authorization, cookie(s), credentials and password fields and compares field names without case, - and _ (apiAccessToken, HMACToken). In text, URLs are parsed: the whole userinfo password (even with @) and the value of query/fragment parameters whose decoded, normalized name is access_token, api_access_token, api_key, apikey, secret, password or hmac_token become [redacted], never the path; every other URL (signed storage URLs, SSO links, articles) is returned unchanged. Best effort for URLs (the strong guarantee is by field name): a URL in text ends at whitespace, quotes, <> or a backslash, closing punctuation is not trimmed from credential values, and strings that are JSON (even serialized several times) are sanitized as structures and re-serialized only if something changed, so valid JSON stays valid.
  • MCP_SAFE_MODE (30 tools blocked in total): of the new writes it blocks set_inbox_agent_bot and create_dashboard_app/update_dashboard_app/delete_dashboard_app (their URL receives conversation context). update_agent_bot and enterprise_update_agent_bot share one policy, evaluated on the keys present (null included): name/description edits and outgoing_url: "" stay allowed, any other key or outgoing_url value (which redirects every message of the bot's inboxes) is blocked. remove_inbox_agent_bot stays available to stop a bot that answers twice.
  • Search inbox/date filters require advanced_search and may be ignored upstream; CSAT sent-survey totals only honor date filters.

Fixed

  • Logs now show the name, message (truncated) and status code of errors instead of {} (for example the MCP SDK rejecting a client probe). The stack, request config and response body are never logged.

v0.9.0

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 03 Dec 07:02

Added

  • Optional OAuth listener for claude.ai and ChatGPT. A second listener (OAUTH_PORT) in the same process accepts only OAuth 2.1 access tokens (JWT, verified with jose: issuer, audience, typ: at+jwt, algorithm, exp/iat/nbf, scope, subject and client allowlists, signing keys from a cached JWKS). The existing listener (PORT) keeps accepting only AUTH_TOKEN, and neither accepts the other's credentials. Closed by default: it exists only when OAUTH_* variables are set, and an incomplete or invalid configuration aborts startup before any port is opened.
  • OAUTH_ISSUER, OAUTH_JWKS_URL, OAUTH_RESOURCE, OAUTH_SCOPE, OAUTH_ALLOWED_SUBJECTS, OAUTH_ALLOWED_CLIENT_IDS, OAUTH_ALLOWED_TOOLS, OAUTH_ALLOWED_ACCOUNTS, OAUTH_PORT, OAUTH_JWT_ALGORITHMS and OAUTH_MESSAGE_MODE. The OAuth tool profile is pure configuration (validated at startup against the registered tools; public_*, platform_* and create_conversation can never be exposed over OAuth because the account and message rules cannot be enforced on them, and private_only refuses every write tool other than send_message); the account allowlist applies to every call and filters get_profile; OAUTH_MESSAGE_MODE limits send_message to private notes (default) or allows outgoing replies, and incoming messages are always rejected there.
  • OAuth listener hardening: stateless MCP per request, JSON only with a 64 KiB body limit, no Origin, one Authorization header, Cache-Control: no-store, request/header timeouts, a per-subject rate limit (120 requests per minute), protected resource metadata and WWW-Authenticate challenges, and a JSON audit trail on stderr (identity, tool, result and non-sensitive identifiers; never message text or other arguments).
  • Input hardening on every transport: before dispatch, numeric IDs (account_id, *_id, before, after, in_reply_to, ID arrays) must be positive safe integers (digit-only strings are accepted and coerced), string path segments (portal_id, inbox_identifier, contact_identifier) must be safe tokens (assignee_id/team_id still accept 0 to remove an assignment; enum values are left to Chatwoot). The API clients also refuse paths with dot segments or query markers and percent-encode string path segments.
  • A single authorization gate shared by every listener decides which tools exist (enabled buckets, plus the OAuth allowlist) for both tools/list and tools/call.

Security

  • HTTP mode ran Enterprise and Help Center tools even when those buckets were disabled (MCP_ENABLE_ENTERPRISE / MCP_ENABLE_HELP_CENTER were only honored for listing). Disabled buckets are now neither listed nor callable in HTTP mode, as in STDIO mode.
  • HTTP mode without AUTH_TOKEN was open to anyone. It now refuses to start unless AUTH_TOKEN is set, or MCP_HTTP_ALLOW_NO_AUTH=true is set explicitly (a warning is logged). STDIO mode is unaffected. Breaking for HTTP deployments that relied on running without AUTH_TOKEN.
  • Debug logs no longer include tool arguments (they could contain message text and contact data); only the tool name is logged.

v0.8.1

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 03 Dec 05:21

Fixed

  • HTTP mode: every response now sends Cache-Control: no-store (health, MCP, 401/404 and body-parser errors), so a CDN in front of the server can no longer cache /health or error pages. SSE streams keep the MCP SDK's no-cache, no-transform.

CI

  • Image builds time out after 20 minutes and run one at a time per ref (a newer main build supersedes an older one; tag builds are never cancelled).

v0.8.0

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 03 Dec 02:59

Changed

  • BREAKING — list tools return a compact summary by default (≈ 73–93 % fewer tokens; list_conversations 32.7k → 4.4k tokens for 25 conversations): list_conversations, filter_conversations, get_contact_conversations, list_company_conversations, filter_company_conversations, list_contacts, search_contacts, filter_contacts, list_company_contacts, search_company_contacts, list_inboxes. Pagination meta is preserved. Pass verbose: true for the full Chatwoot object. This changes the default response shape: clients that read fields such as messages, meta.sender, contact_inboxes[].inbox or working_hours must pass verbose: true, or set the new MCP_DEFAULT_VERBOSE=true to keep the 0.7.x output. limit marks truncated pages with a limited field.
  • All tool responses are compact JSON (no indentation), in every bucket.
  • filter_conversations, filter_contacts and filter_company_conversations now document the filter item schema (attribute_key, filter_operator enum, values, query_operator enum).

Added

  • get_guide: short read-only usage guides (multi-account, filters, pagination, reports, safe mode, workflows).
  • count_conversations: conversation counts grouped by status (optionally per inbox), inbox or age in calendar days, read from Chatwoot meta counts without downloading conversations. Flags inconsistent bucket sums.
  • MCP_DEFAULT_VERBOSE env var.
  • limit on the list tools above; before/after message paging on list_messages.
  • 100 core tools, 156 in total.

Documentation

  • README: "How it looks" screenshots (setup, multi-account, safety) generated from the real server against demo data; client setup for Claude Code, Claude Desktop and remote HTTP; distribution note (GHCR or source, not npm); credential filtering and updated safe-mode counts.
  • package.json is marked "private": true to prevent accidental publishing to npm, where the mcp-chatwoot name belongs to an unrelated package.

v0.7.0 — Chatwoot 4.20 coverage, credential sanitization

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 02 Dec 21:12

Added

  • Companies (CRM), 14 core tools: list_companies, search_companies, get_company, create_company, update_company, delete_company, delete_company_custom_attributes, list_company_contacts, search_company_contacts, add_company_contact, remove_company_contact, list_company_conversations, filter_company_conversations, list_company_notes. Requires the companies feature on the Chatwoot account.
  • list_message_templates: WhatsApp message templates of an inbox, with an optional name filter.
  • get_conversation_unread_counts and delete_conversation_custom_attributes.
  • Help Center: helpcenter_bulk_update_articles_status, helpcenter_bulk_update_articles_category, helpcenter_bulk_delete_articles, helpcenter_remove_portal_locale.
  • New optional params: sort_by on list_conversations and filter_conversations; in_reply_to on send_message; q, types, since, until and sort on enterprise_list_audit_logs.
  • MCP_SAFE_MODE now also blocks delete_company, delete_company_custom_attributes, remove_company_contact, delete_conversation_custom_attributes, helpcenter_bulk_delete_articles and helpcenter_remove_portal_locale (26 tools in total).
  • Aligned with Chatwoot v4.20.3. 154 tools in total.

Security

  • Tool responses are now sanitized before reaching the MCP client: credential fields are removed at any depth in every bucket (fixes #3). Covered keys: provider_config, hmac_token, webhook_verify_token, auth_token, api_key, api_key_secret, imap_password, smtp_password, callback_auth_password, business_management_token, secret, otp_secret, access_token, pubsub_token (see src/utils/sanitize.ts).
    • Behavior change: tools that previously returned an access_token or webhook/bot secret (e.g. get_profile, Platform agent bot/user tools, list_webhooks) no longer include it. Retrieve credentials from the Chatwoot dashboard instead.
  • Updated dependencies to clear all npm audit advisories:
    • @modelcontextprotocol/sdk: 1.29.0 → 1.32.2
    • axios: 1.16.0 → 1.22.0
    • express: 5.x → 5.3.0
    • zod: 3.x → 4.6.7 (peer of the MCP SDK; not imported directly)

Changed

  • The repository moved to the serversmx organization. The Docker image is now published as ghcr.io/serversmx/mcp-chatwoot; the old ghcr.io/renatoascencio/mcp-chatwoot no longer receives updates.
  • Images are built on GitHub-hosted runners for linux/amd64 and linux/arm64.
  • New CI workflow runs lint, build and tests on Node 20 and 22 for every PR.
  • Multi-account mode is easier to discover: the account_id descriptions, get_profile and the missing-account error point to get_profile, which lists the accounts the token can access.

Fixed

  • get_profile now calls the root-level /api/v1/profile endpoint instead of the non-existent account-scoped path (fixes #2).
  • get_conversation_counts now uses /conversations/meta (the previous /conversations/counts route does not exist in Chatwoot).
  • set_conversation_priority with none now sends null, which is what Chatwoot expects to clear the priority.
  • The server reports its real version (read from package.json) instead of a hardcoded value.

Upgrading

  • Docker image: ghcr.io/serversmx/mcp-chatwoot:0.7.0 (multi-arch).
  • Tool outputs no longer include credentials (access_token, secret, provider_config, …). If an integration relied on reading them through the MCP, get them from the Chatwoot dashboard instead.

v0.6.1

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 06 May 20:07

Changed

  • Updated dependencies:
    • `@modelcontextprotocol/sdk`: 1.26.0 → 1.29.0
    • `axios`: 1.13.5 → 1.16.0
    • `vitest`: 4.0.18 → 4.1.5
    • `nock`: 14.0.11 → 14.0.14
    • `@types/node`: 22.19.11 → 22.19.17

Internal

  • Untracked `CLAUDE.md` (local-only AI assistant instructions)
  • Build verified clean with TypeScript 5.9.3

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@RenatoAscencio RenatoAscencio released this 17 Feb 06:17

Summary

tvplus-mcp-chatwoot v0.6.0 expands from 81 to 133 MCP tools organized in 5 modular API buckets. Each bucket is opt-in with environment flags and has independent safety controls.

Buckets

Bucket Tools Enable Flag Auth Safe Mode
Core 81 Always on CHATWOOT_API_TOKEN MCP_SAFE_MODE (14 blocked)
Public 12 MCP_ENABLE_PUBLIC_API=true inbox_identifier N/A
Platform 17 MCP_ENABLE_PLATFORM_API=true CHATWOOT_PLATFORM_API_TOKEN MCP_PLATFORM_SAFE_MODE (11 blocked)
Enterprise 8 MCP_ENABLE_ENTERPRISE=true CHATWOOT_API_TOKEN MCP_SAFE_MODE (3 blocked)
Help Center 15 MCP_ENABLE_HELP_CENTER=true CHATWOOT_API_TOKEN MCP_SAFE_MODE (3 blocked)

What's New

New API Buckets

  • Public API (12 tools): Widget/client-facing endpoints — contacts, conversations, messages using inbox_identifier auth
  • Platform API (17 tools): Super-admin operations — accounts, users, global agent bots. Uses separate CHATWOOT_PLATFORM_API_TOKEN
  • Enterprise (8 tools): Audit logs, reporting events, account-scoped agent bots
  • Help Center (15 tools): Portal, article, and category management for knowledge bases

Safety & Guardrails

  • MCP_SAFE_MODE=true: Blocks 20 destructive tools across core, enterprise, and help center buckets
  • MCP_PLATFORM_SAFE_MODE=true (default ON): Blocks all 11 platform write/delete operations. Only read operations allowed by default
  • All blocked error messages include: tool name, flag, and how to unblock

Testing

  • 240 tests across 9 test files (up from 169 in v0.5.0)
  • Exhaustive safe mode guardrail tests for all 31 blocked tools
  • Tool registration tests: counts, uniqueness, naming conventions, schema validity
  • HTTP-level mocking with Vitest + nock

Documentation

  • docs/SCOPE.md — Complete tool inventory for all 5 buckets
  • docs/PLATFORM_SECURITY.md — Security guide with deployment examples
  • docs/ENTERPRISE.md — Enterprise endpoints documentation
  • .env.example — All flags documented
  • scripts/smoke/live-smoke.ts — Read-only live smoke test (npm run smoke:live)

Upgrade Guide

No breaking changes — fully backward compatible

Existing setups (core-only) work without changes. New buckets are disabled by default.

New environment variables

# Optional buckets (all default to false/disabled)
MCP_ENABLE_PUBLIC_API=true
MCP_ENABLE_PLATFORM_API=true
CHATWOOT_PLATFORM_API_TOKEN=your-platform-token  # Required if platform enabled
MCP_PLATFORM_SAFE_MODE=true                      # Default ON — blocks writes
MCP_ENABLE_ENTERPRISE=true
MCP_ENABLE_HELP_CENTER=true

Security

  • Platform API uses a separate token (CHATWOOT_PLATFORM_API_TOKEN) distinct from the application token
  • Platform Safe Mode is ON by default — only read operations allowed until explicitly disabled
  • MCP_SAFE_MODE blocks destructive operations across core, enterprise, and help center
  • No secrets in logs, commits, or release artifacts
  • See PLATFORM_SECURITY.md for detailed security guide

Full Changelog: v0.2.0...v0.6.0