MCP Hub
Back to servers

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.

Updated
Feb 27, 2026

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

ToolDescriptionParameters
get_activity_typesGet all available activity types
get_lead_activitiesGet recent activities for a lead by IDlead_id, activity_type_ids?, days_back? (default: 7)
get_lead_activities_by_emailGet recent activities for a lead by emailemail, activity_type_ids?, days_back? (default: 7)
get_lead_changesGet data value changes for a leadlead_id, fields?, days_back? (default: 7)

Leads

ToolDescriptionParameters
get_lead_by_emailLook up a lead by email addressemail
describe_leadsGet lead field metadata and schema

Emails

ToolDescriptionParameters
get_email_by_idGet an email asset by IDemail_id
get_email_by_nameGet an email asset by namename, folder_id?
browse_emailsBrowse email assets with filteringmax_return?, offset?, status?, folder_id?, earliest_updated_at?, latest_updated_at?
get_email_contentGet content sections of an emailemail_id, status?
get_email_cc_fieldsGet fields enabled for Email CC
preview_emailGet a live preview of an emailemail_id, status?, content_type?, lead_id?

Channels

ToolDescriptionParameters
get_channelsGet available program channelsmax_return?, offset?

Folders

ToolDescriptionParameters
get_folder_by_nameGet a folder by namename
browse_foldersBrowse foldersmax_return?, offset?, folder_type?

Smart Campaigns

ToolDescriptionParameters
get_smart_campaign_by_idGet a smart campaign by IDcampaign_id
get_smart_campaign_by_nameGet a smart campaign by namename
browse_smart_campaignsBrowse smart campaigns with filteringmax_return?, offset?, is_active?, folder_id?, earliest_updated_at?, latest_updated_at?
create_smart_campaignCreate a new smart campaignname, folder_id, description?
update_smart_campaignUpdate an existing smart campaigncampaign_id, name?, description?, folder_id?
clone_smart_campaignClone a smart campaigncampaign_id, name, folder_id, description?
schedule_batch_campaignSchedule a batch campaign to runcampaign_id, run_at?, tokens?, clone_to_program?
request_campaignTrigger a campaign for specific leadscampaign_id, lead_ids?, tokens?
activate_smart_campaignActivate a smart campaigncampaign_id
deactivate_smart_campaignDeactivate a smart campaigncampaign_id
delete_smart_campaignDelete a smart campaigncampaign_id

Programs

ToolDescriptionParameters
get_program_by_idGet a program by IDprogram_id
get_program_by_nameGet a program by namename, include_tags?, include_costs?
browse_programsBrowse programs with filteringmax_return?, offset?, status?, earliest_updated_at?, latest_updated_at?
create_programCreate a new programname, folder_id, program_type, channel, description?, costs?, tags?, start_date?, end_date?
update_programUpdate an existing programprogram_id, name?, description?, costs?, costs_destructive_update?, tags?, start_date?, end_date?
clone_programClone a programprogram_id, name, folder_id, description?
approve_email_programApprove an email programprogram_id
unapprove_email_programUnapprove an email programprogram_id
delete_programDelete a program and all child contentsprogram_id

Program Members

ToolDescriptionParameters
describe_program_membersGet program member field metadata
query_program_membersQuery program members with filteringprogram_id, filter_type, filter_values, fields?, start_at?, end_at?

Tokens

ToolDescriptionParameters
get_tokens_by_folderGet tokens for a folderfolder_id, folder_type?
create_tokenCreate a new tokenfolder_id, name, token_type, value, folder_type?
update_tokenUpdate an existing tokenfolder_id, name, token_type, value, folder_type?
delete_tokenDelete a tokenfolder_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:

  1. Read-only tests — Safe, no modifications to your Marketo instance. Browses emails, campaigns, programs, folders, and looks up leads.
  2. Write-only tests — Creates, updates, clones, and deletes test assets (prefixed with MCPTEST_). Prompts for confirmation before destructive operations. Offers cleanup at the end.
  3. 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)

Reviews

No reviews yet

Sign in to write a review