NECTARIN Intelligence MCP Server
Provides benchmarks and analytics for Telegram Ads platform, including CPM, CTR, CPA, and media planning capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NECTARIN Intelligence MCP ServerShow me current CPM benchmarks for retail in Russia."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NECTARIN Intelligence — remote MCP on Cloudflare Workers
Install with Unyly opens the live listing (
https://unyly.org/ru/mcp/nectarin-intelligence-worker) — one‑click connect for Cursor, VS Code, Claude Code, Claude Desktop, claude.ai and ChatGPT. You can also add it manually as a custom connector with the/mcpURL — works in Claude and ChatGPT (Settings → Connectors). See USAGE.md.
A production remote Model Context Protocol server for NECTARIN Intelligence — an orchestrator-worker AI marketing agent for the RU/CIS market. It runs entirely on a single Cloudflare Worker, serves MCP over Streamable HTTP (JSON-RPC 2.0) with an opt-in SSE transport, ships with mock/synthetic RU data plus KV real-data layering, and a KV-cached, model-agnostic LLM narrative (DeepSeek wired in this deploy).
New in 2.52 — MCP federation through Unyly: NECTARIN is now the marketing hub that the best specialist external MCPs plug into — always via Unyly.
mcp_federationdiscovers complementary servers (live keyword data, web analytics, ad-platform pulls, creative generation, social listening, CRM, marketplace data, localization), routes by capability/goal/role, and returns tracked Unyly connect links so all installs & consumption flow through unyly.org.federation_invokeproxies an external MCP tool call at runtime (fail-closed until the server is connected via Unyly). v2.54 widens role coverage with a CMO maturity scorecard, a martech-stack rationalizer and Van Westendorp pricing research. v2.55 adds a B2B & CX group (ABM account scoring, NPS analysis, B2B pipeline velocity). v2.56 adds an Ops & Autonomy group — a cross-KPI alert engine (anomaly → action → the tool to run next) and a CMO function-level budget allocator — plus B2B win/loss analysis. v2.57 deepens autonomy withautonomous_plan(breaches/goal → an ordered diagnose→act→measure plan that chains tools, with owners & expected impact) and adds a Marketing Ops & Leadership group — a marketing OKR planner and a content-team capacity/throughput planner. v2.58 adds a Foresight & Strategy group —demand_forecast(Holt linear-trend forecast + optional multiplicative seasonality + confidence band),customer_journey_map(lifecycle → channels/content/KPI with conversion & gap analysis) andcompetitive_positioning_map(2-axis perceptual map + white-space). v2.59 adds a Market & Revenue Science group —marketing_roi_waterfall(period-over-period revenue/ROAS bridge decomposing the change into volume/efficiency/AOV drivers),conjoint_analysis(part-worth utilities → attribute importance, share-of-preference logit & willingness-to-pay) andtam_sam_som(top-down/bottom-up market-sizing funnel with a reality check & CAGR projection). v2.64 lands the real-data pilot (Phase D): one documented, versioned tenant-metrics KV schema (src/tenantdata.ts) that existing models read via an opt-inuseTenantData:trueflag —kpi_alert_enginepulls current KPI values/targets andfunnel_modelderives real conversion rates + AOV. Strictly non-breaking: inert unless mode=kv+ a blob exists; prod (authless/mock) is byte-identical and returns a graceful "configure tenant data" note. v2.61 deepens autonomy (Phase D):benchmark_kpi_check(KPI vs RU/CIS bands),alert_to_skill(breaches → marketing_skill playbook + first tool), plus launch toolsbrand_health_indexandgtm_launch_readiness, and a tenant data scaffold (tenant_metrics_snapshot, KV keytenant:<id>:metrics, mode viaNECTARIN_TENANT_DATA_MODE). v2.60 wires the live Unyly federation gateway: setUNYLY_GATEWAY_TOKEN(self-issued in the Unyly dashboard) andfederation_invokeproxies any registered server atgateway.unyly.org/mcp/<slug>— one token, no per-server URL config. Per-serverFED_<KEY>_URLoverrides still work. v2.65 ships the autonomy loop (Phase D) —autonomous_execute, a GUARDED runner that moves alert→action→measure from planning to safe execution: dry-run by default (zero side effects, deterministic), execute only withconfirm:true+approvalTokenand team+ gating, WRITE/external steps routed only through the fail-closed Unyly federation (federation_invoke) — no gateway token ⇒ no network, degrade to "connect via Unyly" — and a per-step audit trail (simulated | executed | skipped | blocked). No recursive local tool fan-out.board_reportgains an opt-inuseTenantData:true(real spend/revenue/ROAS from KV). v2.66 adds a Design & Creative Ops group of deterministic design-SPEC tools (NOT image generation):design_system_spec(brand → HSL-wheel palette + modular type scale + spacing/ radius/elevation tokens + WCAG contrast check, pro+),banner_layout_spec(per-format RU banner specs — canonical sizes, layout zones, text limits, font floors for vk/yandex/telegram/ok/web) andad_spec_checker(RU ad-law linter — ORD/ЕРИР, ratio, text-over-image, weight, CTA, regulated legal gate). Actual image/asset rendering is delegated to a federated creative-generation MCP via Unyly (mcp_federation→creative_gen) — NECTARIN produces the spec, the federated MCP renders. v2.67 widens profession coverage 22 → 26 with a Profession-Breadth group of deterministic, methodology-grounded role planners:programmatic_trading_plan(DSP/programmatic trader — deal-type mix PMP/open/PG, bid strategy, pacing, expected impressions/reach and viewability-adjusted effective CPM, pro+),marketplace_seo_plan(WB/Ozon/Yandex Market listing SEO — listing-optimization score, keyword→slot mapping, ranking checklist, projected organic-visibility uplift),lifecycle_flow_planner(lifecycle/CRM automation — triggered cross-channel flow blueprint with stage timing, per-step conversion and revenue) andplg_activation_model(PLG/SaaS — signup→activated→retained activation funnel with levers and projected MRR, pro+). New router roles: programmatic trader, marketplace listing specialist, lifecycle/automation and PLG growth. 110 tools / 85 prompts.
New in 2.51 — skills & growth science: an extensible playbook layer (
marketing_skill) chains tools into 10 repeatable end-to-end workflows (cut CAC, retention boost, launch, measurement setup…), plus two growth models —cohort_retention_curve(power-law fit + LTV) andviral_loop(k-factor + referral economics). 77 tools / 54 prompts.
New in 2.50 — consumption transparency:
tools/callnow returns quota headers (X-Plan,X-Quota-Limit/Used/Remaining/Period) so clients see their allowance inline, plus a visualGET /dashboardHTML page over/usage. See ROADMAP.md for the global plan (Marketing-OS, phases A–D, MCP federation via Unyly).
New in 2.49 — metered free tier + usage dashboard: a per-tenant monthly quota (free = 100 calls/mo; paid tiers unlimited) creates the concrete free→paid upsell, and a read-only
GET /usageendpoint reports{used, quota, remaining, plan}per tenant for Unyly / an internal dashboard. Owner/claimless tokens stay unlimited (authless deploy unaffected).
New in 2.48 — monetization seam: the Unyly access tiers are now real. A small set of flagship tools (
strategy_orchestrate,mmm_optimize,incrementality_meta,geo_holdout,competitive_response,report_export→ pro;board_report→ team) require a minimum plan, read from the token'splanclaim (issued by Unyly Connect); below-tier calls return an upgrade CTA with a tracked Unyly link. Everytools/callemits a structured usage event (the billing seam Unyly aggregates), and withUNYLY_ATTRIBUTION=1successful outputs carry a tracked "install via Unyly" footer. Non-breaking: claimless tokens get full access, so the authless deploy is unchanged.
New in 2.47 — distribution through Unyly:
connect_via_unylymakes the connector self-distribute — every install/onboarding/upgrade returns a tracked Unyly link (UTM-attributed) so consumption, requests and installs all flow through the single Unyly front door (the metering & governance point).
New in 2.46 — profession coverage: 74 tools across 22 marketing professions, with a role router (
role_playbook) that maps any specialist's job — SEO, PPC, SMM, CRM, brand, PR, media planning, analytics, e-commerce, mobile/ASO, content, events, affiliate, creative, pricing, compliance, agency, marketing ops, CMO — to a tailored toolkit, workflow and KPIs. One connector for the whole team; install and access flow through a single Unyly front door (Unyly Connect fronts OAuth 2.1).
New in 2.0: KV LLM response cache (cold 9.8s → warm 0.2s on prod),
LayeredKvDataSourcefor operator-uploaded real benchmarks, opt-in SSE, and richer/health+/versionobservability. See USAGE.md for the connection guide, full tool catalogue, recommended flows, and a ready-to-paste Claude system prompt.
Go live with npx wrangler deploy using your own Cloudflare token.
All figures are MOCK / synthetic, plausible for RU/CIS in RUB. Not legal advice. To serve real data, upload it to KV (
benchmarks:<category>,playbook:<industry>,suppliers) —LayeredKvDataSourceoverrides mock per-key (see USAGE.md).
What's inside
src/index.ts— the Worker. A small, spec-compliant JSON-RPC 2.0 MCP handler (no@modelcontextprotocol/sdkdependency — the SDK's transports target Node'shttp/streams, which don't exist on Workers, so a hand-rolled handler is cleaner and dependency-free). Implementsinitialize,tools/list,tools/call,prompts/list,prompts/get,resources/list,resources/read,completion/complete,ping, and thenotifications/*no-ops, with proper JSON-RPC results/errors.src/tools.ts— the tool registry. It composes three groups: the 11 Intelligence tools (incl. the flagshipstrategy_orchestrateand thebudget_optimizer), the 6 Growth & Automation tools, and the 3 Premium Analytics tools (see the tables below), each with a JSON-SchemainputSchemaasync handler. The Premium Analytics group now has 11 tools.
src/growth.ts— the 6 Growth & Automation tools (the funnel layer):roi_calculator,lead_qualify,request_nectarin_proposal,book_consultation,automation_recipe,value_forecast. Deterministic, synthetic logic anchored to the same mock benchmarks; no PII is sent and no real network call is made (proposal/booking are clearly-marked stubs).src/analytics.ts— the 10 Premium Analytics tools:compliance_check(RU ad-law copy review, ФЗ-38/ОРД, optional LLM rewrite),ab_test_planner(real two-proportion power analysis with inverse-normal z + Bonferroni),unit_economics(LTV/CAC/payback/ROAS + verdict),funnel_model(full-funnel scenarios + biggest leak),seasonality_forecast(12-month demand index),creative_score(best-practice copy scoring),attribution_model(5-model multi-touch attribution),bid_simulator(auction bid/win-rate curve),report_export(strategy → deck/one-pager) andlocalize(RU/EN/KZ/UZ). Deterministic and auditable.src/orchestrator.ts— the planner → workers (dataRetriever, analyst, strategist, copywriter, compliance) → synthesizer pipeline.media_planmath is real:impressions = spend / CPM × 1000,clicks = impressions × CTR,conversions = spend / CPA, plus estimated reach and blended CPA. The flagshipstrategy_orchestratefans out to every worker in one call (benchmarks + audience + competitors + plan/forecast + optimized split + creative + complianceROI + executive summary).
budget_optimizersolves the conversion-maximizing channel split (water-fill by CPA under a per-channel cap). ThecallLLM()seam is real-or-stub: it calls Anthropic/OpenAI whenLLM_API_KEYis set and falls back to a deterministic stub otherwise (and on any model error), so the pipeline never breaks.
src/data.ts— synthetic benchmarks / suppliers / playbooks + seasonality behind aDataSourceinterface (defaultMockDataSource;KvDataSource/HttpDataSourcestubs included). Coverage: 8 categories (realty, finance, auto, retail, fmcg, pharma, ecom, edtech) × 5 platforms (VK Ads, Yandex Direct, Telegram Ads, OLV, Avito), with aprovenanceblock on every benchmark response. SeeDATA_SCHEMA.mdfor the exact data NECTARIN must supply.src/auth.ts— real OAuth 2.1 bearer verification viajose(createRemoteJWKSet+jwtVerify) against a JWKS URL — validates signature, issuer, audience, expiry. In production Unyly Connect fronts OAuth 2.1 (DCR + PKCE); this resource server only validates the token.DEV_BYPASS=1disables the check for local/dev.src/ratelimit.ts— per-token/IP token-bucket rate limiter (RATE_LIMIT_PER_MIN, default 60), with KV/Durable-Object hooks for production.src/validate.ts— per-tool JSON-Schema input validation (-32602).
HTTP routes
Method | Path | Purpose |
POST |
| JSON-RPC 2.0 MCP endpoint (auth + rate limit) |
GET |
| OAuth discovery |
GET |
| Liveness probe |
GET |
| name + version + toolCount + commit + authMode |
GET |
| per-tenant monthly usage |
GET |
| HTML usage dashboard (reads |
GET |
| Friendly index (endpoint URLs) |
JSON-RPC error codes
-32700 parse · -32600 invalid request · -32601 unknown method/tool ·
-32602 invalid params (schema validation) · -32603 internal (safe message) ·
-32029 rate limited (HTTP 429). A 401 carries WWW-Authenticate with the
resource_metadata discovery pointer.
Related MCP server: Roistat MCP Server
Tools (110 total)
Intelligence group (inform + orchestrate)
Tool | What it does |
| Flagship. One call → full go-to-market strategy: benchmarks + audience + competitors + media plan/forecast + optimized split + creative concept + compliance + ROI + executive summary. |
| Conversion-maximizing budget split (water-fill by CPA under a per-channel cap) + uplift vs. the goal preset. |
| CPM/CTR/CPA/VTR percentiles for a category × KPI (× platform). |
| Inventory quality index, fraud risk, recommended/avoid suppliers. |
| RUB budget split + real forecast (impr/clicks/conv/reach/blended CPA). |
| Territories, do's & don'ts, seasonal hooks, compliance gate. |
| Segments, JTBD, media affinities for a category. |
| Likely competitors, activity, channels, owned territory. |
| Brand visibility inside AI answer engines + RU search. |
| Objective, proposition, mandatories + 3 concept territories. |
| Plain-language report read, anomalies, prioritized fixes. |
Growth & Automation group (convert + automate) — drives the funnel
These tools turn the agent from an advisor into a revenue engine. Together they walk a marketer down the funnel: acquire marketers → qualify → proposal → managed services, and frame NECTARIN as automation, not just advice.
Tool | What it does | Funnel stage |
| Projects CPA improvement, extra conversions & est. annual value from the mock benchmarks (method shown). | Acquire / show value |
| 3-scenario (conservative/base/ambitious) reach + efficiency + savings projection, assumptions stated. | Acquire / show value |
| 0-100 fit score + recommended tier (self-serve / managed / enterprise retainer) via budget thresholds + signals. | Qualify |
| Structured RFP/brief + clearly-stubbed submission reference. Sends nothing (no CRM/webhook/email); privacy note included. | Proposal |
| Scheduling CTA with a booking URL from | Proposal → close |
| Concrete multi-agent workflow (steps, internal tools, cadence, est. time saved) NECTARIN runs as a managed service. | Managed services |
Premium Analytics group (operate at a senior level)
These make the agent a senior operator: a RU ad-law reviewer, an experimentation lead, and a unit-economics analyst. All math is deterministic and auditable.
Tool | What it does |
| RU ad-law review of copy → 0-100 score + flagged risks (severity, ФЗ-38 article, fix): superlatives/ФАС, comparative claims, finance (ПСК, guaranteed returns), pharma warning, alcohol/tobacco/gambling, ОРД/ЕРИР marking. Optional LLM rewrite. Not legal advice. |
| Two-proportion power analysis: sample size/variant, total, duration; exact z via inverse-normal (Acklam) + Bonferroni for multi-variant; guardrails. |
| LTV / LTV:CAC / payback / ROAS / contribution; CAC from spend÷customers, lifespan from churn; health verdict + levers. |
| Full-funnel projection (impressions→reach→clicks→leads→qualified→sales→revenue) with conservative/base/optimistic scenarios, per-stage drop-off, CAC/ROAS, and the biggest leak. |
| 12-month RU/CIS demand index per category, peak/trough months, monthly budget weighting + optional annual-budget split. |
| 0-100 best-practice score for ad copy (value prop, specificity, CTA, length, benefit-focus, no-CAPS) + fixes, compliance flag, optional LLM variants. |
| Multi-touch attribution over conversion paths (first/last/linear/position-based/time-decay) + which channels last-touch under/over-values. |
| Auction bid/win-rate trade-off curve from benchmark CPC/conv-rate; recommends a bid for a target CPA or max conversions under a daily budget. |
| Turns a strategy/analysis into a deck — slides (title+bullets+notes), full Markdown deck and a one-pager. Composable after |
| Translate + culturally adapt copy into RU/EN/KZ/UZ for CIS markets (LLM-backed, graceful fallback). |
| Multi-variant test RESULTS analyzer (the read side of |
Premium group (v2.1+ — generate, monitor, project, operate)
Tool | What it does |
| Generate and score N ready-to-test ad variants (LLM-backed + KV-cached; deterministic template fallback). Each variant gets the |
| Robust median/MAD z-score anomaly detection over a metric time series (CPA/CTR/spend…) for always-on monitoring; flags per-point severity/direction and whether the latest point is anomalous. Std fallback for low-variance series. |
| Retention-curve cohort LTV/NPV projection (explicit curve OR churn%+periods), per-period survivors/revenue, LTV:CAC, payback period. Complements |
| Build a consistent, validated UTM tracking URL — normalizes tokens (lower/snake/kebab/preserve), URL-encodes, preserves existing query, warns on uppercase/spaces/non-ASCII, suggests a naming convention. |
| Budget pacing vs. an even spend curve: expected spend, pace ratio, status (under/on-track/over), projected end spend, recommended daily spend to land on budget. |
| Channel saturation / diminishing-returns modeling. Fits |
| Trend-aware end-of-flight forecast. Projects landing spend from the recent daily run-rate (not just a flat average), the over/under-spend variance %, the days to exhaust the budget, and the recommended daily rate (and % adjustment) to land on budget; optional CPA pace. Complements |
| Batch UTM / taxonomy governance auditor. Parses a list of tagged URLs (or raw query strings), checks each for missing required params, uppercase, spaces and non-ASCII, then aggregates a 0–100 consistency score + grade, near-duplicate value variants per parameter (e.g. |
MMM group (v2.12+ — marketing mix modeling)
Tool | What it does |
| Marketing Mix Model (MMM-lite). From each channel's spend & conversions time series, fits adstock/carryover (geometric decay λ, grid-searched by R²) and saturation ( |
Planning group (v2.14+ — roadmap & scenarios)
Tool | What it does |
| Phased go-to-market roadmap. Splits the horizon into Test → Scale → Optimize phases with goal-driven budget weights and channel emphasis, then builds a week-by-week budget pacing curve that leans spend into high-demand weeks using the category's monthly seasonality index. Returns per-phase objectives, KPIs and exit criteria, peak/soft seasonal windows inside the horizon, and milestones. Answers when & in what sequence (pairs with |
| What-if budget scenario comparator. Takes current per-channel spend & conversions plus named scenarios (conservative / base / aggressive via a |
Pricing & Promo group (v2.17+ — discount economics)
Tool | What it does |
| Promo / discount P&L & break-even. From regular price, variable unit cost and baseline period volume, computes the post-discount unit margin, the break-even volume uplift a promo must clear to avoid losing money, and — with an |
| Profit-maximizing price finder. From ≥2 historical (price, units) points, fits a constant-elasticity demand curve |
Audit group (v2.15+ — account health diagnostic)
Tool | What it does |
| Senior account health audit. Takes current per-channel spend & conversions, scores each channel's CPA against RU/CIS benchmarks (p25/p50/p75), flags concentration risk and untracked spend, computes an overall health score (0-100) + grade A–D, and returns a prioritized action plan with a concrete budget reallocation and projected extra conversions / saved spend. Optional |
| Heuristic landing-page CRO audit. Scores up to seven UX/performance dimensions you provide — page speed, bounce, mobile parity, form friction, CTA clarity, trust/social proof, CR vs benchmark — into a weighted 0-100 CRO score + grade, returns a prioritized issue list (weight × gap) with concrete fixes, and a projected CR uplift (multiplicative, diminishing returns) that, given |
Executive group (v2.18+ — board one-pager)
Tool | What it does |
| Executive one-pager (orchestrator). Composes |
Creative Ops group (v2.19+ — burnout detection & rotation)
Tool | What it does |
| Creative burnout detector. From each creative's daily CTR series ( |
| Creative rotation optimizer. From a set of creatives (performance % + impressions served), applies an exponential fatigue decay (effectiveness halves every |
Influence group (v2.21+ — Маркетинг влияния)
Tool | What it does |
| Influencer / KOL roster evaluator & mix optimizer. For each blogger (followers, price, optional avgViews, ER%, audience match) computes reach, CPM/CPV/CPE, estimated target reach & conversions, eCPA and a value score; flags suspicious engagement (likely inflated/bot or dead audience vs. the typical band for the follower tier). With a |
Media group (v2.22+ — OLV / display reach & frequency, cross-channel)
Tool | What it does |
| OLV / display reach & frequency planner. From a budget + CPM (or impressions directly) and the target audience universe, computes gross impressions, GRPs, net reach (people & %), average frequency, the full contact distribution, and effective reach at ≥N exposures (Poisson exposure model). With a |
| Omnichannel deduplicated reach estimator. Given a shared universe and ≥2 channels' individual reach, computes the combined net deduplicated reach (independence / Sainsbury model), gross summed reach, the duplication/overlap (people & %), and each channel's incremental unique reach (leave-one-out). Flags the most additive and most duplicated channels. Deterministic planning estimate. |
| Media flighting / flowchart planner. Distributes a total budget across N weeks by a flighting pattern (even / front_loaded / back_loaded / burst / pulse), returning the per-week budget, share and cumulative spend, plus a per-channel split each week when channel shares are given. Reports the peak week and on-air weeks. Deterministic. |
| Media delivery quality scorer. From a placement's OWN delivered metrics (viewability %, IVT/bot %, video completion %, brand-safe %, on-target %), computes a weighted 0–100 quality score + A–F grade, scores each metric vs. RU/MRC-style thresholds, flags problems and names the biggest lever. Complements |
| Audience overlap / dedup analyzer from MEASURED pairwise overlaps (DMP / panel / cross-device) — unlike |
| Frequency-cap optimizer. From a fixed impression pool (impressions, or budget + CPM) and the audience universe, (A) diagnoses how many impressions land on people already past each candidate cap at the natural average frequency (over-cap waste, Poisson), and (B) optimizes: for each cap re-solves delivery so freed impressions are reallocated, returning the resulting net (1+) reach, effective reach at ≥N, average frequency and the reach uplift vs. no cap. Recommends the cap that maximises ≥N effective reach. Deterministic. |
Production group (v2.25+ — Производство)
Tool | What it does |
| Creative production budget & timeline estimator. From a list of deliverables (asset type × quantity × complexity) and a quality tier (economy/standard/premium), applies an illustrative RU rate card to give a per-deliverable cost & effort breakdown, subtotal, contingency and optional rush surcharge, a total cost range (±20%), and a critical-path timeline (production is partly parallel). Heuristic & deterministic — confirm with vendor quotes. |
Experimentation group (v2.27+ — incrementality)
Tool | What it does |
| Geo-holdout incrementality test tool. Design: from expected baseline conversions in the test geos + a target lift, returns the minimum detectable lift (MDE), the baseline volume required, and a recommended test duration. Measure: from observed test-geo conversions vs. a counterfactual (scaled control), computes incremental conversions, lift %, a count-based (Poisson) z-test, p-value, significance and incremental CPA. Auto-detects mode. Deterministic. |
| incrementality_meta | Meta-analysis of multiple incrementality / A-B / geo tests. Each test gives a lift % + SE (or 95% CI). Computes the inverse-variance fixed-effect pooled lift (z, p, CI), heterogeneity Q & I², and the DerSimonian–Laird random-effects pooled lift (wider CI when tests disagree); returns per-test weights, both pooled estimates and an overall significance call — combine many small reads into one defensible number. |
Competitive group (v2.30+ — war-gaming)
Tool | What it does |
| Competitive war-game simulator. Given your spend, current competitor spend and a move (spend escalation %, new entrant, or pullback), models the impact on your Share of Voice, auction CPM inflation and effective impressions at a fixed budget, then sizes the defensive budget needed to hold a target SOV and recommends a posture (hold / partial match / defend or pivot). Deterministic auction-share dynamics. |
Search & SEM group (v2.36+ — paid search)
Tool | What it does |
| Paid-search / SEM keyword-portfolio planner for Yandex Direct & контекст. From keywords (monthly volume + CPC, optional CTR%/CVR%/intent) and an optional monthly budget, estimates per-keyword clicks, conversions, CPA and the max addressable spend, ranks keywords by efficiency (conversions per ₽), greedily allocates the budget to the lowest-CPA keywords first, and returns portfolio totals — clicks, conversions, blended CPA and demand coverage. Defaults CTR 4% / CVR 2% when missing (flagged). Deterministic media math on your inputs. |
Retail Media group (v2.37+ — marketplaces)
Tool | What it does |
| Marketplace / retail-media planner for Ozon, Wildberries, Яндекс Маркет & Avito. From placements (search / catalog / banner) with a cost model (CPC, or CPM + CTR), click→order CVR, an AOV, the marketplace commission (take-rate) and an optional budget, computes per-placement effective CPC, orders, revenue, ДРР (доля рекламных расходов = ad spend / revenue) and ROAS, ranks placements by profit per ₽, greedily allocates the budget to the most profitable placements first (respecting volume caps), and returns blended portfolio economics (revenue, ДРР, ROAS, net profit after commission/COGS) with a target-ДРР check. Deterministic. |
Retention / CRM group (v2.39+ — lifecycle)
Tool | What it does |
| Churn & retention economics. Resolves a monthly churn rate from a direct %, a cohort ( |
| RFM customer segmentation. From customers with |
Email / Lifecycle group (v2.44+ — рассылки)
Tool | What it does |
| Email / CRM newsletter economics & cadence. From list size, deliverability, open & click rates (CTR or click-to-open), conversion and AOV → per-send delivered→opens→clicks→orders→revenue and the key revenue-per-email (RPE); with |
Partnerships group (v2.45+ — CPA / affiliate)
Tool | What it does |
| CPA / affiliate / partner-program economics for RU networks (Admitad, Cityads, …) & direct partners. From AOV, gross margin, a commission model (% of AOV or fixed CPA), an optional network fee and validation rate, plus per-partner clicks & conversion → per-partner approved orders, payout, EPC, effective CPA, ROAS and net profit; ranks partners, blends the program, and derives the sustainable commission ceiling ( |
Distribution group (v2.47+ — single Unyly front door)
Tool | What it does |
| Front door for install / access / upgrade — always through Unyly. Returns the tracked Unyly install link (UTM-attributed by |
Skills group (v2.51+ — composable playbooks)
Tool | What it does |
| Extensible playbook engine. No args ⇒ lists 10 end-to-end skills (cut CAC, retention boost, product launch, creative refresh, budget reallocation, SEO/content, social/influencer, board readout, marketplace scaling, measurement setup). Given a |
Growth Lab group (v2.51+ — growth science)
Tool | What it does |
| Fits a power-law retention curve r(t)=a·t^(−b) to your cohort points (log-log least squares), projects D1/D7/D30/D90/D365 + R², and (given ARPU) an LTV estimate over a horizon. |
| Referral/virality model: k-factor (i·c), amplification 1/(1−k), seed→total projection and referral-incentive economics (profit per referred, break-even ceiling). |
Federation group (v2.52+ — hub for external MCPs via Unyly)
Tool | What it does |
| Marketplace router. NECTARIN is the hub; complementary specialist MCPs (live keyword/SERP data, web analytics, ad-platform pulls, creative generation, social listening, CRM, marketplace data, localization) plug in around it — always through Unyly. No args ⇒ catalogue; |
| Runtime proxy (team+). Calls a tool on a federated external MCP through NECTARIN: pick a |
Federation gateway setup (self-serve)
Issue a gateway token in the Unyly dashboard (Gateway → POST
/api/gateway-tokens).Set it as a Worker secret:
npx wrangler secret put UNYLY_GATEWAY_TOKEN.Optionally override the base URL via
UNYLY_GATEWAY_URL(defaulthttps://gateway.unyly.org).Call
federation_invoke(server="keyword_data", tool="...", arguments={...})— NECTARIN routes tohttps://gateway.unyly.org/mcp/keyword-datawith Bearer auth.Health check:
GET https://gateway.unyly.org/mcp/ping.
Per-server FED_<KEY>_URL/FED_<KEY>_TOKEN overrides still work and take precedence over the gateway default.
Expansion group (v2.54+ — wider profession coverage)
Tool | What it does |
| CMO/transformation scorecard (pro+). Rate 7 weighted dimensions 0–5 ⇒ a 0–100 maturity index, level 1 Nascent→5 Leading, per-dimension strengths/gaps and a prioritized 90-day roadmap. |
| Marketing-ops/RevOps stack auditor (pro+). From tools (cost, utilization, category, optional satisfaction) ⇒ wasted spend, category redundancy, low-utilization cut candidates, projected consolidation savings and a utilization-weighted ROI proxy. |
| Van Westendorp PSM. From respondents' four price points it builds the four cumulative curves and locates OPP, IPP and the acceptable band PMC→PME (drops non-monotonic respondents). |
B2B & CX group (v2.55+ — demand-gen / revenue + customer experience)
Tool | What it does |
| ABM prioritization (pro+). Weights fit × intent × engagement into a 0–100 score, assigns a tier (1:1 / 1:few / 1:many / nurture) with a recommended play, and ranks by expected value when deal size is given. |
| NPS. From raw 0–10 scores or promoter/passive/detractor counts ⇒ segment split, NPS (−100..+100), a 95% confidence interval and a benchmark band. |
| Pipeline velocity (pro+). (opps × win-rate × deal size) ÷ cycle days ⇒ revenue/day, monthly & annual, plus a +10% lever sensitivity to find the highest-leverage improvement. |
| Win/loss (pro+). From closed deals (outcome/reason/segment/value) ⇒ win rate by count & value, win rate by segment, top loss/win reasons and prioritized recommendations. |
Ops & Autonomy group (v2.56+ — anomaly → action, CMO budgeting)
Tool | What it does |
| Alert engine (autonomy). Grades KPIs vs targets ok/watch/warning/critical and routes every breach to a recommended action + the NECTARIN tool to run next (CPA↑ ⇒ budget_optimizer, CTR↓ ⇒ creative_testing_matrix, churn↑ ⇒ churn_predictor). Sorted by severity. |
| CMO budget by function (pro+). Splits an annual budget across brand / demand / retention-CRM / content-SEO / martech / team, tilted by goal & business type with guardrails. (Media channel splits ⇒ |
| Action-plan builder (pro+). Turns KPI breaches and/or a goal into an ORDERED, deterministic plan — diagnose → one action per breach (severity-first, each with the NECTARIN tool, the owner/role and the expected-impact direction) → measure/control. Complements |
| Guarded autonomy runner (team+). Moves alert→action→measure from planning to SAFE execution. Dry-run by default (deterministic, zero side effects). |
Marketing Ops & Leadership group (v2.57+ — OKRs & content capacity)
Tool | What it does |
| OKR planner (pro+). Turns an objective + key results into a measurable OKR set: per KR baseline → target, %Δ, an ambition band (conservative/realistic/ambitious/stretch), a leading-vs-lagging classification and the tool to drive it; flags an unbalanced (all-lagging / all-leading) set. |
| Content capacity planner. From team size, productive hours and a content mix (effort per piece + desired share + optional planned count) ⇒ total capacity, achievable pieces per type, weekly throughput, utilization vs. plan and the bottleneck. |
Foresight & Strategy group (v2.58+ — forecasting, journey & positioning)
Tool | What it does |
| Demand forecast (pro+). Projects the next N periods of any series (sales/leads/traffic/revenue) with Holt's linear-trend double exponential smoothing, a residual-based confidence band (z·RMSE·√h, widening with the horizon), the fitted level & per-period trend and MAPE. Optional multiplicative seasonality via classical decomposition when ≥2 full cycles are supplied. Distinct from |
| Lifecycle map & gap audit. Maps the funnel (awareness → consideration → purchase → retention → advocacy) to channels, content and a primary KPI per stage; with stage volumes computes stage-to-stage conversion and the biggest drop-off; flags coverage gaps (a stage with no channels or no content). Call with no args for the best-practice template. |
| 2-axis perceptual map (pro+). Places ≥2 competitors on a plane (e.g. price × value), splits at the mean of each axis into four quadrants, assigns each player a quadrant + value-for-money index, finds the empty quadrants (white-space) and — if one entry is flagged |
Market & Revenue Science group (v2.59+ — revenue bridge, conjoint & market sizing)
Tool | What it does |
| Revenue/ROAS bridge (pro+). Decomposes period-over-period ΔRevenue into three exact, reconciling drivers via sequential factor substitution: Revenue = Spend × Efficiency (conv/₽) × AOV (₽/conv). Returns a waterfall (start → spend → efficiency → AOV → end), each driver's signed ₽ contribution & share, and the ROAS delta. Explains why revenue moved (more budget? cheaper conversions? bigger basket?). Distinct from |
| Part-worth conjoint (lite, pro+). From attribute level utilities computes attribute importance (utility-range share), the optimal bundle (max-utility level per attribute), share-of-preference across supplied profiles via a logit/BTL model, and — with a numeric price attribute — the willingness-to-pay (₽) per attribute. Trades off features × price; distinct from |
| Market-sizing funnel. TAM → SAM → SOM top-down (TAM × SAM share × SOM share) or bottom-up (population × penetration × obtainable share × ARPU) → sizes in customers & revenue, the SOM-as-%-of-TAM reality check, and an optional multi-year SOM projection at a CAGR. Light, deterministic. |
Roles / Adoption group (v2.46+ — one connector for every marketer)
Tool | What it does |
| Role router & adoption engine. A marketer states their profession in RU or EN (free-text, alias-matched) and gets a TAILORED playbook: primary tools (each with a role-specific "why"), the supporting toolkit, an ordered end-to-end workflow, the KPIs that role owns and example questions. Called without a role it lists all 26 supported professions (CMO, performance/PPC, SEO, SMM, content, brand, media planning, CRM/lifecycle, e-commerce/marketplaces, influencer, PR, analytics, product/GTM, affiliate, growth, events, mobile/ASO, creative, pricing/promo, compliance, agency, marketing ops, programmatic/DSP trader, marketplace listing SEO, lifecycle/automation, PLG growth). Curated, deterministic. |
SEO group (v2.46+ — organic search)
Tool | What it does |
| SEO organic-growth model. From keywords (volume + current & target position) and a conversion rate + value, applies a position→CTR curve to estimate current vs. target organic traffic, incremental conversions & value per keyword, ranks opportunities and flags page-2 quick wins (positions 11–20). Deterministic. |
Social / SMM group (v2.46+ — organic social)
Tool | What it does |
| Organic SMM planner. Per platform (VK/Telegram/Дзен/YouTube …) from followers, posts/week, organic reach % and engagement % → monthly posts, reach, impressions, engagements and follower growth; with a conversion rate + AOV → conversions & revenue. Aggregates the portfolio, recommends a cadence and flags low organic reach. Deterministic. |
PR / Communications group (v2.46+ — earned media)
Tool | What it does |
| PR / earned-media value & share of voice. From placements (outlet, reach, tier, sentiment) → total & deduplicated reach, tier×sentiment quality-adjusted reach, an advertising-equivalent reach value (labelled context, not an endorsed KPI) and, with competitor reach, earned share of voice. Honest methodology with AMEC caveats. Deterministic. |
Events group (v2.46+ — events & webinars)
Tool | What it does |
| Event / webinar / field ROI. Projects the funnel invites→registrations→attendees→leads→opportunities→won deals→revenue, plus cost per registration/attendee/lead, ROI and breakeven deals. Deterministic. |
Mobile / ASO group (v2.46+ — app growth)
Tool | What it does |
| App Store Optimization & mobile growth. From store impressions, tap-through and install-conversion rates → page views & installs; with LTV (or ARPDAU×lifetime) → revenue; with a paid CPI → paid-UA economics (LTV/CPI, breakeven). Includes an ASO uplift scenario (+pp to install conversion → extra installs & value). Deterministic. |
Content group (v2.46+ — content marketing)
Tool | What it does |
| Compounding content-marketing ROI. Treats content as an asset: simulates the library month-by-month over a horizon (ramp → plateau → decay) → cumulative visits, conversions, value vs. spend, ROI, payback month and exit run-rate. Shows why content pays back later but compounds. Deterministic. |
Brand group (v2.23+ — brand lift)
Tool | What it does |
| Brand-lift study calculator. Measure: from a control vs. exposed survey cell (n + positive answers for ad recall / awareness / consideration / intent) computes both rates, the absolute (pp) & relative lift, a pooled two-proportion z-test (z, two-tailed p-value, significance at α) and a confidence interval for the lift. Design: from a base rate + target lift (absolute pp or relative %), α and power, returns the required sample size per cell (and total). Auto-detects mode. Deterministic. |
| Share of Voice + ESOV growth tracker. From brand spend + competitor spends (or a given SOV) and the brand's current market share, computes SOV, ESOV (excess share of voice = SOV − share) and the predicted annual market-share growth (Binet & Field: ~0.5pp per 10pp ESOV). Also solves the SOV/spend required to hit a target share growth. Deterministic brand-growth heuristic. |
| Share of Search demand tracker — branded search as a leading indicator of market share (Les Binet). From the brand's branded-search volume + competitors' volumes (or a total category volume, or SoS directly), computes SoS %, the brand's rank, and — given current market share — the SoS↔share gap (demand ahead of share ⇒ poised to gain; behind ⇒ at risk). Optional previous SoS gives the trend; projects next-period share as it partially converges toward SoS. Distinct from |
Design & Creative Ops group (v2.66+ — deterministic design SPECS, not rendering)
Deterministic design-spec tools. NECTARIN produces the machine-readable spec; actual image/asset rendering is delegated to a federated creative-generation MCP via Unyly (mcp_federation → creative_gen).
Tool | What it does |
| Flagship (pro+). From brand inputs (brand, industry, mood minimal/bold/premium/playful/corporate, optional |
| Per-format banner specs for RU platforms (vk/yandex/telegram/ok/web-IAB): canonical ad sizes, a layout skeleton per size (logo/headline/visual/CTA zones as % positions + safe margins, orientation-aware), max text-length recommendations and a font-size floor for readability. Deterministic. |
| Creative compliance/spec linter — checks a creative's attributes against platform + RU ad-law rules (ORD/ЕРИР labelling, format ratio, text-over-image %, file weight, CTA, regulated-category legal gate) → pass/warn/fail per rule + prioritized fixes. Deterministic; not legal advice. |
Profession Breadth group (v2.67+ — deterministic, methodology-grounded role planners)
Four planners that extend coverage to under-served marketing roles (programmatic/DSP trading, marketplace listing SEO, lifecycle automation, PLG). Pure math on your inputs (same input → same output).
Tool | What it does |
| Flagship (pro+). DSP/programmatic trader: from budget, optional target CPM/CPA, a deal-type mix (PMP / open exchange / PG), viewability goal, frequency cap and flight length → per-deal bid strategy, budget pacing (daily + per deal type), expected impressions & de-duplicated reach, and the viewability-adjusted effective CPM (spend / viewable impressions × 1000) vs the goal. Programmatic mechanics — distinct from |
| Marketplace listing SEO (Wildberries/Ozon/Yandex Market): from category, listing attributes, search terms and competition → a 0–100 listing-optimization score, a keyword→slot mapping (title/attributes/description by volume), a ranking-factor checklist (pass/warn/fail + fix) and the projected organic-visibility uplift (volume × position-CTR). Organic ranking — distinct from |
| Lifecycle/CRM automation: designs a triggered cross-channel FLOW (welcome/onboarding/winback/abandoned-cart/reactivation) — ordered stages with delay, channel, purpose, per-step conversion → the funnel (per-step + cumulative conversions), the flow conversion rate and a revenue projection. The flow/automation blueprint — distinct from |
| Flagship (pro+). Product-led growth (SaaS): models the activation funnel (signup → activated → retained) around an aha-moment, applies activation-rate levers (onboarding checklist, time-to-value, empty states, activation email, in-app guidance, social proof) and projects activated/retained users + MRR (from ARPU). Activation specifically — distinct from |
Funnel logic & safety. All Growth figures are synthetic/illustrative and anchored to the same mock RU/CIS benchmarks (
src/data.ts) — internally consistent, but not guarantees. No tool transmits PII or makes a real network call.request_nectarin_proposalonly returns a brief for human review; the exact spot for a real CRM/webhook POST is commented insrc/growth.ts(gated behindNECTARIN_CRM_WEBHOOK_URL, left blank on purpose).
Growth & Automation env vars (wrangler.toml [vars])
Var | Purpose | Default |
| Scheduling link returned by |
|
| Funnel inbox shown in proposal next-steps. |
|
| Brand label used in copy. |
|
| Where a real proposal would POST. Blank = nothing is ever sent. |
|
Go live — exact steps
From this folder (nectarin-intelligence-worker/):
# 1. Install dependencies
npm install
# 2. Authenticate to Cloudflare (interactive browser login)
npx wrangler login
# …or, for CI / headless, set a scoped API token instead of logging in:
# export CLOUDFLARE_API_TOKEN="<your-token-with-Workers-Scripts-Edit>"
# (optionally also export CLOUDFLARE_ACCOUNT_ID="<your-account-id>")
# 3. Deploy
npx wrangler deployWrangler prints the live URL, e.g.:
https://nectarin-intelligence.<your-subdomain>.workers.devYour MCP endpoint is that URL + /mcp:
https://nectarin-intelligence.<your-subdomain>.workers.dev/mcpAdd to Claude (Custom Connector)
Claude → Settings → Connectors → Add custom connector.
Name:
NECTARIN Intelligence. URL: the/mcpURL above.Save. Because
DEV_BYPASS="1"is set inwrangler.toml, the server accepts requests without a token out of the box — good for a first smoke test. Turn auth on before any real/shared use (see Security below).
Smoke test with curl
# Replace with your deployed host.
HOST="https://nectarin-intelligence.<your-subdomain>.workers.dev"
# Health
curl -s "$HOST/health"
# MCP initialize
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'
# List tools
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
# Call media_plan (real forecast + compliance gate for finance)
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"media_plan","arguments":{"budget":5000000,"goal":"performance","geo":"РФ","audience":"25-45","period":"сентябрь 2026","category":"finance"}}}'initialize returns serverInfo, protocolVersion, and capabilities;
tools/list returns all 110 tools (11 Intelligence + 6 Growth & Automation + 11 Premium Analytics + 8 Premium + 1 MMM + 2 Planning + 2 Pricing & Promo + 2 Audit + 1 Executive + 2 Creative Ops + 1 Influence + 6 Media + 3 Brand + 1 Production + 2 Experimentation + 1 Competitive + 1 Search & SEM + 1 Retail Media + 2 Retention/CRM + 1 Email/Lifecycle + 1 Partnerships + 1 Roles/Adoption + 1 SEO + 1 Social/SMM + 1 PR + 1 Events + 1 Mobile/ASO + 1 Content + 1 Distribution + 1 Skills + 2 Growth Lab + 2 Federation + 3 Expansion + 4 B2B & CX + 6 Ops & Autonomy + 2 Marketing Ops & Leadership + 3 Foresight & Strategy + 3 Market & Revenue Science + 2 Launch & Brand Health + 1 Tenant Data + 3 Design & Creative Ops + 4 Profession Breadth);
media_plan returns the split, forecast totals, per-channel detail, and a
STOP-GATE flag for regulated categories.
# Flagship: full orchestrated strategy in one call
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"strategy_orchestrate","arguments":{"brand":"Acme","category":"finance","budget":8000000,"goal":"performance","geo":"РФ"}}}'
# Optimize the channel split to maximize conversions
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"budget_optimizer","arguments":{"category":"retail","budget":4000000,"goal":"performance"}}}'# Funnel example: ROI pitch (synthetic, anchored to mock benchmarks)
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"roi_calculator","arguments":{"monthly_budget":3000000,"category":"finance"}}}'
# Qualify a lead → tier recommendation
curl -s "$HOST/mcp" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"lead_qualify","arguments":{"company":"Acme","monthly_budget":6000000,"industry":"finance","goal":"performance"}}}'Local development
cp .dev.vars.example .dev.vars # edit if needed; .dev.vars is gitignored
npm run dev # wrangler dev → http://localhost:8787/mcp
npm run typecheck # tsc --noEmit
npm test # vitest run (30 tests)
npm run dry # wrangler deploy --dry-run --outdir dist (no Cloudflare auth needed)Tests
npm test runs the vitest suite against the Worker's fetch() handler directly:
initialize handshake, tools/list (110 tools), happy-path tools/call
(ru_benchmarks, media_plan, roi_calculator, lead_qualify,
budget_optimizer, strategy_orchestrate), invalid params (-32602), unknown
tool/method (-32601), the auth 401 path (DEV_BYPASS off, no token), plus unit
tests for the rate limiter and validator.
Production configuration
Everything below is off by default so the server runs locally with zero secrets. Turn it on for real/shared use.
Environment variables (wrangler.toml [vars])
Var | Purpose | Default |
|
|
|
| Expected |
|
| Expected |
|
| JWKS endpoint; blank → |
|
| Requests/min per token (or IP). |
|
| Build id surfaced by |
|
| Growth funnel (placeholders; no PII sent). | see table above |
Secrets (never in wrangler.toml / git)
Use Cloudflare secrets for anything sensitive:
npx wrangler secret put LLM_API_KEY # enables REAL narrative (Anthropic/OpenAI)
npx wrangler secret put NECTARIN_DATA_API_KEY # if using HttpDataSource.dev.vars is for local dev only and is gitignored.
Enable a real LLM narrative (optional)
callLLM() is real-or-stub. With no key it returns a deterministic stub, so
the server runs fully offline. To switch narrative copy (media_plan rationale,
creative_brief concepts, geo_aeo_audit summary, and the strategy_orchestrate
executive summary) to a real model:
npx wrangler secret put LLM_API_KEY # required to go liveOptional [vars]: LLM_PROVIDER (anthropic default | openai), LLM_MODEL
(per-provider default otherwise), LLM_BASE_URL (proxy/Azure/self-host). Any model
error degrades gracefully back to the stub — a tool call never fails because of the LLM.
Enable OAuth 2.1 (real bearer verification)
In
wrangler.toml[vars]setDEV_BYPASS = "0"and fillOAUTH_ISSUER,OAUTH_AUDIENCE(= your/mcpURL), and optionallyOAUTH_JWKS_URL.That's it —
src/auth.tsalready verifies the JWT withjose(createRemoteJWKSet+jwtVerify): signature, issuer, audience, expiry. A failed/missing token → HTTP 401 withWWW-Authenticate: Bearer error=…, resource_metadata="…". Unyly Connect is the authorization server (DCR + PKCE, issuance/rotation, per-tenant scopes); this Worker only validates.
Rate limits
Backend precedence (auto-selected in fetch(), reported by /health & /version):
Durable Object (
RATE_LIMITER, bound in this deploy) — strongly consistent: one DO instance per key owns a token bucket, so even a parallel burst is counted exactly. Verified on prod: a 120-request burst at 60/min returned ~64×200 / ~56×429.KV (
NECTARIN_KV) — global, cross-isolate fixed-window (eventually consistent; can over-admit under a burst). Used if no DO.Memory — per-isolate token bucket. Used if neither binding is present.
Everything is fail-open: a DO/KV error degrades to the next layer (down to memory), so an infra hiccup never hard-locks the public connector.
RATE_LIMIT_PER_MINsets the ceiling (default 60).Over-limit → JSON-RPC
-32029+ HTTP 429 withRetry-After/X-RateLimit-*.
Per-tenant data (X-Tenant-Id)
With KV bound, each request may carry an X-Tenant-Id header (alphanumerics /
._-, ≤64 chars). The Worker then resolves benchmark/playbook/supplier lookups
in the order tenant override → global override → bundled mock, where the
tenant layer reads tenant:<id>:benchmarks:<category> (etc.) from KV. This is
request-scoped via AsyncLocalStorage — concurrent requests never share or race
each other's data source, and no tool code changes. An absent/invalid header (or
no KV) transparently falls back to the shared data. Reported by /health &
/version (perTenant). To populate a tenant:
npx wrangler kv key put --remote --namespace-id <id> "tenant:acme:benchmarks:retail" '<json>'.
Tenant metrics (v2.61, structured schema v2.64): store a read-only metrics blob at
tenant:<id>:metrics. Set NECTARIN_TENANT_DATA_MODE=kv to read from KV (default mock
returns a demo blob and keeps every tool on its prior synthetic behavior). Inspect config
via tenant_metrics_snapshot(tenantId=…) (now reports a dataStatus block: configured,
blobExists, schemaVersion, updatedAt).
The v2.64 real-data pilot (Phase D) defines one documented, versioned superset schema
(src/tenantdata.ts) that several tools read via an opt-in useTenantData:true flag:
{
"schemaVersion": 1, // integer; bump on a breaking shape change
"updatedAt": "2026-07-01T00:00:00Z", // ISO8601 / free-form label
"currency": "RUB",
"funnel": { // absolute counts for a period
"impressions": 1200000, "clicks": 24000,
"leads": 1800, "qualified": 900, "sales": 260,
"spend": 2400000, "revenue": 5600000
},
"channels": [ // optional per-channel breakdown
{ "name": "VK Ads", "spend": 900000, "revenue": 2100000, "conversions": 90 }
],
"kpis": { // current KPI VALUES
"cpa": 9230, "ctr": 2.0, "roas": 2.33,
"cac": 9230, "ltv": 21000, "aov": 21538,
"churnPct": 4.5, "convRatePct": 1.08
},
"targets": { "cpa": 8000, "ctr": 2.5, "roas": 3.0, "churnPct": 3.0 } // optional
}Every section is optional — a blob may carry only kpis, only funnel, or both.
kpi_alert_engine(useTenantData:true)— pulls current KPI values (and matchingtargets) fromkpis, grades them, and routes breaches to actions/tools. Manualmetricsstill win per KPI name.funnel_model(useTenantData:true)— derives real click→lead / lead→sale conversion rates (and AOV) fromfunnelcounts; explicitleadRatePct/aov/etc. overrides win.
The flag is strictly opt-in and non-breaking: it is inert unless mode=kv AND a blob
exists at the resolved key. In mock/authless/owner mode (prod default) the tools behave
exactly as before and, when the flag is set, return a clear "configure tenant data" note.
In kv mode with an authenticated X-Tenant-Id, a mismatched tenantId argument is
rejected (IDOR guard). Populate a blob with:
npx wrangler kv key put --remote --namespace-id <id> "tenant:acme:metrics" '<json>'.
Swapping the data source (mock → real)
Provide the datasets in
DATA_SCHEMA.md(benchmarks,playbooks,suppliers) via KV, D1, or an internal HTTP API.Implement
KvDataSourceorHttpDataSourceinsrc/data.ts(stubs included).Add the binding in
wrangler.toml, then callsetDataSource(...)once at the top offetch()insrc/index.ts. No tool/orchestrator changes needed.(Optional) Swap
callLLM()insrc/orchestrator.tsfor a real modelfetch().
Wiring real data later
src/data.ts defines a DataSource interface (getMetric,
getCategoryBenchmarks, getPlaybook, getSuppliers); the default is
MockDataSource over inline synthetic objects. Tools read only through this
interface, so going real is a one-line wiring change — no upstream edits.
Create the store and paste its ID into the commented block in
wrangler.toml:npx wrangler kv namespace create NECTARIN_KV # or npx wrangler d1 create nectarin-intelligenceImplement
KvDataSourceorHttpDataSourceinsrc/data.ts(commented stubs included) against the data described inDATA_SCHEMA.md.Call
setDataSource(new KvDataSource(env.NECTARIN_KV))once at the top offetch()insrc/index.ts.Swap
callLLM()insrc/orchestrator.tsfrom the stub to an Anthropic/OpenAIfetch()call (key fromwrangler secret) for real narrative copy.
DATA_SCHEMA.mdis the client handoff: it lists the exact tables/collections (benchmarks,playbooks,suppliers), columns, types, example rows, and which tool consumes each. Hand it to NECTARIN to source the data.
Resources & prompts exposed
Resources:
nectarin://methodology,nectarin://glossary, andnectarin://catalog— a liveapplication/jsoncatalog of every tool (title, description, input schema, behavioral annotations) + prompts, generated from the registry on read so it never drifts.Tool annotations:
tools/listreturns MCPToolAnnotationshints + a displaytitleper tool. Pure tools arereadOnlyHint/idempotentHinttrue,openWorldHintfalse; LLM-backed (creative_variants,localize) are non-idempotent/open-world;request_nectarin_proposalis not read-only.Prompts (13):
build_media_plan,full_strategy(one-shot flagship viastrategy_orchestrate),competitor_teardown, the two funnel orchestratorssell_nectarin_services(roi_calculator → value_forecast → lead_qualify → request_nectarin_proposal → book_consultation) andautomate_my_marketing(automation_recipe → roi_calculator → book_consultation), pluscreative_lab(creative_variants → compliance_check → ab_test_planner),growth_monitor(anomaly_detector → cohort_ltv + unit_economics),launch_flight(media_plan → seasonality_forecast → utm_builder → pacing_monitor) andperformance_review(anomaly_detector → attribution_model → bid_simulator → budget_optimizer),saturation_reallocation(response_curve → pacing_monitor) for diminishing-returns budget splits, andmmm_planning(mmm_optimize) for time-series adstock + saturation modeling,quarter_plan(gtm_calendar) for a phased Test→Scale→Optimize roadmap with seasonally-weighted weekly budget pacing,account_audit(marketing_audit) for a health-scored account diagnostic + action plan, andscenario_review(scenario_planner) to compare conservative/base/aggressive budget scenarios head-to-head and recommend one by conversions, CPA or ROI, andpromo_review(promo_planner) for discount break-even & promo ROI,price_optimization(price_optimizer) for the profit-maximizing price,influencer_plan(influencer_planner) for the best influencer mix,olv_plan(reach_frequency) for OLV/media reach & frequency, andbrand_lift_study(brand_lift) to measure or size a brand-lift study,omnichannel_reach(channel_overlap) for cross-channel deduplicated reach,production_budget(production_estimator) for a production budget & timeline,flighting_plan(media_flowchart) for a weekly media flowchart,geo_test(geo_holdout) to design/measure a geo incrementality test,sov_analysis(sov_tracker) for Share of Voice & ESOV growth,media_quality_check(media_quality_score) for delivery quality scoring,competitive_wargame(competitive_response) to war-game a competitor move,pacing_forecast(budget_pacing_forecast) for a trend-aware pacing forecast,audience_dedup(audience_overlap) for measured audience deduplication,creative_rotation_plan(creative_rotation) for fatigue-aware rotation,utm_audit(utm_taxonomy_qa) for batch UTM taxonomy QA,meta_analysis(incrementality_meta) to pool multiple tests, andexec_report(board_report) for a board-ready one-pager (audit + upside), andcreative_fatigue_check(creative_fatigue) to spot burning-out creatives.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alxvasilevvv/nectarin-intelligence-worker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server