Listmonk MCP

io.github.tecspda由 GitHub 账号 tecspda 发布v0.1.3更新于 Oct 30, 2026

Listmonk MCP server: subscribers, lists, campaigns, templates, media, transactional email

已验证STDIO仅桌面沟通与协作商业与电商

概览

AI 生成的概览

面向自建 Listmonk 的 MCP 服务器,让助手管理订阅者、邮件列表、活动、模板和媒体,并发送邮件。

可以做什么
  • 检查 Listmonk 健康状态与连接情况
  • 新增、更新、删除、搜索和查询订阅者,并更改其状态
  • 创建、更新、删除和查看邮件列表及其成员
  • 创建、更新、预览、立即发送或定时发送活动,并用普通替换、正则替换或批量替换编辑活动正文
  • 创建、更新、读取和删除模板,可从文件加载大型 HTML 正文
  • 用 tx 模板发送事务性邮件,并上传、重命名、列出或删除媒体
适用场景
适合自建 Listmonk 新闻邮件服务器、希望让助手处理日常列表管理、起草或修改活动、管理模板与媒体,或发送单封事务性邮件的场景,无需在管理后台逐项操作。
运行要求
作为 stdio 本地进程由 MCP 客户端启动,需要 Bun 1.1 或更高版本(通过 bunx 运行)。需要可访问的 Listmonk 地址和 API 用户,通过 LISTMONK_MCP_URL、LISTMONK_MCP_USERNAME 和 LISTMONK_MCP_PASSWORD 提供。可选的 LISTMONK_MCP_FILES_DIR 用于启用基于文件的模板与媒体工具;超时、重试和服务器名称变量为可选项。
安装前请注意
LISTMONK_MCP_PASSWORD 中的 API 令牌可访问你的邮件列表数据;应使用权限受限的专用 API 用户而非管理员账号,并避免把令牌写入共享或提交到版本库的配置文件。send_campaign、schedule_campaign 和 send_transactional_email 会发送真实邮件,请保持人工审批。从 Listmonk 读取的订阅者名称和活动正文可能含提示注入;文件工具仅限 LISTMONK_MCP_FILES_DIR,未设置时禁用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Listmonk MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Listmonk MCP Server

[Listmonk MCP Server]

An MCP server for Listmonk, the self-hosted newsletter and mailing list manager. It lets AI agents (Claude Code, Claude Desktop, Cursor, Cline, VS Code and others) manage subscribers, mailing lists, campaigns, templates and media, and send transactional email through your Listmonk instance.

TypeScript port of rhnvrm/listmonk-mcp by Rohan Verma, extended with file-based templates, campaign body editing and hardened file access.

Written in TypeScript, runs on Bun.

Русская версия

Features

  • Subscribers: add, update, delete, change status, search with Listmonk SQL queries, look up by ID or email.
  • Mailing lists: create, update, delete, list, list members.
  • Campaigns: create, update, preview, send now, schedule. Edit the body with plain-text, regex and batch replace.
  • Templates: create, update, delete, read. Large HTML bodies (for example MJML exports) can be loaded straight from a file.
  • Transactional email: send a tx template to one recipient with custom data.
  • Media: upload, rename, delete, list.

Requirements

  • Bun 1.1 or newer.
  • Listmonk with an API user. In the Listmonk admin, open Users, create a user of type API and copy its token. Give it a role with only the permissions the agent needs.

Quick start

