Seedlens
Marketing automation MCP server β crawl pages, extract SEO data & contacts, send marketing emails.
Installation
npx seedlensAsk AI about Seedlens
Powered by Claude Β· Grounded in docs
I know everything about Seedlens. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
SeedLens
Marketing automation MCP server β crawl pages, extract SEO data & contacts, send marketing emails.
Overview
SeedLens is a Model Context Protocol (MCP) server that turns any AI assistant (Claude, Cursor, VS Code Copilot, etc.) into a marketing automation tool. It provides 4 tools:
| Tool | Description |
|---|---|
extract_contacts | Crawl a URL and extract emails, phone numbers, social media links, and physical addresses |
extract_seo_data | Crawl a URL and extract meta tags, Open Graph, headings, images, links, JSON-LD, robots.txt, sitemap |
send_marketing_email | Render and send a marketing email via SMTP using a React Email template |
preview_marketing_email | Render an email HTML preview without sending |
Tech Stack
- TypeScript (ESM) +
@modelcontextprotocol/sdkv2 - Zod v4 β input/output schema validation for all tools
- Playwright β headless Chromium browser for page crawling
- Nodemailer β SMTP email delivery (QQ Mail, Gmail, etc.)
- React Email β inline-styled HTML email templates
- Vitest β testing framework
Quick Start
Prerequisites
- Node.js >= 18
- npm
Install
npm install
npx playwright install chromium
Configure
Copy the example env file and fill in your SMTP credentials:
cp .env.example .env
.env fields:
| Variable | Description | Default |
|---|---|---|
SMTP_HOST | SMTP server hostname | smtp.qq.com |
SMTP_PORT | SMTP server port | 465 |
SMTP_USER | Sender email address | β |
SMTP_PASSWORD | SMTP authorization code | β |
BROWSER_HEADLESS | Run browser headless | true |
BROWSER_TIMEOUT | Page load timeout (ms) | 30000 |
Build & Run
# Build
npm run build
# Run (stdio transport)
npm start
# Dev mode (no build needed)
npm run dev
Test
npm test
IDE Integration
Claude Code
The MCP server is auto-configured via .claude/settings.local.json. After building, restart Claude Code and the 4 tools will be available.
Cursor
Configured via .cursor/mcp.json. Set SMTP environment variables in your shell or .env before launching.
VS Code
Configured via .vscode/mcp.json with input prompts β you'll be asked for SMTP credentials on first run.
Project Structure
seedlens/
βββ src/
β βββ index.ts # Entry: register tools + stdio transport
β βββ config/env.ts # Environment variable validation (Zod)
β βββ i18n/strings.ts # Email i18n strings + subject template resolver
β βββ schemas/
β β βββ common.schema.ts # URL, timestamp, ExtractionMeta
β β βββ contact.schema.ts # Contact extraction input/output
β β βββ seo.schema.ts # SEO data input/output
β β βββ email.schema.ts # Email tool input/output
β βββ services/
β β βββ browser-manager.ts # Playwright singleton + withPage()
β β βββ contact-extractor.ts # Contact DOM extraction
β β βββ seo-extractor.ts # SEO DOM extraction
β β βββ email-service.ts # Nodemailer + React Email rendering
β βββ templates/
β β βββ marketing-email.tsx # React Email marketing template
β βββ tools/
β βββ extract-contacts.ts # extract_contacts tool registration
β βββ extract-seo-data.ts # extract_seo_data tool registration
β βββ send-marketing-email.ts # send_marketing_email tool registration
β βββ preview-marketing-email.ts # preview_marketing_email tool registration
βββ tests/
β βββ setup.ts # Vitest global setup/teardown
β βββ extract-contacts.test.ts
β βββ extract-seo-data.test.ts
β βββ preview-marketing-email.test.ts
β βββ resolve-subject.test.ts
β βββ send-marketing-email.test.ts
βββ package.json
βββ tsconfig.json
βββ vitest.config.ts
Architecture
Browser Manager
A singleton Playwright browser instance is reused across requests to avoid the 1-3s cold start per launch. Each tool call gets an isolated BrowserContext via withPage(url, fn), ensuring no cookie/state leakage between requests. The browser is automatically cleaned up on process exit.
Single page.evaluate()
All DOM queries (contacts, SEO data) are executed in a single page.evaluate() call, minimizing IPC round-trips between Node.js and the browser for optimal performance.
Email Rendering
Marketing emails are built with React Email components using inline CSS styles for maximum email client compatibility. The renderEmail() function produces both HTML and plain text versions.
Schema Validation
Every tool uses Zod schemas for both inputSchema and outputSchema, providing type-safe validation and enabling MCP clients to understand the data structure.
Usage Examples
Once connected to an MCP client, you can use natural language:
"Extract contact information from https://example.com"
"Analyze the SEO of https://example.com"
"Analyze https://example.com, find the owner's email, and send them a marketing email about their SEO issues"
"Preview a marketing email for Bob about his website's missing meta descriptions"
License
MIT
