Marketo MCP Server
An MCP server that exposes Adobe Marketo REST API operations as tools for AI assistants and MCP clients. It enables comprehensive management of Marketo assets including leads, activities, emails, smart campaigns, and programs.
README
Marketo MCP Server
An MCP (Model Context Protocol) server that exposes Adobe Marketo REST API operations as tools. Built with FastMCP, it allows AI assistants and MCP clients to interact with your Marketo instance.
Prerequisites
- Python 3.10+
- A Marketo instance with API access (client ID, client secret, and REST API base URL)
Setup
1. Clone the repository
git clone <repo-url>
cd MarketoMCP
2. Create a virtual environment and install dependencies
python -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt
3. Configure environment variables
Copy the template and fill in your Marketo API credentials:
cp .env_template .env
Edit .env with your values:
MARKETO_CLIENT_ID="your-client-id"
MARKETO_CLIENT_SECRET="your-client-secret"
MARKETO_BASE_URL="https://your-instance.mktorest.com"
You can find these in Marketo Admin > LaunchPoint (for client ID/secret) and Admin > Web Services (for the REST API base URL).
4. Start the server
python mcp_server.py
The server starts on http://0.0.0.0:8000 using the Streamable HTTP transport. The MCP endpoint is available at http://localhost:8000/mcp.
Available Tools
Activities
| Tool | Description | Parameters |
|---|---|---|
get_activity_types |
Get all available activity types | — |
get_lead_activities |
Get recent activities for a lead by ID | lead_id, activity_type_ids?, days_back? (default: 7) |
get_lead_activities_by_email |
Get recent activities for a lead by email | email, activity_type_ids?, days_back? (default: 7) |
get_lead_changes |
Get data value changes for a lead | lead_id, fields?, days_back? (default: 7) |
Leads
| Tool | Description | Parameters |
|---|---|---|
get_lead_by_email |
Look up a lead by email address | email |
describe_leads |
Get lead field metadata and schema | — |
Emails
| Tool | Description | Parameters |
|---|---|---|
get_email_by_id |
Get an email asset by ID | email_id |
get_email_by_name |
Get an email asset by name | name, folder_id? |
browse_emails |
Browse email assets with filtering | max_return?, offset?, status?, folder_id?, earliest_updated_at?, latest_updated_at? |
get_email_content |
Get content sections of an email | email_id, status? |
get_email_cc_fields |
Get fields enabled for Email CC | — |
preview_email |
Get a live preview of an email | email_id, status?, content_type?, lead_id? |
Channels
| Tool | Description | Parameters |
|---|---|---|
get_channels |
Get available program channels | max_return?, offset? |
Folders
| Tool | Description | Parameters |
|---|---|---|
get_folder_by_name |
Get a folder by name | name |
browse_folders |
Browse folders | max_return?, offset?, folder_type? |
Smart Campaigns
| Tool | Description | Parameters |
|---|---|---|
get_smart_campaign_by_id |
Get a smart campaign by ID | campaign_id |
get_smart_campaign_by_name |
Get a smart campaign by name | name |
browse_smart_campaigns |
Browse smart campaigns with filtering | max_return?, offset?, is_active?, folder_id?, earliest_updated_at?, latest_updated_at? |
create_smart_campaign |
Create a new smart campaign | name, folder_id, description? |
update_smart_campaign |
Update an existing smart campaign | campaign_id, name?, description?, folder_id? |
clone_smart_campaign |
Clone a smart campaign | campaign_id, name, folder_id, description? |
schedule_batch_campaign |
Schedule a batch campaign to run | campaign_id, run_at?, tokens?, clone_to_program? |
request_campaign |
Trigger a campaign for specific leads | campaign_id, lead_ids?, tokens? |
activate_smart_campaign |
Activate a smart campaign | campaign_id |
deactivate_smart_campaign |
Deactivate a smart campaign | campaign_id |
delete_smart_campaign |
Delete a smart campaign | campaign_id |
Programs
| Tool | Description | Parameters |
|---|---|---|
get_program_by_id |
Get a program by ID | program_id |
get_program_by_name |
Get a program by name | name, include_tags?, include_costs? |
browse_programs |
Browse programs with filtering | max_return?, offset?, status?, earliest_updated_at?, latest_updated_at? |
create_program |
Create a new program | name, folder_id, program_type, channel, description?, costs?, tags?, start_date?, end_date? |
update_program |
Update an existing program | program_id, name?, description?, costs?, costs_destructive_update?, tags?, start_date?, end_date? |
clone_program |
Clone a program | program_id, name, folder_id, description? |
approve_email_program |
Approve an email program | program_id |
unapprove_email_program |
Unapprove an email program | program_id |
delete_program |
Delete a program and all child contents | program_id |
Program Members
| Tool | Description | Parameters |
|---|---|---|
describe_program_members |
Get program member field metadata | — |
query_program_members |
Query program members with filtering | program_id, filter_type, filter_values, fields?, start_at?, end_at? |
Tokens
| Tool | Description | Parameters |
|---|---|---|
get_tokens_by_folder |
Get tokens for a folder | folder_id, folder_type? |
create_token |
Create a new token | folder_id, name, token_type, value, folder_type? |
update_token |
Update an existing token | folder_id, name, token_type, value, folder_type? |
delete_token |
Delete a token | folder_id, name, token_type, folder_type? |
Parameters marked with
?are optional.
Testing
Two test suites are provided — one tests the Marketo functions directly, the other tests through the MCP server protocol.
Test the underlying functions directly
This calls marketo_functions.py without the MCP layer. Requires a valid .env configuration.
python test_marketo_functions.py
Test via the MCP server
This connects to the running MCP server as an MCP client. Start the server first, then run the tests in a separate terminal.
# Terminal 1 - start the server
python mcp_server.py
# Terminal 2 - run the tests
python test_mcp_server.py
Test modes
Both test scripts offer three modes when run:
- Read-only tests — Safe, no modifications to your Marketo instance. Browses emails, campaigns, programs, folders, and looks up leads.
- Write-only tests — Creates, updates, clones, and deletes test assets (prefixed with
MCPTEST_). Prompts for confirmation before destructive operations. Offers cleanup at the end. - Full tests — Runs read-only tests followed by write tests.
Test configuration
Test inputs (email addresses, folder IDs, campaign names, etc.) are saved to test_config.json after the first run so you don't have to re-enter them. Delete or edit this file to reset test inputs.
Project Structure
MarketoMCP/
├── mcp_server.py # MCP server — registers tools with FastMCP
├── marketo_functions.py # Marketo REST API wrapper functions
├── test_mcp_server.py # MCP protocol-level test suite
├── test_marketo_functions.py # Direct function test suite
├── test_config.json # Saved test inputs (auto-generated)
├── requirements.txt # Python dependencies
├── .env_template # Environment variable template
└── .env # Your credentials (not committed)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。