Labsco
freento logo

Freento MCP Server

β˜… 15

from freento

Freento MCP Server connects AI assistants to a Magento 2 store via the Model Context Protocol, enabling secure access to products, customers, and order data through a standardized API.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Freento MCP for Magento 2 β€” User Guide

Connect your Magento 2 store to AI assistants like Claude and ChatGPT using the Model Context Protocol (MCP).

Table of Contents

Overview

Freento MCP is a Magento 2 extension that implements the Model Context Protocol β€” an open standard for connecting AI assistants to external data sources. With this extension, you can:

  • Query orders, products, customers, and inventory using natural language
  • Generate sales reports and analytics on the fly
  • Monitor system health (PHP, MySQL, cache, search engine versions)
  • Audit admin users and security settings

How it works:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Assistant   β”‚  HTTP   β”‚  Freento MCP    β”‚         β”‚   Magento 2 /   β”‚
β”‚  (Claude/GPT)   β”‚ ◄─────► β”‚  Server         β”‚ ◄─────► β”‚Server Resources β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ JSON-RPCβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The MCP server acts as a secure bridge between AI assistants and your Magento installation, providing access to various store resources including the database, configuration, and other Magento subsystems.

Available Tools

Each tool supports flexible filtering, sorting, and pagination. Combined with AI, these capabilities become virtually unlimited β€” the AI can execute multiple queries, cross-reference data, group and aggregate results, and provide intelligent analysis.

AI can:

  • Run multiple queries across different entities in one conversation
  • Filter by any field using operators: eq, neq, in, like, gt, gte, lt, lte
  • Sort and paginate results
  • Aggregate with sum, count, avg, min, max
  • Group by field or time period (day, month)
  • Combine and analyze data from multiple sources

Sales Tools

ToolDescription
get_ordersQuery orders with filtering, pagination, and aggregation
get_order_itemsGet order line items (products in orders)
get_quotesQuery shopping carts (active and abandoned)
get_quote_itemsGet cart line items
get_creditmemosQuery credit memos

Marketing Tools

ToolDescription
get_cart_price_rulesQuery cart price rules
get_couponsQuery coupons

Catalog Tools

ToolDescription
get_productsQuery products with attribute filtering
get_categoriesQuery product categories
get_product_pricesGet product prices by customer group and website
get_product_tier_pricesGet tier price rules (quantity-based discounts)
get_tax_rulesGet tax rules and rates
get_stock_single_stockGet inventory/stock levels

Customer Tools

ToolDescription
get_customersQuery customer accounts

Admin Tools

ToolDescription
get_adminsList admin users and their roles
get_locked_adminsFind locked admin accounts (failed login attempts)

System Tools

ToolDescription
get_system_versionsGet Magento, PHP, MySQL, Redis, OpenSearch versions
get_storesGet store hierarchy (websites, store groups, store views)

Filtering & Operators

All list tools support powerful filtering via the filters parameter.

Filter Structure

{
  "filters": {
    "field_name": { "operator": "value" }
  }
}

Available Operators

OperatorDescriptionExample
eqEquals{"status": {"eq": "processing"}}
neqNot equals{"status": {"neq": "canceled"}}
inIn list{"status": {"in": ["processing", "complete"]}}
ninNot in list{"status": {"nin": ["canceled", "closed"]}}
likeSQL LIKE pattern{"email": {"like": "%@gmail.com"}}
nlikeSQL NOT LIKE{"sku": {"nlike": "TEST%"}}
gtGreater than{"grand_total": {"gt": 100}}
gteGreater or equal{"qty": {"gte": 10}}
ltLess than{"created_at": {"lt": "2024-01-01"}}
lteLess or equal{"price": {"lte": 50}}

Combining Filters

Multiple filters are combined with AND logic:

{
  "filters": {
    "status": {"in": ["processing", "pending"]},
    "grand_total": {"gte": 100},
    "created_at": {"gte": "2024-01-01"}
  }
}

Date Filtering

Use YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format:

{
  "filters": {
    "created_at": {"gte": "2024-01-01", "lt": "2024-02-01"}
  }
}

Aggregation & Analytics

The get_orders tool supports aggregation for analytics:

Parameters

ParameterValuesDescription
functioncount, sum, avg, min, maxAggregation function
fieldgrand_total, total_qty_ordered, total_item_countField to aggregate
group_bystatus, month, day, customer_email, store_id, payment_methodGrouping

Examples

Total order count:

{"function": "count"}

Revenue by month:

{
  "function": "sum",
  "field": "grand_total",
  "group_by": "month"
}

Average order value by payment method:

{
  "function": "avg",
  "field": "grand_total",
  "group_by": "payment_method"
}

Top 10 customers by spending:

{
  "function": "sum",
  "field": "grand_total",
  "group_by": "customer_email",
  "filters": {
    "status": {"nin": ["canceled", "closed"]}
  },
  "limit": 10
}

Security

Best Practices

  1. Use HTTPS β€” Always use HTTPS in production to encrypt API communications

  2. Minimal Permissions β€” Grant only the tools needed for your use case via ACL Roles

  3. Separate Clients β€” Create separate OAuth Clients for different users/purposes

  4. Regular Audits β€” Periodically review active clients and disable unused ones

  5. Token Rotation β€” Regenerate access tokens periodically

  6. Anonymity Mode β€” Enable anonymity mode in Stores > Configuration > Freento MCP > Privacy to hide PII fields (emails, names) from MCP tool responses. Since AI assistants connecting via MCP are third-party services, it is recommended to enable this mode to prevent customer personal data from being transmitted externally unless explicitly needed.

Token Security

  • Never commit tokens to version control
  • Use environment variables or secure secret management
  • Rotate tokens periodically
  • Revoke tokens immediately if compromised

Support

Contact: https://freento.com/contact