Skip to content

chore: LeadMagic Cursor plugin for hosted MCP #11

chore: LeadMagic Cursor plugin for hosted MCP

chore: LeadMagic Cursor plugin for hosted MCP #11

name: Validate Cursor Plugin
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- ".cursor-plugin/**"
- ".github/**"
- "assets/**"
- "mcp.json"
- "package.json"
- "package-lock.json"
- "README.md"
- "SUBMISSION.md"
- "rules/**"
- "schemas/**"
- "scripts/**"
- "skills/**"
jobs:
validate:
name: Validate package structure
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: "22"
- name: Install dependencies
run: npm ci
- name: Validate plugin package
run: npm run validate
- name: Check hosted MCP endpoint
run: |
node <<'EOF'
const fs = require('node:fs');
const data = JSON.parse(fs.readFileSync('mcp.json', 'utf8'));
const server = data.mcpServers?.leadmagic;
if (!server || server.type !== 'http' || server.url !== 'https://mcp.leadmagic.io/mcp') {
throw new Error('mcp.json must point to the hosted LeadMagic MCP endpoint with explicit HTTP transport');
}
if (!server.headers || server.headers['x-leadmagic-key'] !== '${LEADMAGIC_API_KEY}') {
throw new Error('mcp.json must use LEADMAGIC_API_KEY interpolation');
}
EOF
- name: Check README references
run: |
node -e "const fs=require('node:fs');const text=fs.readFileSync('README.md','utf8');for(const value of ['https://mcp.leadmagic.io/mcp','leadmagic://docs','LeadMagic MCP Tools']){if(!text.includes(value)){throw new Error('README.md is missing required reference: '+value)}}"