Shopify AI Ops Agent
MCP server that enables autonomous ecommerce operations on Shopify, including product analytics, Meta Ads, communications, and trend intelligence, with human-in-the-loop risk governance.
README
๐๏ธ Shopify AI Operations Agent
A production-grade autonomous ecommerce operations agent built with LangGraph v1, Model Context Protocol (MCP 2026-07-28), FastAPI, PostgreSQL + pgvector, Redis, OpenTelemetry, and strict Human-in-the-Loop (HITL) risk governance.
๐ Complete Technical Documentation
For in-depth architecture, terminologies, and Architectural Decision Records (ADRs) written in ASD-STE100 (Simplified Technical English), see:
๐ DOCUMENTATION.md
Download the visual presentation PDF:
๐ architecture_diagram.pdf (or at http://localhost:8000/architecture.pdf)
๐๏ธ Core Architectural Invariants
- Pre-Execution Risk & Policy Gate: Destructive deletions, financial budgets, and outbound communications trigger a LangGraph interrupt (
interrupt_before) requiring human approval. - Decoupled MCP Tool Layer: All business capabilities are packaged as 5 stateless MCP tool servers (
Shopify,Analytics,Meta Ads,Communications,Trend Intelligence). - Deterministic Business Analytics: Financial metrics are computed using deterministic SQL routines, eliminating LLM arithmetic hallucinations.
- Anti-Early-Victory Sensors: The agent re-queries live state to mathematically verify that mutations occurred before reporting completion.
- Shift-Left Evals & Tracing: 28 automated pytest test suites, 17-case golden eval benchmark, and an independent Critic Agent audit (Score: 98.5/100, Grade: A+).
๐ Repository Structure
shopify-ai-ops-agent/
โโโ DOCUMENTATION.md # Full technical documentation (ASD-STE100)
โโโ architecture_diagram.pdf # 2-slide landscape architecture diagram
โโโ docker-compose.yml # Postgres (pgvector) + Redis + Jaeger + API
โโโ pyproject.toml # Dependencies & packaging
โโโ app/
โ โโโ api/ # FastAPI routes (agent, approvals, health)
โ โโโ agent/ # LangGraph state machine & specialized nodes
โ โโโ mcp_servers/ # 5 Stateless MCP tool servers
โ โโโ core/ # Security (HMAC-SHA256), Idempotency, Database
โ โโโ rag/ # Hybrid Vector + BM25 search & brand guidelines
โ โโโ static/ # Executive SaaS Cockpit UI & Command Palette
โ โโโ evals/ # Golden datasets & Critic Agent audit
โโโ tests/ # 28 automated unit, safety, and integration tests
๐ Quickstart & Setup
1. Local Development
# Install dependencies
pip install -r requirements.txt
# Start the application server & dashboard
python -m uvicorn app.api.main:app --reload --port 8000
- Dashboard UI:
http://localhost:8000/(PressCtrl + Kfor Command Palette) - Interactive API Docs:
http://localhost:8000/docs - Architecture PDF:
http://localhost:8000/architecture.pdf
๐งช Verification & Evaluations
# Run full automated test suite (28 tests)
python -m pytest tests/ -v
# Run independent Critic Agent technical audit
python -m app.evals.judge_agent
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.