MCP Tienda Nube

MCP Tienda Nube

MCP server that exposes all 111 endpoints of the Tienda Nube API as tools for Cursor (or other MCP clients) to code directly with the API.

Category
Visit Server

README

🚀 MCP Tienda Nube - Servidor Completo

Servidor Model Context Protocol (MCP) para la API de Tienda Nube

GitHub API Coverage Endpoints Resources


📖 Descripción

Servidor MCP que expone TODOS los 111 endpoints de la API de Tienda Nube como herramientas que Cursor (u otros clientes MCP) pueden usar para codear directamente con la API.

✨ Características

  • ✅ 111 endpoints - Cobertura completa de la API
  • ✅ 26 recursos - Productos, Órdenes, Clientes, Categorías, etc.
  • ✅ 10 herramientas MCP - Búsqueda, detalles, esquemas, ejemplos
  • ✅ 100% cobertura - Nada falta
  • ✅ Docker ready - Deploy en VPS en minutos
  • ✅ Documentación exhaustiva - Guías, ejemplos, pruebas
  • ✅ Probado - Suite completa de pruebas

🚀 Inicio Rápido

1. Clonar el Repositorio

git clone https://github.com/ropu/MCP-tienda_nube.git
cd MCP-tienda_nube

2. Instalar Dependencias

pip3 install -r requirements.txt

3. Iniciar el Servidor

python3 app_complete.py

El servidor estará disponible en: http://localhost:8000

4. Verificar Instalación

curl http://localhost:8000/health

🐳 Docker (Recomendado)

Opción 1: Docker Compose

git clone https://github.com/ropu/MCP-tienda_nube.git
cd MCP-tienda_nube
docker-compose up -d

Opción 2: Docker Manual

docker build -t tiendanube-mcp .
docker run -d -p 8000:8000 tiendanube-mcp

Acceder al Servidor

  • API: http://localhost:8000
  • Documentación: http://localhost:8000/docs
  • Health Check: http://localhost:8000/health

📊 Estadísticas

Métrica Valor
Recursos 26
Endpoints 111
GET 52 (46.8%)
POST 22 (19.8%)
PUT 19 (17.1%)
DELETE 17 (15.3%)
PATCH 1 (0.9%)
Cobertura 100%

🗂️ Recursos Incluidos (26)

Productos & Catálogo:

  • Products (7) | Categories (5) | Product Images (5) | Product Variants (5)

Órdenes & Ventas:

  • Orders (10) | Draft Orders (5) | Fulfillment Orders (4) | Abandoned Checkouts (2)

Clientes:

  • Customers (5) | Locations (5)

Promociones:

  • Coupons (5) | Discounts (5) | Business Rules (5)

Carrito & Pago:

  • Cart (5) | Payment Options (2) | Payment Providers (2)

Transacciones:

  • Transactions (2) | Billing (1)

Envíos:

  • Shipping Carriers (2)

Tienda:

  • Store (2)

Integraciones:

  • Webhooks (5) | Metafields (5) | Scripts (5)

Contenido:

  • Blog (5) | Pages (5) | Email Templates (2)

🔧 Herramientas MCP (10)

  1. search_endpoint - Buscar endpoints por nombre, método o path
  2. get_endpoint_details - Obtener detalles completos de un endpoint
  3. get_schema - Obtener esquema JSON de solicitud/respuesta
  4. search_documentation - Buscar en toda la documentación
  5. get_code_example - Obtener ejemplos de código (Python/JavaScript)
  6. list_resources - Listar todos los recursos disponibles
  7. get_resource_endpoints - Obtener endpoints de un recurso específico
  8. get_authentication_info - Obtener información de autenticación
  9. get_multi_inventory_info - Obtener información sobre multi-inventario
  10. get_resource_endpoints - Obtener endpoints de un recurso

📚 Documentación


💻 Uso en Cursor

1. Configurar MCP en Cursor

Edita el archivo de configuración de Cursor:

macOS/Linux:

~/.cursor/mcp.json

Windows:

%APPDATA%\Cursor\mcp.json

2. Agregar Configuración

{
  "mcpServers": {
    "tiendanube-api": {
      "url": "http://localhost:8000",
      "name": "Tienda Nube API",
      "description": "API completa de Tienda Nube"
    }
  }
}

3. Usar en Cursor

@tiendanube-api
¿Cómo creo un producto con la API de Tienda Nube?

🔐 Autenticación

