Skip to main content
Glama
Mohit4022-cloud

Marketing Automation MCP Server

마케팅 자동화 MCP 서버

marketing-automation-mcp는 결정론적 캠페인 보고, 공급자 기반 예산 최적화, 문구 생성 및 데모용 타겟 세분화를 위한 Python MCP 서버입니다.

이 저장소는 이제 임시 설정보다 재현성을 우선시합니다:

  • 지원되는 Python: 3.12 및 3.13

  • 로컬 부트스트랩: uv

  • 기본 MCP 전송: stdio

  • 로컬 Python 3.14.x는 호환성 작업으로 간주되며, 지원되는 기준이 아닙니다.

현재 범위

이 저장소의 공개 MCP 계약은 의도적으로 좁게 설정되어 있습니다:

  • generate_campaign_report

  • optimize_campaign_budget

  • create_campaign_copy

  • analyze_audience_segments

현재 지원되는 서버 인터페이스에는 이 네 가지 도구만 포함됩니다. src/tools/ 하위의 다른 모듈은 내부용 또는 향후 구현 예정인 코드 경로로 존재하며, 프로덕션 MCP 기능으로 취급해서는 안 됩니다.

Related MCP server: Google Ads MCP Server

실행 모드

  • DEMO_MODE=true 데모 및 계약 테스트를 위한 결정론적 샘플 데이터를 반환합니다.

  • DEMO_MODE=false 실제 플랫폼 자격 증명과 선택된 AI 공급자를 사용합니다. 라이브 종속성이 누락된 경우, 조작된 출력 대신 구조화된 blocked 응답을 반환합니다.

클린 머신 설정

uv sync --python 3.13 --extra dev
cp .env.example .env
uv run python -m compileall src tests dashboard
uv run pytest

pip 폴백이 필요한 경우:

python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

서버 실행

지원되는 전송 모드에서 MCP 서버를 시작합니다:

uv run python -m src.server

서버는 현재 stdio 전송만 문서화하고 지원합니다.

Claude Desktop 구성:

{
  "mcpServers": {
    "marketing-automation": {
      "command": "uv",
      "args": ["run", "python", "-m", "src.server"],
      "cwd": "/absolute/path/to/Marketing-Automation-MCP-Server"
    }
  }
}

구성

cp .env.example .env

최소 유용한 구성:

  • 데모 모드 전용:

    • DEMO_MODE=true

  • 라이브 보고 및 최적화:

    • DEMO_MODE=false

    • 하나 이상의 플랫폼 자격 증명 세트

  • 라이브 문구 생성:

    • DEMO_MODE=false

    • AI_PROVIDER=openai

    • OPENAI_API_KEY=...

    • AI_OPENAI_MODEL=gpt-5.4

선택적 공급자 환경 변수:

  • ANTHROPIC_API_KEY, ANTHROPIC_MODEL

  • GEMINI_API_KEY, GEMINI_MODEL

안정적인 라이브 동작을 위해 다음을 설정하세요:

  • SECRET_KEY

  • ENCRYPTION_KEY

ENCRYPTION_KEY가 누락되면 해당 프로세스에 대해 API 키 암호화가 비활성화되고 서버는 경고를 기록합니다.

도구 계약

모든 도구 응답에는 다음 최상위 필드가 포함됩니다:

{
  "status": "ok | blocked",
  "mode": "demo | live",
  "blocked_reason": "optional string",
  "warnings": []
}

전체 계약은 docs/api/README.md를 참조하세요.

내부 쓰기 부작용

라이브 보고 및 최적화 흐름은 구성된 데이터베이스에 내부 감사 기록을 유지할 수 있습니다:

  • 보고 흐름은 정규화된 캠페인 스냅샷을 유지할 수 있습니다.

  • 최적화 흐름은 AI 의사결정 기록을 유지할 수 있습니다.

이러한 쓰기 작업은 관찰 가능성과 재생 안전성을 위한 내부 부작용입니다. 이는 공개 MCP 응답 계약의 일부가 아닙니다.

유효성 검사 명령

uv run python -m compileall src tests dashboard
uv run pytest
uv run python -c "import src.server, src.cli, src.ai_engine, src.performance; print('imports ok')"
docker build -t marketing-automation-mcp:latest .

문서

Available Tools

4 tools
analyze_audience_segmentsC

Analyze audience segments in deterministic demo mode or return a structured live-mode block.

ParametersJSON Schema
NameRequiredDescriptionDefault
contact_list_idYes
criteriaYes
min_segment_sizeNo
max_segmentsNo
include_recommendationsNo
analyze_overlapNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
modeNo
blocked_reasonNo
warningsNo
analysis_idYes
total_contactsYes
segmentsYes
uncategorized_countYes
overlapsNo
recommendationsYes
insightsYes
created_atYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description fails to disclose behavioral traits such as read/write nature, side effects, or mode implications. 'Deterministic demo mode' hints at reproducibility but is not explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, but it is under-specified rather than concise. It omits critical details that would justify its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 parameters, no annotations, and no explanation of the output schema, the description is insufficient for an agent to correctly invoke the tool. The live-mode vs. demo distinction is mentioned but not fleshed out.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage for its 6 parameters, and the description does not mention or clarify any parameters. It adds no value beyond the schema's field names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes audience segments and mentions two modes (deterministic demo vs. live), which distinguishes it from sibling tools like create_campaign_copy or generate_campaign_report. However, it lacks specificity on what the analysis produces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives; no prerequisites or context for the modes. The description only states the action without any conditional advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_campaign_copyB

