Skip to content
MCP server

Messaging Rules

Checks whether a business may message a person now on WhatsApp, Instagram, Messenger

Runs locally

Messaging Rules is an open-source MCP server for communication. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
API, CLI, Self-hosted
Runs
Locally
What it can do
Read-only
Version
0.1.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add messaging-rules -- npx -y messaging-rules

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "messaging-rules": {
      "command": "npx",
      "args": [
        "-y",
        "messaging-rules"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "messaging-rules": {
      "command": "npx",
      "args": [
        "-y",
        "messaging-rules"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "messaging-rules": {
      "command": "npx",
      "args": [
        "-y",
        "messaging-rules"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "messaging-rules": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "messaging-rules"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add messaging-rules -- npx -y messaging-rules

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.messaging-rules]
command = "npx"
args = ["-y", "messaging-rules"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "messaging-rules": {
      "command": "npx",
      "args": [
        "-y",
        "messaging-rules"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user messaging-rules npx -- -y messaging-rules

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "messaging-rules": {
          "command": "npx",
          "args": [
            "-y",
            "messaging-rules"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Messaging Rules

Messaging platforms restrict when a business can send a message, based on when the person last wrote in and which message type is used. This package turns those timing and size rules into structured data that code, or an AI assistant, can query before a message goes out.

A check takes the channel, the time of the last inbound message and the kind of message planned, then returns whether it is allowed, when the window closes and which alternatives would be accepted instead. A separate validator tests a draft's text, captions, attachments and buttons against documented limits.

Each rule carries the official platform page it came from, a short quote and the date it was verified. It is published as an npm package and a Python port, and it can be run as a stdio MCP server with three tools. Opt-in status and app permissions are not checked and are returned as conditions for the caller to confirm.

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, all 3 tools only read data.

From the server's own tool labels and tool names; not verified by us.

check_messaging_windowName suggests: reads
May this sender send this kind of message on this channel now? Returns allowed, reason, windowEndsAt, conditions, allowedAlternatives, sources.
validate_messageName suggests: reads
Checks a draft's text, caption, attachments, media size and type and button limits.
get_channel_rulesName suggests: reads
Returns the full source-cited rules for a channel, one section, or a summary of all channels.

What it does

Messaging window check
Determines whether a free-form or tagged message is allowed on a channel at a given moment.
Draft validation
Checks text length, caption, attachment type and size, and button limits against documented values.
Source-cited rules
Every value links to the official platform page it was read from, with a quote and verification date.
MCP server
Exposes window checks, draft validation and channel rules as tools for AI clients over stdio.
TypeScript and Python libraries
Provides the same logic in both languages, with the rule data bundled and no network calls needed.

Good for

  • Blocking free-form WhatsApp replies sent after the 24-hour customer service window
  • Choosing a valid Instagram or Messenger tag for a reply sent days after the last message
  • Validating media size and text length before a message is queued
  • Giving an AI agent a pre-send check for outbound messages

Pricing

Open source

Free and MIT licensed; no paid plan listed.

Messaging Rules FAQ

Does Messaging Rules send messages?

No. It only answers whether a message is allowed and whether a draft fits documented limits.

Can Messaging Rules confirm the user opted in?

No. Opt-in, app permissions and recipient settings are returned as conditions for the caller to check.

How is Messaging Rules used with AI clients?

It runs as a stdio MCP server started with npx, using the messaging-rules-mcp command, and needs no network access or keys.

Is Messaging Rules free?

Yes. Messaging Rules is open source, so you can use and self-host it for free.

How do I add Messaging Rules to Claude Code?

Run this command in your terminal: claude mcp add messaging-rules -- npx -y messaging-rules

What are the best alternatives to Messaging Rules?

The closest alternatives to Messaging Rules are SMS and WhatsApp Messaging, Messaging MCP, WhatsApp MCP, WizMessage and Markdown To Whatsapp.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers