Skip to content

Commit 4a787f9

Browse files
committed
feat(plugin): add Cursor agent + commands (align with plugin model)
- agents/leadmagic-enrichment.md; commands check-credits, research-company, validate-email - plugin.json: agents, commands paths; keywords; v0.1.6 - validate frontmatter for agents/commands; README vs Encore + Cursor docs - SUBMISSION + PR template + CI paths + CHANGELOG Made-with: Cursor
1 parent 942b1bd commit 4a787f9

12 files changed

Lines changed: 123 additions & 8 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "leadmagic",
33
"displayName": "LeadMagic",
4-
"version": "0.1.5",
5-
"description": "Official LeadMagic plugin for Cursor with hosted MCP (OAuth by default): emails, mobile, LinkedIn-to-email, job changes, company research, competitors, technographics, and credits.",
4+
"version": "0.1.6",
5+
"description": "Official LeadMagic plugin for Cursor with hosted MCP (OAuth by default), skills, rules, agent, and commands: emails, mobile, LinkedIn-to-email, job changes, company research, competitors, technographics, and credits.",
66
"author": {
77
"name": "LeadMagic",
88
"email": "plugins@leadmagic.io"
@@ -21,11 +21,15 @@
2121
"email-finder",
2222
"company-intelligence",
2323
"prospecting",
24-
"gtm"
24+
"gtm",
25+
"agent",
26+
"commands"
2527
],
2628
"category": "developer-tools",
2729
"tags": ["sales", "prospecting", "enrichment", "mcp", "api"],
2830
"rules": "./rules/",
2931
"skills": "./skills/",
32+
"agents": "./agents/",
33+
"commands": "./commands/",
3034
"mcpServers": "./mcp.json"
3135
}

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
- [ ] `mcp.json` still points to `https://mcp.leadmagic.io/mcp`
2424
- [ ] Default `mcp.json` stays OAuth-only (no headers); API-key fallback documented in README if needed
25+
- [ ] New or edited `agents/*.md` and `commands/*.md` include YAML frontmatter (`name`, `description`)
2526
- [ ] Repo copy does not imply MCP support for tools outside the current MCP surface
2627
- [ ] README and submission copy stay consistent
2728

.github/workflows/validate-plugin.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
- "README.md"
1616
- "SUBMISSION.md"
1717
- "rules/**"
18+
- "agents/**"
19+
- "commands/**"
1820
- "schemas/**"
1921
- "scripts/**"
2022
- "CHANGELOG.md"
@@ -44,4 +46,4 @@ jobs:
4446

4547
- name: Check README references
4648
run: |
47-
node -e "const fs=require('node:fs');const text=fs.readFileSync('README.md','utf8');for(const value of ['https://mcp.leadmagic.io/mcp','https://github.com/LeadMagic/leadmagic-openapi','leadmagic://docs','LeadMagic MCP Tools','OAuth']){if(!text.includes(value)){throw new Error('README.md is missing required reference: '+value)}}"
49+
node -e "const fs=require('node:fs');const text=fs.readFileSync('README.md','utf8');for(const value of ['https://mcp.leadmagic.io/mcp','https://github.com/LeadMagic/leadmagic-openapi','https://cursor.com/docs/plugins','leadmagic://docs','LeadMagic MCP Tools','OAuth']){if(!text.includes(value)){throw new Error('README.md is missing required reference: '+value)}}"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to the LeadMagic Cursor plugin package are documented here.
44