Generate campaign copy variants through the configured AI provider or deterministic demo mode.

ParametersJSON Schema
NameRequiredDescriptionDefault
product_nameYes
product_descriptionYes
target_audienceYes
toneYes
copy_typeYes
variants_countNo
keywordsNo
max_lengthNo
call_to_actionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
modeNo
blocked_reasonNo
warningsNo
copy_generation_idYes
copy_typeYes
variantsYes
toneYes
target_audienceYes
keywords_usedYes
best_variant_idYes
generation_metadataYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It mentions two modes (AI provider and deterministic demo) but fails to disclose potential side effects, failure modes, authentication requirements, rate limits, or any constraints. This is a significant gap for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently communicates the core purpose and key behavioral distinction (two modes). There is no fluff; every word earns its place. The structure effectively front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, 5 required) and the lack of schema descriptions and annotations, the description should provide more contextual guidance. Although an output schema exists (so return values need no explanation), the lack of parameter semantics and behavioral detail makes the description incomplete for an agent to use the tool confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, meaning no parameter documentation exists in the schema. The tool description does not provide any additional meaning for the 9 parameters (e.g., expected formats, examples, or relationships). The only hint comes from parameter titles, which is insufficient for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('generate'), the resource ('campaign copy variants'), and the two operational modes (AI provider or deterministic demo mode). It distinguishes well from sibling tools like analyze_audience_segments, generate_campaign_report, and optimize_campaign_budget, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for generating copy, but it does not explicitly state when to use it versus alternatives. There is no guidance on prerequisites, exclusions, or conditions that would help an agent decide between this tool and others. The context suggests usage, but explicit guidelines are missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_campaign_reportB

Generate campaign performance reports using live platform data or deterministic demo mode.

ParametersJSON Schema
NameRequiredDescriptionDefault
campaign_idsYes
date_rangeYes
metricsYes
formatNojson
include_chartsNo
group_byNocampaign

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
modeNo
blocked_reasonNo
warningsNo
report_idYes
generated_atYes
date_rangeYes
campaignsYes
summaryYes
chartsNo
formatYes
download_urlNo

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the tool can use live data or a deterministic demo mode, which is a behavioral trait. However, with no annotations, it fails to disclose other important aspects like permissions, side effects, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently conveys the core action. It is concise, though it could briefly describe parameters without losing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, nested objects, enums), the description is too sparse. It does not explain demo mode, report formats, or group_by behavior. Output schema exists but does not justify the lack of parameter context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage and the tool description provides no explanations for any of the 6 parameters, including required ones like campaign_ids, date_range, and metrics. This forces the agent to infer meaning from schemas alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates campaign performance reports and distinguishes it from siblings by specifying data sources (live vs demo mode). The verb 'generate' and resource 'campaign performance reports' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs alternatives like analyze_audience_segments. There is no mention of prerequisites or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

optimize_campaign_budgetC

Reallocate campaign budget using live platform metrics and provider-backed optimization logic.

ParametersJSON Schema
NameRequiredDescriptionDefault
campaign_idsYes
total_budgetYes
optimization_goalNomaximize_roi
constraintsNo
historical_daysNo
include_projectionsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
modeNo
blocked_reasonNo
warningsNo
optimization_idYes
total_budgetYes
optimization_goalYes
allocationsYes
projected_improvementYes
confidence_scoreYes
recommendationsYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It only states the high-level purpose but omits details like budget modification being destructive, required permissions, or impact of reallocation. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single 10-word sentence, concise but too brief for a tool with 6 parameters. It front-loads the action but lacks essential context, making it minimally adequate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no schema descriptions, no annotations, and an output schema not explained, the description is severely incomplete. An agent cannot infer inputs, outputs, or behavioral effects from this alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does not mention any parameters (campaign_ids, total_budget, etc.) nor explain their meaning. Only the optimization_goal enum is partially documented in the schema itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (reallocate campaign budget) and the method (live platform metrics, optimization logic). It distinguishes from siblings like analyze_audience_segments or create_campaign_copy, which are unrelated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., when to manually adjust budgets). No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.1.0
    • First observedanalyze_audience_segments
    • First observedcreate_campaign_copy
    • First observedgenerate_campaign_report
    • First observedoptimize_campaign_budget

TDQS

B3.1/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct marketing function: audience analysis, copy creation, reporting, and budget optimization. There is no overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (analyze_*, create_*, generate_*, optimize_*), making them predictable and easy to distinguish.

Tool Count4/5

With 4 tools, the set is slightly lean but covers core marketing automation tasks. It does not feel overly sparse or bloated for a focused server.

Completeness3/5

The tools cover analysis, copy, reporting, and optimization, but lack common features like campaign lifecycle management (create, schedule, pause) or list/segment management, leaving notable gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    Not graded
    maintenance
    Enables AI-powered analysis, management, and optimization of Meta advertising campaigns across Facebook and Instagram, including performance insights, budget optimization, and creative testing.
    33
    Business Source 1.1
  • A
    license
    B
    quality
    D
    maintenance
    Enables programmatic management of Google Ads campaigns, allowing users to monitor performance metrics, update budgets, and toggle campaign statuses. It supports real-time analytics, top performer analysis, and reporting in CSV or JSON formats.
    11
    32 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Manage ad campaigns across Meta, Google, and TikTok, create campaigns, analyze performance, spy on competitors, and generate AI creatives.
    14
    MIT