Vignetim

Vignetim OpenAI MCP

Свържете партньорския API на Vignetim с Cursor, Windsurf, Continue, OpenAI Agents SDK и всяка платформа, поддържаща Model Context Protocol.

Бърза настройка

Cursor

Отворете 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

Добавете към вашата MCP конфигурация на 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)

Добавете в .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');

Налични инструменти (общо 19)

Продукти (6 инструмента)

ИнструментMethodAPI крайна точка
list_ticketsGET/products/tickets
get_ticketGET/products/tickets/:id
list_esim_packagesGET/products/esim
list_insurance_productsGET/products/insurance
get_insurance_productGET/products/insurance/:slug
list_vehicle_categoriesGET/products/vehicle-categories

Поръчки (4 инструмента)

ИнструментMethodAPI крайна точка
create_orderPOST/orders
list_ordersGET/orders
get_orderGET/orders/:id
get_order_statusGET/orders/:id/status

Webhooks (5 инструмента)

ИнструментMethodAPI крайна точка
create_webhookPOST/webhooks
list_webhooksGET/webhooks
update_webhookPUT/webhooks/:id
delete_webhookDELETE/webhooks/:id
test_webhookPOST/webhooks/:id/test

Документация (4 инструмента — без удостоверяване)

ИнструментОписание
list_docsСписък на всички раздели от API документацията
get_docПолучаване на пълното съдържание на раздел по slug
search_docsТърсене в цялата документация
get_openapi_specПолучаване на URL адреса на OpenAPI 3.0 спецификацията

Изграждане на персонализиран агент

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)

Sandbox режим

Добавете X-Environment: sandbox към вашите хедъри, за да използвате sandbox API-то със симулирани плащания:

{
	"headers": {
		"X-API-Key": "YOUR_SANDBOX_KEY",
		"X-API-Secret": "YOUR_SANDBOX_SECRET",
		"X-Environment": "sandbox"
	}
}

Алтернатива: Директен HTTP достъп

Ако вашата платформа не поддържа MCP:

РесурсURL
OpenAPI спецификацияhttps://vignetim.com/api/partner-openapi
LLMs.txthttps://vignetim.com/llms.txt
AI Pluginhttps://vignetim.com/.well-known/ai-plugin.json
API документацияhttps://vignetim.com/bg/developers/api-reference

Отстраняване на проблеми

„API credentials required"

API инструментите изискват и двата хедъра X-API-Key и X-API-Secret. Инструментите за документация работят без идентификационни данни.

Проблеми с връзката

Проверете дали крайната точка е достъпна:

curl -X POST https://vignetim.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Ограничение на заявки

MCP сървърът спазва ограниченията на партньорския API: 100 заявки/мин общо, 10 заявки/мин за създаване на поръчки. Sandbox режимът има 5x множител.