One-click install (then replace the placeholder URL, user and token in the client's MCP settings):

[Install in Cursor] [Install in VS Code]

Claude Code

bash
claude mcp add --transport stdio --scope user \  --env LISTMONK_MCP_URL=https://listmonk.example.com \  --env LISTMONK_MCP_USERNAME=api_user \  --env LISTMONK_MCP_PASSWORD=your-api-token \  listmonk -- bunx listmonk-mcp-ts

Claude Desktop, Cursor, Cline and other clients

Add the server to the client's MCP config (mcpServers section):

json
{  "mcpServers": {    "listmonk": {      "command": "bunx",      "args": ["listmonk-mcp-ts"],      "env": {        "LISTMONK_MCP_URL": "https://listmonk.example.com",        "LISTMONK_MCP_USERNAME": "api_user",        "LISTMONK_MCP_PASSWORD": "your-api-token",        "LISTMONK_MCP_FILES_DIR": "/path/to/email-templates"      }    }  }}

Where the config file lives for each client: Claude Desktop, Cursor and Windsurf, Cline, VS Code.

The server is started by the client when a session opens and stops with it. You do not need to keep it running.

Configuration

VariableRequiredDefaultDescription
LISTMONK_MCP_URLyesListmonk base URL, http:// or https://
LISTMONK_MCP_USERNAMEyesAPI user name
LISTMONK_MCP_PASSWORDyesAPI user token
LISTMONK_MCP_FILES_DIRnoDirectory the file tools may read from. File tools are disabled when it is not set
LISTMONK_MCP_TIMEOUTno30HTTP timeout, seconds
LISTMONK_MCP_MAX_RETRIESno3Retries on network errors. Only GET requests are retried
LISTMONK_MCP_SERVER_NAMEnoListmonk MCP ServerServer name reported to the client

Variables can also come from a .env file in the working directory, or from a file passed with --config /path/to/.env.

CLI options: -c, --config <file> loads an env file, -v, --version prints the version.

Tools

AreaTools
Healthcheck_listmonk_health
Subscribersadd_subscriber, update_subscriber, remove_subscriber, change_subscriber_status, list_subscribers, get_subscriber_by_id, get_subscriber_by_email
Mailing listsget_mailing_lists, get_list_by_id, get_list_subscribers_tool, create_mailing_list, update_mailing_list, delete_mailing_list
Campaignsget_campaigns, get_campaign, get_campaign_preview, create_campaign, update_campaign, send_campaign, schedule_campaign
Campaign bodyreplace_in_campaign_body, regex_replace_in_campaign_body, batch_replace_in_campaign_body
Templatesget_templates, get_template, create_template, update_template, create_template_from_file, update_template_from_file, delete_template
Transactionalsend_transactional_email
Mediaget_media_list, upload_media_file, rename_media, delete_media_file

Templates from a file

Passing a large HTML body inline through a tool call is slow and the model can change it while copying. create_template_from_file and update_template_from_file read the body from a file instead, so the stored template matches the file byte for byte. subject is required for tx templates.

The file path can be absolute or relative to LISTMONK_MCP_FILES_DIR.

Security

  • File access is limited to LISTMONK_MCP_FILES_DIR. create_template_from_file, update_template_from_file and upload_media_file refuse any path outside it, symlinks included, and are disabled when it is not set. Subscriber names, campaign bodies and other data read from Listmonk may contain instructions written by strangers (prompt injection). Without this limit such text could make the agent read ~/.ssh or .env and email it out.
  • Keep approval on for sending tools. send_campaign, schedule_campaign and send_transactional_email send real email. Do not auto-approve them in your client.
  • Use a dedicated API user with a role limited to what the agent needs, not an admin account.
  • Keep the token out of shared files. If your MCP config is committed or synced, pass the token through the environment instead.

Development

bash
git clone https://github.com/tecspda/listmonk-mcp-ts.gitcd listmonk-mcp-tsbun installcp .env.example .env   # fill in your Listmonk detailsbun run start          # run the serverbun run dev            # run with reload on changebun run check          # type checkbun test               # tests

To run a local checkout from an MCP client, use "command": "bun", "args": ["run", "/path/to/listmonk-mcp-ts/src/index.ts"].

Need a Listmonk instance for testing? See Docker setup.

License

MIT

来源:README.md,提交 756dcf6

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

2
  1. v0.1.3最新Oct 29, 2026
  2. v0.1.1Oct 21, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分