Skip to main content

Social Commerce Intelligence MCP

Project description

Social Commerce Intelligence MCP

Core Problem

Creator affiliate, video, and shop revenue data is siloed across TikTok, Instagram, Pinterest, YouTube, and Shopify.

What This Server Provides

This folder contains a production-minded MCP server scaffold with typed JSON tool responses, connector health metadata, OAuth-oriented configuration, rate-limit guards, stable error envelopes, and deterministic demo data until live vendor integrations are attached.

This server has received a production pass. It now includes local creator and social commerce models for creator ROI, video conversion, trending products, affiliate commissions, platform revenue, and underperforming creator detection.

Connectors

  • TikTok Shop API via OAuth scope seller.read; env prefix TIKTOK_SHOP
  • TikTok for Business API via OAuth scope advertiser.read; env prefix TIKTOK_BUSINESS
  • Instagram Graph API via OAuth scope instagram_basic; env prefix INSTAGRAM
  • Pinterest Shopping API via OAuth scope pins:read; env prefix PINTEREST
  • YouTube Data API via OAuth scope youtube.readonly; env prefix YOUTUBE
  • Shopify Admin API via OAuth scope read_orders; env prefix SHOPIFY

MCP Tools

  • get_creator_roi_report - Creator revenue, commission, CAC, and margin.
  • get_top_converting_videos - Rank videos by conversion quality.
  • get_trending_products - Trending shop products by niche.
  • get_affiliate_commissions_summary - Commission liability and payout status.
  • get_social_commerce_revenue_by_platform - Revenue by social commerce platform.
  • identify_underperforming_creators - Creators needing coaching or pause.

Current Local Capabilities

  • Calculates creator revenue, commission, total cost, gross profit, contribution profit, ROI, and conversion rate.
  • Ranks videos by click-to-order conversion and revenue per thousand views.
  • Returns trending products by category and region.
  • Summarizes affiliate commission liability and creators held for payout validation.
  • Compares social commerce revenue by TikTok, Instagram, YouTube, and Pinterest.
  • Detects underperforming creators by order count, conversion rate, and contribution profit.

Test

python -m pytest .\tests -q -p no:cacheprovider

Partial Platform Support

Customers only need to connect the social-commerce platforms they actually use. Missing TikTok Shop, TikTok Business, Instagram, Pinterest, YouTube, Shopify, or affiliate credentials do not prevent the server from starting or running local intelligence tools.

Use get_live_connector_status to see configured connectors. Use test_tiktok_shop_connection, test_affiliate_connection, and test_social_content_connection for read-only live smoke checks when those platforms are connected.

Running Locally

powershell python -m venv .venv .\.venv\Scripts\pip install -e . .\.venv\Scripts\python -m social_commerce_intelligence_mcp.server

Claude Desktop Config

json { "mcpServers": { "social-commerce-intelligence": { "command": "python", "args": ["-m", "social_commerce_intelligence_mcp.server"], "cwd": "D:\CUSTOMS\EARNALL\MCP Servers\07-social-commerce-intelligence" } } }

Production Checklist

  • Create OAuth 2.1 apps for each connector and set *_CLIENT_ID plus *_CLIENT_SECRET.
  • Store refresh tokens in a secrets manager, never in repo files.
  • Replace deterministic demo rows in server.py with API adapter calls.
  • Persist raw snapshots and normalized warehouse tables for trend analysis.
  • Add integration tests with recorded fixtures for every connector.
  • Validate every tool in MCP Inspector before publishing.
  • Deploy with a /health route through FastMCP streamable HTTP on Railway or Render.

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

social_commerce_intelligence_mcp-0.1.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for social_commerce_intelligence_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e51f5825e35d9cae5fab2072fc93fbfba37a6d3f6d6fa9a8655e1de6e8b3042
MD5 cafa52e010dc072178069eb88943068b
BLAKE2b-256 7567e2ba73fec9481a1aad1355c1bf5eb8e53e80cba25094064e86e0eff609e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for social_commerce_intelligence_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33fc0940f4a512aa4d51809bc4a8a5e6adbfb96cd4eab3b1d3de26653c4321af
MD5 7500c4d2cef42b81d9561e10f7950179
BLAKE2b-256 c60df9fd5fda737e1c58432bcdea418d02ec872d65dfa2543529e4db436e8dc3

See more details on using hashes here.

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