How marcosnahuel/mercadolibre-mcp works
This is a Mercado Libre MCP server for seller operations, with a proxy to Mercado Libre’s official MCP and TRAID knowledge tools. The main workflow is an MCP client invoking a registered seller tool, which calls the authenticated Mercado Libre API client and returns formatted results; some tools also write changes back. Authentication supports direct, auto-refresh, and Supabase-backed tokens. The README documents broader capabilities, but only sampled excerpts and SOURCE INDEX references support the relationships shown; unsampled flows are not expanded.
Main entry points: src/index.ts Server and tool routing · client.ts Mercado Libre API client · auth.ts OAuth token selection · traid/index.ts TRAID tool registration
Components 23
MCP runtime
- Server and tool routing
src/index.ts - Tool safety gate
src/tool-guard.ts
Seller operations
- Products and categories
src/tools - Orders
src/tools/orders.ts - Pricing and history
src/tools - Stock and risk
src/tools - Questions and answers
src/tools/questions.ts - Metrics and reputation
src/tools - Ads and competitors
src/tools
Authentication and API
- Mercado Libre API client
src/client.ts - OAuth token selection
src/auth.ts - Supabase token store
src/token-store.ts - Shared domain types
src/types.ts
TRAID knowledge
- TRAID tool registration
src/layers/traid/index.ts - Feature lookup
src/layers/traid/feature-lookup.ts - Client context
src/layers/traid/client-context.ts - Knowledge loading and search
src/knowledge/loader.ts
External integrations
- Official MCP proxy
src/upstream-proxy.ts - Mercado Libre API
- Supabase
- Configured knowledge files
- Official Mercado Libre MCP
Other components
- MCP client
Connections 28
- MCP client → Server and tool routing: invokes tools
README.md - Server and tool routing → Tool safety gate: wraps registration
src/index.ts - Server and tool routing → Products and categories: registers tools
src/index.ts - Server and tool routing → Orders: registers tools
src/index.ts - Server and tool routing → Pricing and history: registers tools
src/index.ts - Server and tool routing → Stock and risk: registers tools
src/index.ts - Server and tool routing → Questions and answers: registers tools
src/index.ts - Server and tool routing → Metrics and reputation: registers tools
src/index.ts - Server and tool routing → Ads and competitors: registers tools
src/index.ts - Products and categories → Mercado Libre API client: calls API
src/tools/categories.ts - Orders → Mercado Libre API client: calls API
src/tools/orders.ts - Pricing and history → Mercado Libre API client: calls API
src/tools/pricing.ts - Stock and risk → Mercado Libre API client: calls API
src/tools/stockout_risk.ts - Questions and answers → Mercado Libre API client: calls API
src/tools/questions.ts - Metrics and reputation → Mercado Libre API client: calls API
src/tools/metrics.ts - Ads and competitors → Mercado Libre API client: calls API
src/tools/ads.ts - Mercado Libre API client → OAuth token selection: gets access token
src/client.ts - OAuth token selection → Supabase token store: reads and refreshes
src/auth.ts - OAuth token selection → Supabase: uses token backend
README.md - Mercado Libre API client → Mercado Libre API: sends authenticated requests
src/client.ts - Server and tool routing → TRAID tool registration: registers knowledge tools
src/index.ts - TRAID tool registration → Feature lookup: registers
src/layers/traid/index.ts - TRAID tool registration → Client context: registers
src/layers/traid/index.ts - Feature lookup → Knowledge loading and search: searches features
src/layers/traid/feature-lookup.ts - Client context → Knowledge loading and search: loads client data
src/layers/traid/client-context.ts - Knowledge loading and search → Configured knowledge files: loads snapshot
src/knowledge/loader.ts - Server and tool routing → Official MCP proxy: registers proxy
src/index.ts - Official MCP proxy → Official Mercado Libre MCP: proxies tools
README.md