CreatorScope MCP

CreatorScope MCP

Enables Claude to pull exact YouTube creator stats (subscribers, views, engagement) and discover new creators, then write them into a Notion Influencers roster.

Category
访问服务器

README

CreatorScope MCP

A small MCP server that lets Claude directly pull exact YouTube creator stats and discover new creators, then write them into the Notion Influencers roster. Powered by the free YouTube Data API v3 (10,000 units/day, no card).

Same infra pattern as TitanMail: Node/TypeScript, one tool per file, deployed with pm2 + Caddy + token auth on the always-on EC2 box.

What it can / can't do

  • ✅ Exact subscribers, per-video views → avg/median views, likes, comments → engagement rate, upload frequency, country, channel description (often with a business email). This is the full input to Avg Views × CPM pricing.
  • ❌ Audience demographics, % US audience, fake-follower % — private to the channel owner; no API exposes them. Use Modash's free trial only when a brand demands audience-quality proof.

Tools

Tool Purpose Quota cost
ping(deep?) Health check; deep=true makes a live 1-unit call to validate the API key. 0 or 1
resolve_channel(input) @handle / URL / video URL / channelId → { channelId, title, handle, url }. ~1–2
channel_stats(input, sample?, exclude_shorts?) Full computed stat object for one creator. ~3
bulk_channel_stats(inputs[], sample?, exclude_shorts?, fresh?) Stats for many inputs in one call, batched (channels/videos 50 at a time), with per-item errors. ~3 each (batched cheaper)
search_channels(query, {min_subscribers?, country?, relevance_language?, max_results?, hydrate_stats?, exclude_channel_ids?}) Discover candidate channels; max_results is caller-chosen and paginated (up to MAX_SEARCH_RESULTS, default 200); dedupes + can exclude roster channels; optionally hydrate full stats. 100 per 50 results (+~3 each if hydrated)
quota_status() Local daily unit counter vs the 10,000 limit. 0

Caching & freshness

Computed stats are cached per channel for CACHE_TTL_MS (default 6h), so repeat roster pulls don't re-spend quota. Results served from cache carry cached: true. Pass fresh: true to channel_stats / bulk_channel_stats to bypass the cache and force a live re-pull — do this right before quoting a brand. Concurrent identical requests are de-duplicated onto a single in-flight fetch, so a stampede can never double-spend quota.

channel_stats output fields

Identity/audience: channelId, title, handle, url, subscribers, subscribersHidden, totalViews, videoCount, lifetimeAvgViews, country, channelCreatedAt, channelAgeDays, description. Contact/discovery: emails[], businessEmail, links[] ({type,url}), keywords[], topics[]. Performance: avgViews, medianViews, minSampledViews, maxSampledViews, avgLikes, avgComments, engagementRatePct, likeRatePct, commentRatePct, viewsPerSubscriberPct, avgToMedianRatio, consistency, recentTrend, likesHidden, uploadsPerMonth, daysBetweenUploads, lastUploadDate, sampledCount, excludeShorts, plus recentVideos[] (included by default on channel_stats; opt in on bulk_channel_stats via include_videos).

Emails: emails[] is parsed from the public channel description. YouTube's About-page "business email" button is CAPTCHA-gated and exposed by no API — use links[]/website plus a dedicated email-finder to go further.

Computed:

  • avgViews = mean views of the last N non-Short videos (default N=15).
  • medianViews = median (robust to a single viral outlier).
  • engagementRatePct = (mean likes + mean comments) ÷ avgViews × 100. Divide-by-zero guarded; hidden likeCount is excluded from the mean and flags likesHidden.
  • uploadsPerMonth = sample size ÷ (span of sampled days ÷ 30).
  • Shorts filter (exclude_shorts, default true): parses ISO-8601 duration and drops videos < 60s so avg views isn't skewed.
  • businessEmail = first email found in the channel description (handles at/dot obfuscation).

Quota model

Per the API: channels.list = 1, playlistItems.list = 1/page, videos.list = 1/batch of 50, search.list = 100. One full channel_stats ≈ 3 units → ~3,000 creators/day on the free tier. Discovery (search_channels) costs 100 each → ~100 searches/day. A local .quota-counter.json tracks usage per UTC day as a soft-guard and warns near the limit.


