# MIDAS — Cold Email Outreach & Shadow DOM Newsletter Infrastructure with MCP
> Dual-engine email infrastructure combining multi-mailbox cold B2B outbound sequences (automated warmup, Spintax, Knowledge Base AI reply & OOO triage) with Town Crier Shadow-DOM newsletter channels, Cart Recovery, Hosted Web Archives + RSS 2.0, Behavioral Events API, and Remote MCP.
## Core Developer & Agent Documentation
- [Documentation Hub](https://midas.pyrexxai.com/docs): Quickstart, environment variables, and Zero-Setup Sandbox guide.
- [MCP Server Guide](https://midas.pyrexxai.com/docs/mcp-server): Remote Streamable HTTP (POST https://midas.pyrexxai.com/api/mcp), stdio bridge (npx @midas-aem/client mcp), and all 7 tool schemas.
- [Shadow DOM Newsletter Embeds & Next.js Proxy](https://midas.pyrexxai.com/docs/shadow-dom-embeds): Encapsulated widget.js, midas_pk_ keys, match-host theming, Cart Recovery, and @midas-aem/client/next.
- [Cold Outbound API](https://midas.pyrexxai.com/docs/outbound-api): Multi-sender rotation, 5-send sweep pacing, circuit breakers, and AI lead enrichment.
- [Behavioral Events & Webhooks](https://midas.pyrexxai.com/docs/events-and-webhooks): SaaS triggers (POST /api/events/track) and HMAC-SHA256 webhook verification.
- [Interactive Zero-Signup Playground](https://midas.pyrexxai.com/playground): Test Shadow DOM embeds and Spintax permutations live.
## Machine-Readable Specifications
- [Full Markdown Manual](https://midas.pyrexxai.com/docs.md): Token-efficient technical documentation twin.
- [OpenAPI 3.1 Specification](https://midas.pyrexxai.com/openapi.json): Complete REST API schema with request/response payloads.
- [Full Combined LLM Context](https://midas.pyrexxai.com/llms-full.txt): Single-file technical reference for coding agents.
- [MCP Discovery Manifest](https://midas.pyrexxai.com/.well-known/mcp.json): Machine-readable MCP server endpoint metadata.
## Public Product, Benchmarks & Comparisons
- [Pricing & Quotas](https://midas.pyrexxai.com/pricing): Scout ($0 Forever), Chief ($35/mo), Syndicate ($99/mo).
- [Deliverability Architecture](https://midas.pyrexxai.com/deliverability): Multi-mailbox domain protection overview.
- [Deliverability Benchmarks](https://midas.pyrexxai.com/deliverability-benchmarks): Bounded 5-send sweeps, 20s cooldowns, Apple MPP filtering, and circuit breakers.
- [Comparisons](https://midas.pyrexxai.com/vs/instantly): Also at /vs/smartlead, /vs/lemlist, /vs/woodpecker, /vs/beehiiv, /vs/mailchimp, /vs/convertkit.
## Official Packages & Repositories
- TypeScript / React / Next.js SDK + MCP Bridge: `npm install @midas-aem/client` (https://github.com/PyrexxAI/midas-mcp)
- Python SDK (Sync & Async): `pip install midas-aem` (https://github.com/PyrexxAI/midas-python)
---
# MIDAS Developer Manual (v3.4)
Base URL: `https://midas.pyrexxai.com`
- Secret Server Key: `Authorization: Bearer midas_live_YOUR_SECRET_KEY`
- Publishable Browser Key: `Authorization: Bearer midas_pk_YOUR_GONG_KEY` (write-only single-contact ingestion pinned to 1 Gong)
## Environment Variables
- `MIDAS_API_KEY`: Server-only secret key (`midas_live_...`)
- `MIDAS_PUBLISHABLE_KEY`: Public browser key (`midas_pk_...`)
- `MIDAS_BASE_URL`: Target MIDAS host (`https://midas.pyrexxai.com`)
- `MIDAS_WEBHOOK_SECRET`: Webhook signing secret (`whsec_...`)
## 1. Remote MCP Server & Stdio Bridge (Claude Code / Cursor / Codex)
- Remote Streamable HTTP: `POST https://midas.pyrexxai.com/api/mcp` (`initialize` and `tools/list` are publicly readable; `tools/call` requires `Bearer midas_live_...`)
- Stdio Bridge: `MIDAS_API_KEY=midas_live_... npx -y @midas-aem/client mcp`
- Tools: `midas_create_gong_channel`, `midas_get_embed_snippet`, `midas_subscribe_contact`, `midas_track_event`, `midas_send_sandbox_test`, `midas_get_campaign_health`, `midas_create_artifact`.
## 2. Shadow DOM Newsletter Embeds & Zero-CLI Next.js Proxy
```typescript
// app/api/midas/subscribe/route.ts
export { POST } from '@midas-aem/client/next';
```
```html
```
## 3. TypeScript & Python SDK Quickstart
```typescript
import { MidasClient } from '@midas-aem/client';
const midas = new MidasClient();
await midas.subscribe({ email: 'alex@acme.com', gongId: 'weekly-alpha', cadence: 'weekly' });
await midas.trackEvent({ email: 'alex@acme.com', eventName: 'trial.started', properties: { plan: 'chief' } });
```
## 4. Town Crier Public Endpoints & Hosted Pages
- `GET /api/public/town-crier/gongs/:key/config` & `/count`: Live Gong palette/config & zero-PII subscriber count.
- `POST /api/public/town-crier/subscribe` (`midas_pk_` or `midas_live_`): Subscribe contact + trigger welcome autoresponder + cross-engine cold pause.
- `POST /api/public/town-crier/capture-partial` (`midas_pk_` or `midas_live_`): Partial progressive capture for Cart Recovery.
- `GET /api/public/town-crier/recover/:resumeToken?complete=1`: 1-click Cart Recovery completion.
- `GET /api/public/town-crier/subscribers/status` & `PATCH /subscribers/preferences` (`midas_live_`).
- `GET /g/:handle/:gongSlug`, `/issues/:broadcastId`, `/rss.xml`, `GET|POST /p/:token`.
## 5. Open Scoped APIs (`midas_live_` OR Session JWT)
- `/api/campaigns/*` (`campaigns:read|write`)
- `/api/leads/*` (`leads:read|write`)
- `/api/artifacts/*` (`campaigns:read|write`)
- `/api/sandbox/*` (`campaigns:read|write`)
- `/api/domains/*` (`domains:read|write`)
- `/api/knowledge/*` (`knowledge:read|write`)
- `/api/inbox/*` (`inbox:read|write`)
- `/api/events/track` & `/api/events/rules` (`events:read|write`)
- `POST /api/mcp` (Stateless Streamable HTTP JSON-RPC 2.0)