Logo de Freento MCP Server

Freento MCP Server

Comunidade
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.

Publicado porFreento
RepositórioMagento-2-Mcp
IdiomaPHP
Forks
4
Estrelas
16
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Freento MCP Server disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    16 estrelas e 4 forks no repositório vinculado.

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.

Requirements

  • Magento 2.4.x (Open Source or Commerce)
  • PHP 8.1 or higher
  • An MCP-compatible AI client (Claude Code, Claude Desktop, or ChatGPT with MCP plugin)

Installation

Via Composer (Recommended)

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

Manual Installation

  1. Download the module and extract to app/code/Freento/Mcp/
  2. Enable the module:
bash
php bin/magento module:enable Freento_Mcp
php bin/magento setup:upgrade
php bin/magento cache:flush

Verify Installation

bash
php bin/magento module:status Freento_Mcp

Expected output: Module is enabled

Configuration

Step 1: Create ACL Role

  1. In Magento Admin, go to System > Freento MCP > ACL Rules
  2. Click Add New Role
  3. Enter a name (e.g., "AI Assistant")
  4. Select which tools the role can access:
    • Sales tools (orders, quotes, credit memos)
    • Catalog tools (products, stock)
    • Customer tools
    • Admin tools
    • System tools
  5. Save the role

Step 2: Create OAuth Client

  1. Go to System > Freento MCP > AI MCP Clients
  2. Click Add New Client
  3. Enter a name (e.g., "Claude Code")
  4. Select the ACL Role created in Step 1
  5. Save the client
  6. Copy the Client ID and Client Secret

Step 3: Generate Access Token

  1. Open the OAuth Client you created
  2. Click Generate OTP — copy the one-time password (valid 24 hours)
  3. Click Generate Token — enter the OTP when prompted
  4. Copy the generated Access Token

Claude Code

Add to your project's .mcp.json:

json
{
  "mcpServers": {
    "magento": {
      "type": "http",
      "url": "https://your-store.com/freento_mcp/index/index",
      "headers": {
        "Authorization": "Bearer YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Then reconnect MCP in Claude Code:

/mcp

Claude Desktop

Edit your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux/Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{
  "mcpServers": {
    "magento": {
      "type": "http",
      "url": "https://your-store.com/freento_mcp/index/index",
      "headers": {
        "Authorization": "Bearer YOUR_ACCESS_TOKEN"
      }
    }
  }
}

Restart Claude Desktop to apply changes.

ChatGPT and Other Web Clients

For web-based AI tools that support OAuth 2.0:

  1. Register your store's MCP endpoint: https://your-store.com/freento_mcp/index/index
  2. Enter the Client ID and Client Secret from Step 2
  3. When prompted to authorize, enter the OTP generated from the OAuth Client page
  4. Complete the OAuth authorization flow

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)

Usage Examples

Once configured, you can ask your AI assistant questions in natural language:

Orders & Sales

"How many orders were placed last month?"
"Show me the 10 most recent orders"
"Find all orders over $500 that are still processing"
"What's the total revenue by payment method this year?"
"List orders for customer john@example.com"

Products & Inventory

"Show me out of stock products"
"Find products with SKU starting with 'ABC'"
"List products with less than 10 items in stock"
"Get all configurable products updated this week"

Customers

"How many customers registered this month?"
"Find customer with email jane@example.com"
"List customers in the Wholesale group"

System & Admin

"What PHP version is running?"
"Show me all admin users"
"Are there any locked admin accounts?"
"What search engine is configured?"

Analytics & Reports

"Revenue by month for the last 12 months"
"Top 10 customers by total order value"
"Average order value by payment method"
"Order count by status"

Advanced AI-Powered Analysis

The real power comes from combining data with AI reasoning. Ask complex business questions and get actionable insights:

Customer Intelligence:

"Analyze my top 10 customers from the last 6 months. Who are they,
what do they buy, and how can I increase sales?"

The AI will retrieve the data and provide analysis like:

Mike Johnson — $4,250 total, 8 orders Profile: Professional drummer buying cymbals and drumsticks every 5-6 weeks

Recommendation: Set up auto-replenishment for drumsticks, offer early access to new cymbal arrivals, consider a "drummer's loyalty" discount tier.

Churn Prevention:

"Find customers who were active but haven't ordered in 90 days.
What patterns do you see and how can I win them back?"

Inventory Optimization:

"Analyze sales velocity vs current stock levels.
What should I reorder and what's at risk of becoming dead stock?"

Revenue Opportunities:

"What patterns exist in high-value orders? How can I get more customers
to spend at that level?"

Abandoned Cart Analysis:

"Look at abandoned carts from this week. What are people leaving behind
and what might be causing it?"

This transforms your store data into strategic business intelligence — insights that would typically require hours with spreadsheets or a dedicated analyst.

Filtering & Operators

All list tools support powerful filtering via the filters parameter.

Filter Structure

json
{
  "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:

json
{
  "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:

json
{
  "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:

json
{"function": "count"}

Revenue by month:

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

Average order value by payment method:

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

Top 10 customers by spending:

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

Troubleshooting

Tools not appearing in AI assistant

  1. Verify the module is enabled:

    bash
    php bin/magento module:status Freento_Mcp
  2. Flush Magento cache:

    bash
    php bin/magento cache:flush
  3. Reconnect MCP in your AI client (e.g., /mcp in Claude Code)

"Authentication failed" error

  • Verify your access token is correct
  • Check the OAuth Client is enabled in Magento Admin
  • Regenerate the token if it has expired

"Access denied" error

The ACL Role lacks required permissions. Edit the ACL Role in System > Freento MCP > ACL Rules and grant access to the necessary tools.

Connection timeout

  • Verify your Magento store is accessible from the internet
  • Check firewall rules allow incoming connections
  • For local development, use a tunnel service like ngrok

Test the endpoint manually

bash
curl -X POST https://your-store.com/freento_mcp/index/index \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

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

License

MIT License — see LICENSE for details.

Use o MCP de Freento MCP Server com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Freento MCP Server, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Freento MCP Server como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Freento MCP Server.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "magento-2-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Freento MCP Server, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Freento MCP Server.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Freento MCP Server para me ajudar nesta tarefa?
Freento MCP Server
Claro. Já li.
Veja o que encontrei usando Freento MCP Server.

Perguntas frequentes

Para que serve o servidor MCP Freento MCP Server?

Freento MCP Server é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Freento MCP Server com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Freento MCP Server com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Freento MCP Server com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Freento MCP Server conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Freento MCP Server ao TypingMind?

Freento MCP Server funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Freento MCP Server oferece no TypingMind?

Freento MCP Server disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Freento MCP Server?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Freento MCP Server exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