NECTARIN Intelligence MCP Server
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
A deploy-ready 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), and ships with mock/synthetic RU data so v1 needs no database.
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. Swap the data accessors in
src/data.tsfor real data when ready (KV/D1 stubs are inwrangler.toml).
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,ping, and thenotifications/*no-ops, with proper JSON-RPC results/errors.src/tools.ts— the tool registry. It composes two groups: the 9 Intelligence tools and the 6 Growth & Automation tools (see the table below), each with a JSON-SchemainputSchema+ async handler.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/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.src/data.ts— synthetic benchmarks / suppliers / playbooks behind aDataSourceinterface (defaultMockDataSource;KvDataSource/HttpDataSourcestubs included). 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 |
| 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 (15 total)
Intelligence group (inform)
Tool | What it does |
| 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 |
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 15 tools (9 Intelligence + 6 Growth & Automation);
media_plan returns the split, forecast totals, per-channel detail, and a
STOP-GATE flag for regulated categories.
# 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 (24 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 (15 tools), happy-path tools/call
(ru_benchmarks, media_plan, roi_calculator, lead_qualify), 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 # when callLLM() is wired to a model
npx wrangler secret put NECTARIN_DATA_API_KEY # if using HttpDataSource.dev.vars is for local dev only and is gitignored.
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
Default is an in-memory token-bucket per token/IP (
RATE_LIMIT_PER_MIN). It is per-isolate, so for hard global limits install a shared limiter: implementKvRateLimiterorDurableObjectRateLimiter(stubs insrc/ratelimit.ts) and callsetRateLimiter(new KvRateLimiter(env.NECTARIN_KV))at the top offetch().Over-limit → JSON-RPC
-32029+ HTTP 429 withRetry-After/X-RateLimit-*.
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.Prompts:
build_media_plan,competitor_teardown, and 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).
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
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