Skip to content

Commit e37f463

Browse files
committed
chore: LeadMagic Cursor plugin for hosted MCP
Made-with: Cursor
0 parents  commit e37f463

20 files changed

Lines changed: 1128 additions & 0 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "leadmagic",
3+
"displayName": "LeadMagic",
4+
"version": "0.1.3",
5+
"description": "Official LeadMagic plugin for Cursor with hosted MCP: emails, mobile, LinkedIn-to-email, job changes, company research, competitors, technographics, and credits.",
6+
"author": {
7+
"name": "LeadMagic",
8+
"email": "plugins@leadmagic.io"
9+
},
10+
"homepage": "https://leadmagic.io",
11+
"repository": "https://github.com/LeadMagic/leadmagic-cursor-plugin",
12+
"license": "MIT",
13+
"logo": "assets/logo.svg",
14+
"keywords": [
15+
"leadmagic",
16+
"cursor",
17+
"mcp",
18+
"b2b",
19+
"data-enrichment",
20+
"email-validation",
21+
"email-finder",
22+
"company-intelligence",
23+
"prospecting",
24+
"gtm"
25+
],
26+
"category": "developer-tools",
27+
"tags": ["sales", "prospecting", "enrichment", "mcp", "api"],
28+
"rules": "./rules/",
29+
"skills": "./skills/",
30+
"mcpServers": "./mcp.json"
31+
}