Local development

npm install
cp .env.example .env      # fill in YOUTUBE_API_KEY and CREATORSCOPE_TOKEN
npm run build
npm start
npm test                  # run the unit-test suite (no network needed)
npm run smoke             # end-to-end: exercises the live tools (server must be running)

The server listens on http://127.0.0.1:8790/mcp (Streamable HTTP). GET /healthz is an unauthenticated liveness probe. Every /mcp request requires the token via Authorization: Bearer <CREATORSCOPE_TOKEN> (or an X-CreatorScope-Token header).

Quick check once running:

curl -s http://127.0.0.1:8790/healthz

Configuration (.env)

Var Default Notes
YOUTUBE_API_KEY — Required. Restrict to YouTube Data API v3 only (+ optional IP-restrict to the EC2 IP).
CREATORSCOPE_TOKEN — Required. Bearer token clients must present. Generate with openssl rand -hex 32.
PORT 8790 Local port Caddy proxies to.
HOST 127.0.0.1 Keep loopback so only Caddy can reach it.
QUOTA_DAILY_LIMIT 10000 Free-tier daily unit budget.
QUOTA_WARN_THRESHOLD 0.85 Warn once usage crosses this fraction.
DEFAULT_SAMPLE 15 Recent non-Short videos to sample.

Deploy on EC2 (pm2 + Caddy + token)

  1. Clone + build on the box:
    git clone <private-repo> creatorscope-mcp && cd creatorscope-mcp
    npm ci && npm run build
    cp .env.example .env   # set YOUTUBE_API_KEY + a fresh CREATORSCOPE_TOKEN
    
  2. Start with pm2:
    pm2 start ecosystem.config.cjs
    pm2 save && pm2 startup
    
  3. Add the Caddy route — copy the block from Caddyfile.example into your Caddyfile (adjust the subdomain/port), then caddy reload. Caddy handles TLS; the app enforces the token.
  4. Connect to Claude: claude.ai → Settings → Connectors → Add custom connector →
    • URL: https://creatorscope.perplexionmedia.com/mcp
    • Auth: Bearer token = your CREATORSCOPE_TOKEN.
  5. Verify: tell Claude "CreatorScope connected" → it runs ping deep + one test channel, then enriches the roster.

Founder one-time setup (Google Cloud)

console.cloud.google.com → New Project ("Perplexion CreatorScope") → APIs & Services → Library → enable YouTube Data API v3 → Credentials → Create API key → restrict it to that API. ~5 min, free, no card.


How Claude uses it (workflow)

  1. Enrich existing roster: bulk_channel_stats(["@Techlore", "@AllThingsSecured", …]) → write real subs/avgViews/engagement into Notion Influencers (replacing manual estimates); Est. Price auto-recomputes.
  2. Discover new creators: search_channels("VPN review", { min_subscribers: 20000, country: "US" }) → bulk_channel_stats the candidates → filter by engagement + avg views + niche fit → add the good ones to Notion (status Collected) with stats + auto price.
  3. On-demand vetting: brand replies "send creators" → pull fresh stats for the shortlist so pricing is current.

CPM stays Claude-set by sub-niche (see Pricing & Economics); the MCP supplies views/engagement only.

Project layout

src/
  config.ts        env loading + validation
  quota.ts         per-day unit counter (soft-guard, atomic writes)
  cache.ts         TTL cache + in-flight de-duplication (stampede-safe)
  log.ts           structured JSONL logging (stdout + optional file)
  util.ts          input parsing, ISO-8601 duration, median, email extraction
  youtube.ts       typed YouTube Data API v3 client (timeout, retry/backoff, batching)
  stats.ts         resolve + compute stat objects (batched) + discovery
  server.ts        Streamable HTTP MCP server + bearer-token auth
  tools/           one file per tool (ping, resolve_channel, channel_stats, …)
test/              unit tests (node:test) — util, pricing math, cache/dedupe
scripts/
  smoke-client.mjs end-to-end MCP client test against a running server
ecosystem.config.cjs   pm2 process definition (fork mode, single instance)
Caddyfile.example      sample reverse-proxy route
.env.example           config template

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选