Vignetim OpenAI MCP
Conecte la API de Socios (Partner API) de Vignetim a Cursor, Windsurf, Continue, OpenAI Agents SDK y cualquier plataforma que soporte el Protocolo de Contexto de Modelo (Model Context Protocol).
Configuración rápida
Cursor
Abra Cursor Settings → MCP → Add new MCP server:
{
"mcpServers": {
"vignetim": {
"url": "https://vignetim.com/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY",
"X-API-Secret": "YOUR_API_SECRET"
}
}
}
}
Windsurf
Agregue a su configuración MCP de Windsurf:
{
"mcpServers": {
"vignetim": {
"serverUrl": "https://vignetim.com/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY",
"X-API-Secret": "YOUR_API_SECRET"
}
}
}
}
Continue (VS Code)
Agregue a .continue/config.json:
{
"mcpServers": [
{
"name": "vignetim",
"url": "https://vignetim.com/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY",
"X-API-Secret": "YOUR_API_SECRET"
}
}
]
}
OpenAI Agents SDK (Python)
from openai_agents import Agent, MCPServerStreamableHttp
async with MCPServerStreamableHttp(
url="https://vignetim.com/api/mcp",
name="vignetim",
headers={
"X-API-Key": "YOUR_API_KEY",
"X-API-Secret": "YOUR_API_SECRET",
},
) as mcp:
agent = Agent(
name="Vignetim Partner",
instructions="You manage Vignetim API integration. Browse products, create orders, and manage webhooks.",
mcp_servers=[mcp],
)
result = await agent.run("List all Hungarian vignettes for cars")
OpenAI Agents SDK (Node.js)
import { Agent, MCPServerStreamableHttp } from '@openai/agents';
const mcp = new MCPServerStreamableHttp({
url: 'https://vignetim.com/api/mcp',
name: 'vignetim',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'X-API-Secret': 'YOUR_API_SECRET',
},
});
await mcp.connect();
const agent = new Agent({
name: 'Vignetim Partner',
instructions: 'You manage Vignetim API integration.',
mcpServers: [mcp],
});
const result = await agent.run('Show me my recent orders');
Herramientas disponibles (19 en total)
Productos (6 herramientas)
| Herramienta | Método | Endpoint de la API |
|---|---|---|
list_tickets | GET | /products/tickets |
get_ticket | GET | /products/tickets/:id |
list_esim_packages | GET | /products/esim |
list_insurance_products | GET | /products/insurance |
get_insurance_product | GET | /products/insurance/:slug |
list_vehicle_categories | GET | /products/vehicle-categories |
Pedidos (4 herramientas)
| Herramienta | Método | Endpoint de la API |
|---|---|---|
create_order | POST | /orders |
list_orders | GET | /orders |
get_order | GET | /orders/:id |
get_order_status | GET | /orders/:id/status |
Webhooks (5 herramientas)
| Herramienta | Método | Endpoint de la API |
|---|---|---|
create_webhook | POST | /webhooks |
list_webhooks | GET | /webhooks |
update_webhook | PUT | /webhooks/:id |
delete_webhook | DELETE | /webhooks/:id |
test_webhook | POST | /webhooks/:id/test |
Documentación (4 herramientas -- sin autenticación requerida)
| Herramienta | Descripción |
|---|---|
list_docs | Listar todas las secciones de documentación de la API |
get_doc | Obtener el contenido completo de una sección por slug |
search_docs | Buscar en toda la documentación |
get_openapi_spec | Obtener la URL de la especificación OpenAPI 3.0 |
Construir un agente personalizado
from openai_agents import Agent, MCPServerStreamableHttp, Runner
SYSTEM_PROMPT = """You are a Vignetim Partner API assistant.
You help manage e-vignette, eSIM, and insurance orders.
Available actions:
- Browse products (vignettes, eSIM packages, insurance)
- Create and track orders
- Set up and manage webhook notifications
- Search API documentation for integration help
Always confirm before creating orders or modifying webhooks.
Use sandbox mode for testing."""
async def main():
async with MCPServerStreamableHttp(
url="https://vignetim.com/api/mcp",
name="vignetim",
headers={
"X-API-Key": "YOUR_KEY",
"X-API-Secret": "YOUR_SECRET",
"X-Environment": "sandbox",
},
) as mcp:
agent = Agent(
name="Vignetim Assistant",
instructions=SYSTEM_PROMPT,
mcp_servers=[mcp],
)
result = await Runner.run(
agent,
"Set up webhooks for order.completed and order.failed events "
"at https://myapp.com/api/webhooks/vignetim, then send a test event."
)
print(result.final_output)
Modo sandbox
Agregue X-Environment: sandbox a sus encabezados para usar la API de sandbox con pagos simulados:
{
"headers": {
"X-API-Key": "YOUR_SANDBOX_KEY",
"X-API-Secret": "YOUR_SANDBOX_SECRET",
"X-Environment": "sandbox"
}
}
Alternativa: Acceso HTTP directo
Si su plataforma no soporta MCP:
| Recurso | URL |
|---|---|
| Especificación OpenAPI | https://vignetim.com/api/partner-openapi |
| LLMs.txt | https://vignetim.com/llms.txt |
| AI Plugin | https://vignetim.com/.well-known/ai-plugin.json |
| Documentación de la API | https://vignetim.com/es/developers/api-reference |
Solución de problemas
"API credentials required"
Las herramientas de la API necesitan ambos encabezados X-API-Key y X-API-Secret. Las herramientas de documentación funcionan sin credenciales.
Problemas de conexión
Verifique que el endpoint sea accesible:
curl -X POST https://vignetim.com/api/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Limitación de velocidad
El servidor MCP respeta los límites de velocidad de la API de Socios: 100 solicitudes/min general, 10 solicitudes/min para creación de pedidos. El sandbox tiene un multiplicador de 5x.