.github/pull_request_template.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Pull Request
2+
3+
## Summary
4+
5+
<!-- What changed and why? -->
6+
7+
## Type Of Change
8+
9+
- [ ] Documentation
10+
- [ ] Skills or rules
11+
- [ ] MCP config or metadata
12+
- [ ] Validation or GitHub automation
13+
- [ ] Other maintenance
14+
15+
## Validation
16+
17+
- [ ] Ran `npm run validate`
18+
- [ ] Checked that copy matches the current hosted MCP surface
19+
- [ ] Verified no secrets or hardcoded API keys were added
20+
21+
## Alignment Checklist
22+
23+
- [ ] `mcp.json` still points to `https://mcp.leadmagic.io/mcp`
24+
- [ ] Auth still uses `x-leadmagic-key`
25+
- [ ] Repo copy does not imply MCP support for tools outside the current MCP surface
26+
- [ ] README and submission copy stay consistent
27+
28+
## Notes For Reviewers
29+
30+
<!-- Anything reviewers should pay extra attention to? -->
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Validate Cursor Plugin
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
paths:
9+
- ".cursor-plugin/**"
10+
- ".github/**"
11+
- "assets/**"
12+
- "mcp.json"
13+
- "package.json"
14+
- "package-lock.json"
15+
- "README.md"
16+
- "SUBMISSION.md"
17+
- "rules/**"
18+
- "schemas/**"
19+
- "scripts/**"
20+
- "skills/**"
21+
22+
jobs:
23+
validate:
24+
name: Validate package structure
25+
runs-on: ubuntu-latest
26+
env:
27+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v5
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v5
35+
with:
36+
node-version: "22"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Validate plugin package
42+
run: npm run validate
43+
44+
- name: Check hosted MCP endpoint
45+
run: |
46+
node <<'EOF'
47+
const fs = require('node:fs');
48+
const data = JSON.parse(fs.readFileSync('mcp.json', 'utf8'));
49+
const server = data.mcpServers?.leadmagic;
50+
51+
if (!server || server.type !== 'http' || server.url !== 'https://mcp.leadmagic.io/mcp') {
52+
throw new Error('mcp.json must point to the hosted LeadMagic MCP endpoint with explicit HTTP transport');
53+
}
54+
55+
if (!server.headers || server.headers['x-leadmagic-key'] !== '${LEADMAGIC_API_KEY}') {
56+
throw new Error('mcp.json must use LEADMAGIC_API_KEY interpolation');
57+
}
58+
EOF
59+
60+
- name: Check README references
61+
run: |
62+
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)}}"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.DS_Store
3+
!package-lock.json

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to the LeadMagic Cursor plugin will be documented in this file.
4+
5+
## [Unreleased]
6+
7+
### Changed
8+
- SUBMISSION.md and README aligned with the full 10-tool MCP surface; added data/privacy/terms disclosure for marketplace review.
9+
- Quick Start: fixed heading levels under local install steps.
10+
- Plugin version 0.1.3.
11+
- README, rules, and skills describe the expanded hosted MCP tool set (mobile, LinkedIn-to-email, job change, competitors, technographics, people-by-role).
12+
- Rules: avoid speculative deliverability or catch-all commentary; stick to tool output for validation.
13+
- Aligns with hosted MCP email-validation summaries that surface `email_status` correctly.
14+
15+
### Added
16+
- Initial public Cursor plugin package structure
17+
- Hosted MCP configuration for `https://mcp.leadmagic.io/mcp`
18+
- Skills, rules, validation script, and marketplace submission copy
19+
20+
### Changed
21+
- Synced repository copy to the current LeadMagic MCP surface: 10 tools, 1 docs resource (`leadmagic://docs`), and 2 built-in prompts
22+
- Removed wording that implied MCP support for ad-search endpoints that are part of the REST API but not the current MCP tool surface
23+
- Tightened skills and default guidance around company research, job-change checks, hiring signals, and credit-aware workflows
24+
- Added GitHub pull request and validation scaffolding so the plugin repo matches the OpenAPI repo's baseline maintenance hygiene
25+
- Expanded README and submission docs with clearer install, validation, troubleshooting, and marketplace submission steps
26+
- Tightened plugin metadata and marketplace submission copy around the current hosted MCP surface: work email validation, work email finding, account research, and credit-aware enrichment
27+
- Added the shared plugin contact email to `plugin.json` and `SUBMISSION.md` for a cleaner publisher-facing package
28+
- Corrected rules and skill guidance so they reference only the currently supported hosted MCP tools instead of older or broader API-only tool names

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 LeadMagic
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# LeadMagic Cursor Plugin
2+
3+
Official LeadMagic plugin for Cursor. It connects Cursor to LeadMagic's hosted MCP server so agents can run credit-aware enrichment—work emails, mobile, B2B profile-to-email, job-change signals, account research, competitors, technographics, people-by-role, and credits—without leaving the editor.
4+
5+
## Overview
6+
7+
This repository packages LeadMagic's hosted MCP integration in a Cursor-native format for marketplace distribution, local installation, and team use. The goal is straightforward: make LeadMagic's enrichment and research workflows available to Cursor agents with minimal setup and clear operational guidance.
8+
9+
The package includes:
10+
11+
- Hosted LeadMagic MCP connectivity for Cursor
12+
- The current LeadMagic MCP surface:
13+
- 10 tools: credits, work email validate/find, mobile, LinkedIn-to-email, job-change detection, account research, competitors, technographics, people-by-role
14+
- 1 shared docs resource: `leadmagic://docs`
15+
- 2 built-in prompts: `account_research` and `contact_lookup`
16+
- Four focused Cursor skills aligned to the current hosted MCP surface:
17+
- contact enrichment
18+
- account intelligence
19+
- prospect list QA
20+
- signal research
21+
- One default rule that nudges Cursor toward efficient, low-duplication LeadMagic usage
22+
23+
## Why Use It
24+
25+
Use this plugin when you want Cursor to help with:
26+
27+
- validating or finding work emails, or resolving email from a B2B profile URL
28+
- mobile lookup, job-change checks, and role-based people search at a company
29+
- researching account fit, funding context, competitors, and technology signals
30+
- keeping enrichment workflows credit-aware and repeatable
31+
32+
## Data and privacy
33+
34+
MCP tool calls send the parameters you or the agent provide (for example emails, names, company names or domains, profile URLs) to LeadMagic's hosted service using your `LEADMAGIC_API_KEY`. See [Privacy](https://leadmagic.io/privacy) and [Terms](https://leadmagic.io/legal/terms). Support: [leadmagic.io/docs/support](https://leadmagic.io/docs/support).
35+
36+
## Hosted MCP Configuration
37+
38+
The plugin points Cursor at LeadMagic's hosted MCP endpoint:
39+
40+
- MCP endpoint: `https://mcp.leadmagic.io/mcp`
41+
- MCP transport: `http`
42+
- Auth header: `x-leadmagic-key`
43+
44+
Users provide their API key through the `LEADMAGIC_API_KEY` environment variable. The plugin forwards that key to the hosted MCP server at runtime.
45+
46+
## What The MCP Supports Today
47+
48+
The hosted MCP surface supports:
49+
50+
- `check_credit_balance`, `validate_work_email`, `find_work_email`
51+
- `find_mobile_number`, `linkedin_profile_to_work_email`, `detect_job_change`
52+
- `research_account`, `list_company_competitors`, `get_company_technographics`, `find_people_by_role`
53+
54+
The broader REST API includes more endpoints (jobs, ads, analytics, etc.); this plugin tracks the hosted MCP tool list above. See `leadmagic://docs` in Cursor for the live tool reference.
55+
56+
## Quick Start
57+
58+
You can use this plugin in three ways:
59+
60+
- install it from the Cursor marketplace after approval
61+
- import the repository into a Cursor team marketplace for internal distribution
62+
- symlink it locally for development and pre-submission testing
63+
64+
### Install from the marketplace
65+
66+
After approval, install the plugin from the marketplace panel in Cursor.
67+
68+
### Import as a team marketplace
69+
70+
For private team distribution in Cursor:
71+
72+
1. Open `Dashboard -> Settings -> Plugins`.
73+
2. In `Team Marketplaces`, click `Import`.
74+
3. Paste `https://github.com/LeadMagic/leadmagic-cursor-plugin`.
75+
4. Review the parsed plugin and save the marketplace.
76+
77+
### Install locally for testing
78+
79+
#### 1. Set your API key
80+
81+
```bash
82+
export LEADMAGIC_API_KEY="your_api_key_here"
83+
```
84+
85+
#### 2. Link the repository into Cursor
86+
87+
If you are using this repository locally:
88+
89+
```bash
90+
npm ci
91+
npm run install:local
92+
```
93+
94+
This creates a symlink at `~/.cursor/plugins/local/leadmagic` pointing to this repository.
95+
96+
Then reload Cursor with `Developer: Reload Window`.
97+
98+
#### 3. Verify the connection
99+
100+
Ask Cursor one of these:
101+
102+
- `Check my LeadMagic credit balance.`
103+
- `Validate this email with LeadMagic: jane@company.com`
104+
- `Research Ramp as an account and summarize the best buying signals.`
105+
106+
## Local Development
107+
108+
From the repository root, install dependencies and validate the package:
109+
110+
```bash
111+
npm ci
112+
npm run validate
113+
```
114+
115+
To link the plugin into Cursor locally:
116+
117+
```bash
118+
npm run install:local
119+
```
120+
121+
To remove the local symlink later:
122+
123+
```bash
124+
npm run uninstall:local
125+
```
126+
127+
## Troubleshooting
128+
129+
### Cursor cannot see `LEADMAGIC_API_KEY`
130+
131+
On macOS, if Cursor was launched from the dock or Finder, it may not inherit your shell environment. If `LEADMAGIC_API_KEY` is set in your terminal but LeadMagic still fails inside Cursor, launch Cursor from the same shell session or reload it after exporting the variable in an environment Cursor can see.
132+
133+
### Authentication fails
134+
135+
Confirm that:
136+
137+
- `LEADMAGIC_API_KEY` is set in the environment visible to Cursor
138+
- the plugin is using `https://mcp.leadmagic.io/mcp`
139+
- the request header is `x-leadmagic-key`
140+
141+
### You need exact tool details
142+
143+
Use the shared docs resource `leadmagic://docs` or review:
144+
145+
- [LeadMagic MCP Setup](https://leadmagic.io/docs/mcp/setup)
146+
- [LeadMagic MCP Tools](https://leadmagic.io/docs/mcp/tools)
147+
- [LeadMagic MCP Troubleshooting](https://leadmagic.io/docs/mcp/troubleshooting)
148+
149+
## Example Prompts
150+
151+
- `Check my LeadMagic credit balance.`
152+
- `Validate these prospect emails and tell me which are safe to use.`
153+
- `Find the best work email for Jane Doe at Snowflake.`
154+
- `Research Ramp as an account and tell me the best buying signals.`
155+
- `Use contact_lookup to validate jane@company.com and summarize the result.`
156+
- `Use account_research for Stripe and summarize the strongest GTM angle.`
157+
158+
## Repository Layout
159+
160+
```text
161+
.cursor-plugin/plugin.json
162+
.github/pull_request_template.md
163+
.github/workflows/validate-plugin.yml
164+
assets/logo.svg
165+
mcp.json
166+
package-lock.json
167+
schemas/plugin.schema.json
168+
rules/leadmagic-usage.mdc
169+
skills/*/SKILL.md
170+
scripts/install-local-plugin.mjs
171+
scripts/validate-plugin.mjs
172+
README.md
173+
SUBMISSION.md
174+
CHANGELOG.md
175+
```
176+
177+
## Validation
178+
179+
```bash
180+
npm run validate
181+
```
182+
183+
The validator checks this package against a vendored snapshot of Cursor's official `plugin.schema.json` and then applies LeadMagic-specific assertions for:
184+
185+
- the hosted MCP endpoint
186+
- `LEADMAGIC_API_KEY` interpolation
187+
- the canonical logo asset and submission logo URL
188+
- skills and rules metadata
189+
- repository and submission copy consistency
190+
191+
## Marketplace Submission
192+
193+
Use `SUBMISSION.md` for ready-to-paste marketplace form values, reviewer notes, and a final pre-submit checklist.
194+
195+
## Companion Resources
196+
197+
- OpenAPI snapshot and schema docs: [LeadMagic OpenAPI](https://github.com/LeadMagic/leadmagic-openapi)
198+
- Product docs index: [leadmagic.io/docs/llms.txt](https://leadmagic.io/docs/llms.txt)
199+
- Website: [leadmagic.io](https://leadmagic.io)
200+
- Privacy: [leadmagic.io/privacy](https://leadmagic.io/privacy)
201+
- Terms: [leadmagic.io/legal/terms](https://leadmagic.io/legal/terms)

0 commit comments

Comments
 (0)