Skip to main content

Model Context Protocol (MCP) server for SIMBA — connect Claude, Cursor, and AI assistants to Bayesian Marketing Mix Models (MMM)

Project description

SIMBA MCP Server — Marketing Mix Modeling for AI Assistants

PyPI CI License: MIT Python 3.11+

An open-source Model Context Protocol (MCP) server that connects AI assistants to Simba, a Bayesian Marketing Mix Modeling (MMM) platform built on PyMC-Marketing. Upload marketing data, build MMM models, measure channel ROI, optimize budgets, and run scenario forecasts — all through natural language in Claude, Cursor, or Claude Code.

Why use this?

  • Marketing Mix Modeling via AI — ask your AI assistant to build a Bayesian MMM, measure media attribution, or optimize your marketing budget instead of writing code
  • Full MMM workflow — data upload, model fitting, channel contribution analysis, response curves, budget optimization, and scenario planning in one integration
  • Built on PyMC — transparent Bayesian models with uncertainty quantification, adstock effects, saturation curves, and lift test calibration under the hood
  • Any MCP client — works with Claude Desktop, Cursor IDE, Claude Code, or any Model Context Protocol-compatible client

Prerequisites

This MCP server requires a Simba account. You'll need an active subscription and API key to connect. If you're not already a customer, book a call to get set up with a demo and access.

Resources

  • getsimba.ai — SIMBA platform (features, pricing, demos)
  • getsimba-ai/simba-mmm — full documentation on MMM concepts, data requirements, model configuration, incrementality measurement, and more

Installation

pip install simba-mcp

Or run directly without installing:

uvx simba-mcp

Quick Start

Cursor IDE

Add to your Cursor MCP settings (.cursor/mcp.json in the workspace or global settings):

{
  "mcpServers": {
    "simba": {
      "command": "uvx",
      "args": ["simba-mcp"],
      "env": {
        "SIMBA_API_URL": "https://demo.simba-mmm.com",
        "SIMBA_API_KEY": "simba_sk_..."
      }
    }
  }
}

Claude Code

Add to your Claude Code MCP config:

{
  "mcpServers": {
    "simba": {
      "command": "uvx",
      "args": ["simba-mcp"],
      "env": {
        "SIMBA_API_URL": "https://demo.simba-mmm.com",
        "SIMBA_API_KEY": "simba_sk_..."
      }
    }
  }
}

Claude API (MCP Connector)

Use the remote Streamable HTTP transport with the Anthropic MCP connector:

import anthropic

client = anthropic.Anthropic()

response = client.beta.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[{"role": "user", "content": "List my Simba models"}],
    mcp_servers=[
        {
            "type": "url",
            "url": "https://demo.simba-mmm.com/mcp",
            "name": "simba",
            "authorization_token": "simba_sk_...",
        }
    ],
    tools=[{"type": "mcp_toolset", "mcp_server_name": "simba"}],
    betas=["mcp-client-2025-11-20"],
)

Available Tools

Tool Description
get_data_schema Get the canonical CSV schema for MMM input files
upload_data Upload a CSV dataset to Simba
list_models List all models with their status
create_model Configure and start fitting a new MMM model
get_model_status Poll fitting progress for a model
get_model_results Get results (ROI, contributions, response curves, diagnostics, and more)
run_optimizer Run budget optimization on a completed model
get_optimizer_results Get optimizer status and results
get_scenario_template Generate a forward-period template for scenario planning
run_scenario Run a "what-if" scenario prediction
get_scenario_results Get scenario prediction results

Example Prompts

Try these with any connected AI assistant:

Explore your models:

"List my Simba models and show me the channel ROI summary for the most recent complete model."

Build a model:

"Upload this CSV data to Simba and create a new MMM model with TV, Search, and Social as media channels. Use 'revenue' as the KPI and 'date' as the date column."

Check progress:

"What's the fitting status of model a1b2c3d4?"

Get results:

"Show me the model diagnostics and channel contributions for model a1b2c3d4."

Optimize budget:

"Run a budget optimization on model a1b2c3d4 with $1M total budget over 12 months. Set TV bounds to 5-40% and Search to 10-50%. Use uniform laydown weights."

Response curves:

"Show me the response curves for model a1b2c3d4. At what spend level does TV hit diminishing returns?"

Scenario planning:

"Get a scenario template for model a1b2c3d4 for the next 12 weeks. Then run a scenario where I increase TV by 20% and cut Search by 10%. What happens to revenue?"

Full workflow:

"I have marketing data I want to analyze. First get the schema so I know what format is needed, then upload my data, create a model, and once it's done show me the ROI by channel."

API Key Setup

The MCP server authenticates with the same API keys used by the Simba REST API. You'll need an active Simba account — book a call if you don't have one yet.

Once you have access, create a key with the required scopes:

  1. Go to Profile > API Keys in the Simba UI
  2. Click Create Key
  3. Set scopes: ingest, read:models, read:results, create:models, optimize, scenario
  4. Copy the key (shown only once)

Set the key as the SIMBA_API_KEY environment variable in your MCP config.

Configuration

Environment Variable Description Default
SIMBA_API_URL Simba API base URL http://localhost:5005
SIMBA_API_KEY Your Simba API key (required)

Transport Modes

The server supports all MCP transport modes:

# stdio (default) — for Cursor, Claude Code
simba-mcp

# Streamable HTTP — for remote deployment
simba-mcp --transport streamable-http --port 8100

# SSE — legacy transport
simba-mcp --transport sse --port 8100

# Or via uvicorn directly
uvicorn "simba_mcp.server:create_app()" --host 0.0.0.0 --port 8100

License

MIT — see LICENSE for details.

Built by SIMBA on PyMC-Marketing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simba_mcp-0.1.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simba_mcp-0.1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file simba_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: simba_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simba_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c2da696d7de1761d068dffb5c006f9fba5aa714333fee9af02bd4caa384e3ad2
MD5 ccd89381649a805228d5c7cf8154ea4b
BLAKE2b-256 10c542480064d045385cf960f37b33a2be387235a57a395e471b9fd8054e4386

See more details on using hashes here.

Provenance

The following attestation bundles were made for simba_mcp-0.1.1.tar.gz:

Publisher: publish.yml on getsimba-ai/simba-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simba_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: simba_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simba_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 364e87dfe7869405bac313383f007c858ddd1f5db6c37109e3affecc82d7e371
MD5 a0a88b70b65d9fbc69efc7dd74e66e17
BLAKE2b-256 029c33451156fe781badc4f281267cb5d746aa88f52e59e26615c1fa0797e58a

See more details on using hashes here.

Provenance

The following attestation bundles were made for simba_mcp-0.1.1-py3-none-any.whl:

Publisher: publish.yml on getsimba-ai/simba-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page