5+
## 0.1.6
6+
7+
- **Cursor plugin model:** Add `agents/leadmagic-enrichment.md` and `commands/` (`check-credits`, `research-company`, `validate-email`); wire `agents` and `commands` in `plugin.json` to match patterns used by plugins such as [encoredev/cursor-plugin](https://github.com/encoredev/cursor-plugin).
8+
- **Validation:** Assert agent/command markdown frontmatter; README links to [Cursor Plugins docs](https://cursor.com/docs/plugins).
9+
510
## 0.1.5
611

712
- **Docs:** README clarifies MCP (Cursor) vs REST (OpenAPI), links [leadmagic-openapi](https://github.com/LeadMagic/leadmagic-openapi) and product docs; validator and CI require the OpenAPI repo URL in README.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This repository packages LeadMagic's hosted MCP integration in a Cursor-native f
1515
| Cursor agents, chat, or IDE automation over LeadMagic | This plugin + hosted MCP at `https://mcp.leadmagic.io/mcp` (default **OAuth** in Cursor) |
1616
| Your own services, scripts, or non-MCP clients calling `https://api.leadmagic.io` | [LeadMagic OpenAPI](https://github.com/LeadMagic/leadmagic-openapi) (YAML/JSON snapshot, `llms.txt`, and `test-api` smoke tests) + [product API docs](https://leadmagic.io/docs) |
1717

18-
The OpenAPI repository is the best place for **schema-level** detail and **direct HTTP** examples. This plugin repo is the source for **Cursor packaging** (skills, rules, `mcp.json`, validation). Keep terminology aligned: MCP tools wrap a **subset** of the broader REST surface (for example jobs and ads APIs are not exposed as MCP tools today).
18+
The OpenAPI repository is the best place for **schema-level** detail and **direct HTTP** examples. This plugin repo is the source for **Cursor packaging** (skills, rules, agents, commands, `mcp.json`, validation). Keep terminology aligned: MCP tools wrap a **subset** of the broader REST surface (for example jobs and ads APIs are not exposed as MCP tools today).
1919

2020
The package includes:
2121

@@ -30,6 +30,12 @@ The package includes:
3030
- prospect list QA
3131
- signal research
3232
- One default rule that nudges Cursor toward efficient, low-duplication LeadMagic usage
33+
- One **agent** (`leadmagic-enrichment`): a dedicated enrichment/research persona wired to MCP best practices
34+
- **Commands** (playbooks): check credits, research a company, validate an email—usable from the Cursor commands palette like other marketplace plugins
35+
36+
### How this compares to other Cursor plugins
37+
38+
Well-structured plugins (for example [Encore’s Cursor plugin](https://github.com/encoredev/cursor-plugin), which bundles rules, skills, MCP, an agent, and commands) follow the same **Cursor plugin model** described in the official docs: [Plugins](https://cursor.com/docs/plugins) and the [plugin-template](https://github.com/cursor/plugin-template) monorepo. LeadMagic matches that shape where it makes sense for **hosted SaaS enrichment**: we ship **HTTP/streamable MCP** to `https://mcp.leadmagic.io/mcp` (OAuth by default) instead of launching a **local stdio** MCP process—appropriate because LeadMagic runs as a hosted API. Optional **hooks** or local scripts are not included until there is a clear, supportable automation story for all users.
3339

3440
## Why Use It
3541

@@ -198,6 +204,8 @@ Use the shared docs resource `leadmagic://docs` or review:
198204
.cursor-plugin/plugin.json
199205
.github/pull_request_template.md
200206
.github/workflows/validate-plugin.yml
207+
agents/*.md
208+
commands/*.md
201209
assets/logo.svg
202210
mcp.json
203211
package-lock.json

SUBMISSION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins@leadmagic.io
2020
https://raw.githubusercontent.com/LeadMagic/leadmagic-cursor-plugin/main/assets/logo.svg
2121

2222
**Description**
23-
Official LeadMagic plugin for Cursor. Gives agents direct access to LeadMagic's hosted MCP surface for work email validation and discovery, mobile lookup, LinkedIn profile to work email, job-change detection, account research, competitor and technographics lists, people-by-role search, and credit balance—authenticated by default with OAuth in Cursor, with an optional API-key path for advanced setups.
23+
Official LeadMagic plugin for Cursor. Gives agents direct access to LeadMagic's hosted MCP surface for work email validation and discovery, mobile lookup, LinkedIn profile to work email, job-change detection, account research, competitor and technographics lists, people-by-role search, and credit balance—authenticated by default with OAuth in Cursor, with an optional API-key path for advanced setups. Includes skills, rules, a dedicated enrichment agent, and command playbooks aligned with Cursor's plugin model.
2424

2525
**GitHub repository**
2626
https://github.com/LeadMagic/leadmagic-cursor-plugin
@@ -42,7 +42,7 @@ Before submitting:
4242

4343
## Suggested reviewer note
4444

45-
LeadMagic is an API-first B2B enrichment platform for AI agents and GTM engineers. This plugin packages our hosted MCP integration (10 tools, `leadmagic://docs`, two prompts) into a Cursor-native repo with focused skills, safe default guidance, and OAuth-first MCP auth (optional `LEADMAGIC_API_KEY` header for environments that need it). Tool calls are processed per LeadMagic privacy and terms at leadmagic.io.
45+
LeadMagic is an API-first B2B enrichment platform for AI agents and GTM engineers. This plugin packages our hosted MCP integration (10 tools, `leadmagic://docs`, two prompts) into a Cursor-native repo with focused skills, a dedicated enrichment agent, command playbooks, safe default guidance, and OAuth-first MCP auth (optional `LEADMAGIC_API_KEY` header for environments that need it). Tool calls are processed per LeadMagic privacy and terms at leadmagic.io.
4646

4747
## Short marketplace blurb alternatives
4848

agents/leadmagic-enrichment.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: leadmagic-enrichment
3+
description: GTM enrichment assistant for Cursor. Uses the hosted LeadMagic MCP server for credit-aware email validation, discovery, mobile, job-change signals, account research, competitors, technographics, and role-based people search.
4+
---
5+
6+
# LeadMagic enrichment assistant
7+
8+
You help users run **credit-aware B2B enrichment and research** inside Cursor using the **LeadMagic MCP** tools (not generic web scraping).
9+
10+
## MCP access
11+
12+
Assume the LeadMagic MCP server is available when this plugin is installed and the user has completed **OAuth** (or API-key auth per the plugin README). Prefer **MCP tools** over guessing APIs or inventing parameters.
13+
14+
Before ambiguous work, skim **`leadmagic://docs`** for parameter names and constraints.
15+
16+
## How you work
17+
18+
1. **Credits:** For bulk or expensive flows, start with `check_credit_balance` when the user cares about spend.
19+
2. **Emails:** If the user already has a work email, use `validate_work_email` before `find_work_email`. Use `linkedin_profile_to_work_email` when the best input is a B2B profile URL.
20+
3. **Account context:** Use `research_account` once per company and reuse the summary instead of repeating similar calls.
21+
4. **Depth:** Use `list_company_competitors`, `get_company_technographics`, or `find_people_by_role` only when the user explicitly needs competitors, tech stack, or role-based lists.
22+
5. **Signals:** Use `detect_job_change` when the user asks about recent role changes.
23+
6. **Output:** State which tools ran, key results, nulls or not-found cases, and a sensible next step.
24+
25+
## What you avoid
26+
27+
- Repeating the same enrichment for identical inputs unless the user asks for a refresh.
28+
- Claiming deliverability or data the tool output does not include.
29+
- Treating the REST API or OpenAPI repo as executable from here unless the user is writing integration code—default to **MCP tools** for in-editor tasks.

commands/check-credits.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: check-credits
3+
description: Verify LeadMagic MCP is connected and show remaining credits using the hosted MCP tool.
4+
---
5+
6+
# Check LeadMagic credits
7+
8+
1. Confirm the LeadMagic MCP server is enabled in Cursor and you are signed in (OAuth) or using API-key mode per the plugin README.
9+
2. Ask the agent to run the MCP tool `check_credit_balance` and report the balance and any message returned.
10+
3. If the tool errors, check MCP settings, `https://mcp.leadmagic.io/health`, and the troubleshooting section in the plugin README.

commands/research-company.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: research-company
3+
description: Run a single account research pass on a company (name or domain) and summarize GTM-relevant signals via LeadMagic MCP.
4+
---
5+
6+
# Research a company
7+
8+
1. Collect **company domain** or **company name** from the user (prefer domain when available).
9+
2. Use the MCP tool `research_account` once with the best available identifiers.
10+
3. Summarize industry, size signals, funding snapshot if present, and obvious angles for outreach—only from tool output.
11+
4. If the user wants more depth, add **only** what they ask for: `list_company_competitors`, `get_company_technographics`, or `find_people_by_role` (with role and company context).

commands/validate-email.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: validate-email
3+
description: Validate a work email with LeadMagic MCP before sending or storing it as verified.
4+
---
5+
6+
# Validate a work email
7+
8+
1. Obtain the **work email** the user wants checked.
9+
2. Run `validate_work_email` via MCP with that email.
10+
3. Report the tool’s stated result and any fields returned (do not infer beyond the response).
11+
4. If validation is inconclusive or the user still needs an address, consider `find_work_email` only when they provide person + company context.

0 commit comments

Comments
 (0)