Richiedi l’accesso anticipato

Inserisci il tuo nome e un indirizzo email o un numero di telefono. Ti contatteremo con tutte le informazioni per accedere a Tajo.

Integrazione Custom API + Brevo

Custom API + Brevo

Non tutte le piattaforme hanno un server MCP. Per WooCommerce, BigCommerce, Magento, CRM proprietari o qualsiasi sistema dotato di API REST, crea un agente connettore che porti i tuoi dati fino a Brevo.

Due approcci

Approccio 1: server MCP della community

Verifica se per la tua piattaforma esiste già un server MCP della community:

PiattaformaMCP della communityStato
WooCommercewoocommerce-mcp-serverMantenuto dalla community
BigCommerceConsulta la directory dei server MCPVariabile
MagentoConsulta la directory dei server MCPVariabile
SalesforceDiverse opzioni disponibiliCommunity attiva
ZendeskDisponibile tramite Composio/ZapierAttivo

Se esiste un server della community, usalo come faresti con quelli ufficiali, aggiungendolo alla tua configurazione di Claude accanto al server MCP di Brevo.

Approccio 2: agente con strumenti HTTP

Per le piattaforme senza server MCP, crea un agente che usi le capacità HTTP integrate di Claude per chiamare direttamente le API REST e che poi scriva su Brevo tramite MCP.

Costruire un agente connettore su misura

Passo 1: studia l’API di origine

Documenta gli endpoint principali di cui il tuo agente ha bisogno:

# Example: WooCommerce REST API
source_api:
base_url: "https://your-store.com/wp-json/wc/v3"
auth: Basic (consumer_key:consumer_secret)
endpoints:
- GET /customers # List customers
- GET /customers/{id} # Get customer details
- GET /orders # List orders
- GET /orders/{id} # Get order details
- GET /products # List products
- GET /coupons # List coupons

Passo 2: definisci l’agente

---
name: woocommerce-brevo-sync
description: Sync WooCommerce customers and orders to Brevo
version: 1.0.0
temperature: 0.1
tools:
- brevo_contacts
- brevo_attributes
- brevo_lists
- brevo_email_campaign_management
triggers:
- schedule: "0 */6 * * *"
- webhook: /agents/woocommerce/sync
method: POST
---
# WooCommerce → Brevo Sync Agent
Connect WooCommerce store data to Brevo for engagement campaigns.
## Source API
- **Base URL**: https://your-store.com/wp-json/wc/v3
- **Authentication**: Basic Auth with consumer key/secret
- **Key endpoints**: /customers, /orders, /products
## Sync Strategy
### Customer Sync
1. GET /customers?modified_after={last_sync_time}
2. For each customer:
- Map WooCommerce fields to Brevo attributes
- Create or update Brevo contact
- Add to appropriate list based on order history
### Order Event Sync
1. GET /orders?after={last_sync_time}&status=completed
2. For each order:
- Track "order_completed" event in Brevo
- Update contact attributes (order_count, total_spent)
- Trigger post-purchase campaign if applicable
## Field Mapping
| WooCommerce | Brevo Attribute |
|-------------|-----------------|
| email | EMAIL |
| first_name | FIRSTNAME |
| last_name | LASTNAME |
| billing.phone | SMS |
| orders_count | ORDER_COUNT |
| total_spent | TOTAL_SPENT |
| date_created | CUSTOMER_SINCE |
| role | CUSTOMER_TYPE |
## API Call Pattern
For each sync operation, the agent should:
1. Call WooCommerce REST API to fetch data
2. Transform the response to Brevo's expected format
3. Call Brevo MCP tools to create/update contacts
4. Log sync results for monitoring
## Rules
- Respect WooCommerce API rate limits (default: 25 req/10 seconds)
- ONLY sync customers with valid email addresses
- Implement incremental sync using modified_after parameter
- Store last sync timestamp for next run

Passo 3: configura il server MCP di Brevo

Collega solo i moduli Brevo che servono al tuo agente:

{
"mcpServers": {
"brevo_contacts": {
"url": "https://mcp.brevo.com/v1/brevo_contacts/mcp",
"headers": { "Authorization": "Bearer your-brevo-token" }
},
"brevo_email": {
"url": "https://mcp.brevo.com/v1/brevo_email_campaign_management/mcp",
"headers": { "Authorization": "Bearer your-brevo-token" }
},
"brevo_lists": {
"url": "https://mcp.brevo.com/v1/brevo_lists/mcp",
"headers": { "Authorization": "Bearer your-brevo-token" }
}
}
}

Passo 4: esegui l’agente

You: "Sync all WooCommerce customers from the last week to Brevo
and add new customers to the Welcome Series list."
Claude: I'll sync your WooCommerce customers to Brevo.
Fetching customers modified in the last 7 days from WooCommerce...
[Makes HTTP GET to your-store.com/wp-json/wc/v3/customers?modified_after=...]
Found 67 customers. Syncing to Brevo...
[Uses brevo_contacts to create/update contacts]
[Uses brevo_lists to add 23 new customers to "Welcome Series"]
Sync complete:
- 67 customers processed
- 44 existing contacts updated
- 23 new contacts created → added to Welcome Series
- 0 skipped (all had valid emails)

Template: connettore generico per API REST

Usa questo template per qualsiasi API REST:

---
name: {platform}-brevo-connector
description: Sync {platform} data to Brevo for engagement
version: 1.0.0
temperature: 0.1
tools:
- brevo_contacts
- brevo_attributes
- brevo_lists
triggers:
- schedule: "0 */6 * * *"
---
# {Platform} → Brevo Connector
## Source API Configuration
- **Base URL**: {api_base_url}
- **Auth**: {auth_method} ({details})
- **Rate Limit**: {rate_limit}
## Data to Sync
### Contacts
- Source endpoint: {endpoint}
- Brevo mapping: {field_map}
- Sync frequency: Every 6 hours
- Incremental: Use modified_after / updated_since parameter
### Events
- Source endpoint: {endpoint}
- Brevo event name: {event_name}
- Trigger: When {condition}
## Sync Logic
1. Fetch changed records from source since last sync
2. Transform to Brevo format
3. Upsert contacts via brevo_contacts
4. Track events for campaign triggers
5. Log results and update sync cursor
## Error Handling
- Retry failed API calls 3 times with exponential backoff
- Skip individual records that fail validation
- Report errors in sync summary
- NEVER stop entire sync for single record failure

Quando conviene costruire un vero server MCP

Se ti accorgi di collegare ripetutamente la stessa piattaforma, valuta la costruzione di un server MCP vero e proprio:

Basta l’agenteMeglio un server MCP
Sincronizzazioni sporadiche o una tantumSincronizzazione quotidiana in produzione
Prototipazione dell’integrazioneUso condiviso nel team o in azienda
Semplici operazioni di letturaOperazioni complesse in più passaggi
Meno di 5 endpoint API necessariCopertura completa dell’API necessaria

Per costruire un server MCP su misura, consulta la specifica MCP e l’Integration Builder di Tajo per generare server a partire dalle specifiche OpenAPI.

Passi successivi

Richiedi l’accesso anticipato

Inserisci il tuo nome e un indirizzo email o un numero di telefono. Ti contatteremo con tutte le informazioni per accedere a Tajo.

rilevamento automatico
Assistente AI

Ciao! Chiedimi qualsiasi cosa sulla documentazione.