Todos los endpoints de la API de Tienda Nube requieren autenticación OAuth 2.0:

headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "User-Agent": "MyApp (name@email.com)"
}

📝 Ejemplos de Uso

Buscar Endpoint

curl -X POST "http://localhost:8000/tools/search_endpoint" \
  -H "Content-Type: application/json" \
  -d '{"query": "product"}'

Obtener Detalles de Endpoint

curl -X POST "http://localhost:8000/tools/get_endpoint_details" \
  -H "Content-Type: application/json" \
  -d '{"path": "/products", "method": "GET"}'

Obtener Ejemplo de Código

curl -X POST "http://localhost:8000/tools/get_code_example" \
  -H "Content-Type: application/json" \
  -d '{"path": "/products", "method": "GET", "language": "python"}'

🧪 Pruebas

Ejecutar Pruebas

# Validación básica
python3 test_complete_mcp.py

# Pruebas con bash
./test_mcp_tools.sh

# Pruebas de rate limiting
python3 test_rate_limiting.py

Resultados Esperados

✓ Test 1: Base de datos cargada correctamente
✓ Test 2: Cantidad de recursos (26)
✓ Test 3: Cantidad de endpoints (111)
✓ Test 4: Todos los recursos tienen endpoints
✓ Test 5: Todos los endpoints tienen campos requeridos
✓ Test 6: Métodos HTTP válidos
✓ Test 7: Paths válidos
✓ Test 8: No hay endpoints duplicados
✓ Test 9: Recursos específicos presentes
✓ Test 10: Estadísticas por método
✓ Test 11: Estadísticas por recurso

Pruebas pasadas: 11/11 ✅

🚀 Deploy en VPS

Con Script de Deployment

git clone https://github.com/ropu/MCP-tienda_nube.git
cd MCP-tienda_nube
chmod +x deploy.sh
./deploy.sh start

Con Docker Compose

git clone https://github.com/ropu/MCP-tienda_nube.git
cd MCP-tienda_nube
docker-compose up -d

Ver DEPLOYMENT.md para más detalles.


📁 Estructura del Proyecto

MCP-tienda_nube/
├── api_database_complete.json      # Base de datos con 111 endpoints
├── app_complete.py                 # Servidor FastAPI completo
├── Dockerfile                      # Imagen Docker
├── docker-compose.yml              # Orquestación Docker
├── nginx.conf                      # Configuración Nginx
├── deploy.sh                       # Script de deployment
├── requirements.txt                # Dependencias Python
├── README.md                       # Este archivo
├── README_COMPLETE.md              # Guía completa
├── COMPLETE_API_DOCUMENTATION.md   # Documentación de API
├── DEPLOYMENT.md                   # Guía de deployment
├── QUICK_START.md                  # Inicio rápido
├── TESTING_GUIDE.md                # Guía de pruebas
├── test_complete_mcp.py            # Suite de pruebas
└── ...otros archivos

🤝 Contribuir

¿Encontraste un error? ¿Quieres agregar más funcionalidades?

  1. Fork el repositorio
  2. Crea una rama: git checkout -b feature/nueva-funcionalidad
  3. Commit tus cambios: git commit -m 'Agregar nueva funcionalidad'
  4. Push a la rama: git push origin feature/nueva-funcionalidad
  5. Abre un Pull Request

📞 Soporte

  • Documentación oficial de Tienda Nube: https://tiendanube.github.io/api-documentation/
  • API Base URL: https://api.tiendanube.com/v1
  • Versión API: 2025-03
  • Repositorio GitHub: https://github.com/ropu/MCP-tienda_nube

📄 Licencia

Este proyecto es de código abierto y está disponible para uso libre.


🎯 Casos de Uso

Caso 1: Crear un Producto

@tiendanube-api
¿Cómo creo un producto con variantes?

Caso 2: Listar Clientes

@tiendanube-api
¿Cómo obtengo todos los clientes de mi tienda?

Caso 3: Actualizar Inventario

@tiendanube-api
¿Cómo actualizo el stock de un producto?

🔗 Enlaces Útiles

  • GitHub: https://github.com/ropu/MCP-tienda_nube
  • Documentación API: https://tiendanube.github.io/api-documentation/
  • Swagger UI: http://localhost:8000/docs (después de iniciar el servidor)

Versión: 2.0.0
Última actualización: 2025-01-04
Estado: ✅ Completo (100% de cobertura)
Endpoints: 111
Recursos: 26
Cobertura: 100%

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured