shinde-rahul/plugin-mautic-mcp
Composer 安装命令:
composer require shinde-rahul/plugin-mautic-mcp
包简介
Mautic MCP server plugin providing controlled tools for AI-assisted development, testing, support, and campaign debugging workflows.
关键字:
README 文档
README
INTRODUCTION
MauticMcpBundle is a read-only Model Context Protocol (MCP) plugin for Mautic. It exposes a small, intentional tool surface for AI-assisted development, testing, support, and campaign debugging workflows without turning the Mautic application into a broad data dump.
The bundle builds on symfony/mcp-bundle for MCP transport and tool discovery, while this plugin owns the Mautic-specific permission checks, read services, and response normalization.
Current tools:
search_contactsfetch_contactget_contact_timelinesearch_campaignsfetch_campaign
This phase is intentionally read-only.
INSTALLATION
Requirements
- PHP
^8.2 mautic/core-lib ^7.0symfony/mcp-bundle ^0.6- A local Mautic checkout with DDEV available for the recommended
stdiolauncher flow
Package metadata
- Package:
shinde-rahul/plugin-mautic-mcp - Install directory:
MauticMcpBundle
Local checkout setup
- Ensure the vendor MCP bundle is available in this checkout.
- Create or update
config/bundles_local.phpso it registers the vendor MCP bundle:
<?php $bundles[] = new Symfony\AI\McpBundle\McpBundle();
- Create or update
bin/mcp-serverwith the localstdiolauncher used by AI clients:
#!/bin/sh set -eu SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) PROJECT_ROOT=$(dirname "$SCRIPT_DIR") cd "$PROJECT_ROOT" exec ddev exec php -d memory_limit=1024M bin/console --env=dev mcp:server
- Mark the launcher executable:
chmod +x bin/mcp-server
- Reload plugins and clear cache:
php -d memory_limit=1024M bin/console --env=dev mautic:plugins:reload -n php -d memory_limit=1024M bin/console --env=dev cache:clear
CONFIGURATION
Default behavior
The plugin ships with a public /mcp route and defaults to read-only MCP access for Mautic contacts and campaigns. stdio is the primary local-client transport. HTTP can be enabled explicitly for shared or remote MCP access.
Local MCP settings
Create or update config/config_local.php if you want to override the default MCP settings or enable HTTP transport locally:
<?php $container->loadFromExtension('mcp', [ 'app' => 'mautic', 'version' => '0.1.0', 'description' => 'Local Mautic MCP server', 'instructions' => 'Read-only access to Mautic contacts and campaigns.', 'client_transports' => [ 'stdio' => true, 'http' => true, ], 'http' => [ 'path' => '/mcp', 'session' => [ 'store' => 'cache', 'cache_pool' => 'cache.mcp.sessions', 'prefix' => 'mcp_', 'ttl' => 3600, ], ], ]); $container->setParameter('mautic_mcp.allow_stdio_admin_fallback', true);
Security
Add the MCP firewall in app/config/security.php:
'mcp' => [ 'pattern' => '^/mcp(?:/|$)', 'fos_oauth' => true, 'stateless' => true, 'http_basic' => true, 'provider' => 'user_provider', 'entry_point' => 'fos_oauth_server.security.entry_point', ],
Add the MCP access-control rule before the existing ^/api rule:
['path' => '^/mcp(?:/|$)', 'roles' => AuthenticatedVoter::IS_AUTHENTICATED_FULLY],
Client setup
For client-specific setup instructions, see:
- docs/AI_CLIENT_SETUP.md for Codex, Claude Code, and Gemini CLI
- docs/REAL_WORLD_EXAMPLES.md for manual JSON-RPC, HTTP transport, and task-oriented recipes
USAGE
Local validation
Validate the stdio launcher:
./bin/mcp-server
Confirm the console command is available through DDEV:
ddev exec php -d memory_limit=1024M bin/console list mcp
HTTP validation
If you enable HTTP transport, initialize the MCP endpoint at /mcp and then list tools using the returned Mcp-Session-Id. Full request examples are documented in docs/REAL_WORLD_EXAMPLES.md.
Expected tool set:
search_contactsfetch_contactget_contact_timelinesearch_campaignsfetch_campaign
ARCHITECTURE
This bundle keeps the transport adapter thin and pushes real work into application, domain, presentation, and security layers.
For the design rationale and layer boundaries, see docs/ARCHITECTURE.md.
NOTES
- The
/mcproute comes from the plugin bundle config. - Mautic still requires manual firewall and access-control entries under
app/config. - HTTP transport is opt-in for local setups.
- Create
bin/mcp-server,config/bundles_local.php, andconfig/config_local.phpas needed for your checkout instead of assuming they already exist. - Tool payloads should be shaped through the normalizers in
Presentation/Normalizer. - Timeline access is isolated behind
TimelineProviderInterfacebecause timeline behavior can vary across branches.
AUTHOR
- Rahul Shinde
shinde-rahul/plugin-mautic-mcp 适用场景与选型建议
shinde-rahul/plugin-mautic-mcp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「mcp」 「Mautic」 「developer-tools」 「ai-tools」 「model-context-protocol」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 shinde-rahul/plugin-mautic-mcp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shinde-rahul/plugin-mautic-mcp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 shinde-rahul/plugin-mautic-mcp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The bundle for easy using json-rpc api on your project
Secure HTTP transport wrapper for MCP servers with API key auth, IP/Origin allowlisting, and rate limiting
Standardized event classes for MCP (Model Context Protocol) tool execution lifecycle
JSON Schema builder and validator for MCP tool definitions
Historical accounting for contacts
Laravel implementation of the Model Context Protocol (MCP) SDK
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 49
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-05-06