Skip to main content
Glama
scenario.yaml3.43 kB
# Verifies MCPX connects to the Cursor AI agent via MCP and the dashboard reflects the connection. name: "Cursor Agent Smoke Test" image: us-central1-docker.pkg.dev/prj-common-442813/mcpx/mcpx:v0.2.17-66354a7 configMount: config env: {} dependentContainers: [] aiAgent: type: cursor verboseOutput: false steps: - name: "Time MCP Server Call" kind: backend toolName: time__get_current_time payload: timezone: "UTC" expected: mode: regex value: "\"timezone\"\\s*:\\s*\"UTC\"" - name: Load Control-Plane UI kind: browser toolName: browser_navigate payload: url: http://localhost:5173 expected: mode: regex value: "Ran Playwright code" - name: Wait for AI Agent node kind: browser toolName: browser_wait_for payload: text: "AI Agent" time: 60 expected: mode: contains value: "Waited for AI Agent" - name: Verify Cursor agent icon visible kind: browser toolName: browser_evaluate payload: function: | () => { const nodes = Array.from(document.querySelectorAll('[id^="agent-"]')); if (!nodes.length) return 'cursor-node-missing'; const target = nodes[0]; const icon = target.querySelector('img[alt$="Agent Avatar"]'); if (!icon) return 'cursor-icon-missing'; const rect = icon.getBoundingClientRect(); if (rect.width <= 0 || rect.height <= 0) return 'cursor-icon-not-visible'; const style = window.getComputedStyle(icon); if (style.display === 'none' || style.visibility === 'hidden') { return 'cursor-icon-hidden'; } const alt = icon.getAttribute('alt') || ''; const src = icon.getAttribute('src') || ''; if (/cursor/i.test(alt) || /cursor_icon_mcp/i.test(src)) { return 'cursor-icon-ok'; } return `cursor-icon-generic:${alt || src}`; } expected: mode: regex value: "cursor-icon-ok|cursor-icon-generic:.*" - name: Verify only Cursor agent connected kind: browser toolName: browser_evaluate payload: function: | async () => { try { const response = await fetch('http://localhost:9000/system-state', { headers: { 'Accept': 'application/json' }, }); if (!response.ok) { return `system-state-error:${response.status}`; } const data = await response.json(); const clients = Array.isArray(data?.connectedClients) ? data.connectedClients : []; const tags = clients .map((client) => (client.consumerTag || '').toLowerCase()) .filter(Boolean); const cursorTags = tags.filter((tag) => tag.includes('cursor')); const otherTags = tags.filter((tag) => !tag.includes('cursor')); if (cursorTags.length !== 1) { return `unexpected-cursor-count:${cursorTags.length}|tags:${tags.join(',')}`; } if (otherTags.length > 0) { return `unexpected-other-tags:${otherTags.join(',')}`; } return 'cursor-agent-single-ok'; } catch (err) { return `system-state-fetch-failed:${(err && err.message) || err}`; } } expected: mode: contains value: "cursor-agent-single-ok"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TheLunarCompany/lunar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server