Add MCP server for the public API#355
Merged
Merged
Conversation
Introduce mcp-server/ — a stdio Model Context Protocol server that wraps the /api/v1 public API so MCP clients (Claude, Cursor, etc.) can drive a self-hosted wacrm instance in natural language. - Thin wrapper over the existing REST API; all auth, scoping, and rate limiting stay server-side. No new backend surface. - Read-only by default: write and broadcast tools are only registered when WACRM_ENABLE_WRITES / WACRM_ENABLE_BROADCASTS are set, layered on top of the API key's own scopes. send_broadcast also requires an explicit confirm and is marked destructive. - Registry-ready: server.json manifest, package.json mcpName linked to it (io.github.arnasdon/wacrm-mcp), and glama.json for discovery. - Docs: docs/mcp.md + README bullet + mcp-server/README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
mcp-server/— a stdio Model Context Protocol server that wraps the existing/api/v1public API, so MCP clients (Claude Desktop, Claude Code, Cursor, …) can drive a self-hosted wacrm instance in natural language.It's a thin adapter: all auth, scoping, and rate limiting stay server-side in the CRM. No new backend surface.
Tools
whoami,list_contacts,get_contact,list_conversations,get_conversation,list_messages,get_broadcast.WACRM_ENABLE_WRITES):send_message,create_contact,update_contact.WACRM_ENABLE_BROADCASTS):send_broadcast.Safety model (three layers)
Sending WhatsApp through an LLM is a real side effect, so:
forbidden). A read-only key + read-only config physically cannot send.send_broadcastrequiresconfirm: trueand is markeddestructive.Registry-ready
server.jsonmanifest +package.jsonmcpName(io.github.arnasdon/wacrm-mcp) linked for official MCP-registry validation.glama.jsonfor Glama discovery.Docs
docs/mcp.md(product) + README bullet +mcp-server/README.md(client config, tool table, safety model).Verification
npm run build/typecheckclean (SDK 1.29.0).forbiddenrendered cleanly, broadcast confirm-guard blocksconfirm:false.🤖 Generated with Claude Code