Freento MCP Server for Magento 2

AI assistants like Claude, ChatGPT, and others are revolutionizing how we work with data. However, connecting these powerful tools to your Magento 2 store has been challenging — until now. Freento MCP Server bridges this gap, allowing AI assistants to securely interact with your store data through the Model Context Protocol (MCP).

With MCP integration, you can ask questions like "What were yesterday's sales?", "Show me customers who haven't ordered in 3 months", or "Which products are low on stock?" — and get instant answers directly from your store data.

What is MCP?

Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources. Think of it as a universal translator between AI and your business systems. Instead of manually exporting data or writing custom integrations, MCP provides a standardized way for AI to access the information it needs.

Key Features

Feature Description
All-in-One ModuleSales, catalog, customer, admin, and system tools in a single package
OAuth 2.0 SecurityAuthorization Code flow with PKCE support for secure authentication
Built-in ACL SystemRoles and granular permissions to control what AI can access
JSON-RPC 2.0Standard protocol over HTTP for reliable communication
Easy to ExtendAdd custom tools for your specific business needs

Available Tools

The module provides a comprehensive set of tools for AI assistants to query your store data:

Sales Tools

Tool Description
get_ordersGet list of orders with filtering, pagination, and aggregation
get_order_itemsGet order line items with filtering
get_quotesGet shopping carts (quotes) with filtering
get_quote_itemsGet quote line items with filtering
get_creditmemosGet credit memos with filtering

Marketing Tools

Tool Description
get_cart_price_rulesGet cart price rules with filtering
get_couponsGet coupons with filtering

Catalog Tools

Tool Description
get_productsGet list of products with filters (SKU, dates, attributes)
get_stock_single_stockGet stock information for products (single stock mode)

Customer & Admin Tools

Tool Description
get_customersGet list of customers with filters (email, dates, group, etc.)
get_adminsGet list of admin users with their roles
get_locked_adminsGet list of locked admin accounts
get_system_versionsGet system component versions (Magento, PHP, MySQL, Redis, etc.)

Powerful Filtering & Aggregation

All tools support advanced filtering with multiple operators:

Operator Description Example
eqEquals{"eq": "processing"}
neqNot equals{"neq": "closed"}
inIn list{"in": ["processing", "complete"]}
likeSQL LIKE{"like": "%@gmail.com"}
gt, gte, lt, lteComparison operators{"gte": 100, "lte": 500}

Aggregation functions allow you to get summarized data:

  • count — count records
  • sum — sum values (e.g., total revenue)
  • avg — average values
  • min / max — minimum and maximum values
  • group_by — group results by field (status, month, customer, etc.)

Security & Access Control

Security is a top priority when connecting AI to your store data:

ACL Roles

Create custom roles with specific permissions. For example, a "Sales Assistant" role might only access order and customer data, while a "System Monitor" role can view system versions and admin users.

OAuth 2.0 Clients

Each AI client gets its own credentials with assigned role. This provides:

  • Secure token-based authentication
  • Ability to revoke access at any time
  • Audit trail of which client accessed what data

Compatible AI Clients

The module works with any MCP-compatible AI assistant:

  • Claude Code — Anthropic's CLI tool for developers
  • Claude Desktop — Desktop application for Claude
  • ChatGPT — via OAuth 2.0 integration
  • Custom applications — any tool supporting JSON-RPC over HTTP

Real-World Use Cases

Sales Analysis

Ask your AI assistant questions like:

  • "What was our total revenue last month?"
  • "Show me the top 10 customers by order value"
  • "How many orders are in processing status?"
  • "Compare this week's sales to last week"

Inventory Management

  • "Which products are low on stock?"
  • "Show me products that haven't been ordered in 30 days"
  • "What's the average stock level by category?"

Customer Insights

  • "Find customers who haven't ordered in 3 months"
  • "Show me customers from a specific region"
  • "What's our customer registration trend this year?"

System Monitoring

  • "What versions are running on the server?"
  • "Are there any locked admin accounts?"
  • "Show me all admin users and their roles"

Easy Extension

Need custom tools for your specific business logic? The module is designed to be extended:

  1. Implement the ToolInterface
  2. Register your tool in di.xml
  3. Add permissions to ACL roles

Your custom tools will be immediately available to all connected AI clients.

Requirements

  • Magento 2.4.x
  • PHP 8.1+

Installation

Via Composer:

composer require freento/module-mcp
php bin/magento module:enable Freento_Mcp
php bin/magento setup:upgrade
php bin/magento cache:flush

Why This Matters

Connecting AI to your Magento store data opens new possibilities:

  • Faster decisions — get answers to business questions in seconds, not hours
  • No technical skills required — ask questions in plain language
  • Secure access — granular permissions ensure AI only sees what it should
  • Extensible — add custom tools as your needs grow
  • Standard protocol — works with the growing ecosystem of MCP-compatible tools