{
  "markdown": "# creatordb-mcp-server\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the [CreatorDB V3 API](https://apiv3.creatordb.app) to any MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.).\n\n**45 tools across six surfaces:**\n\n- **Creator-side data** — profile, performance, audience demographics, contact, content-detail, performance history for YouTube, Instagram, and TikTok\n- **Creator search** — natural-language search across all three platforms, plus structured filter search per platform (country, language, follower thresholds, niches, hashtags, audience demographics, etc.)\n- **Brand-side / sponsor intelligence** *(YouTube + Instagram only — TikTok brand data is not indexed)* — search CreatorDB's 10K+ indexed brands, pull a brand's full profile, list every creator a brand has sponsored, get aggregated audience demographics across a brand's sponsored creator pool, and cross-platform spend / CPM / CPE rollups. The heavier sponsor reads (`get_sponsor_creators`, `get_sponsor_performance`, `get_sponsor_audience`, `get_sponsor_summary`) cost 15 credits each — use deliberately. `get_sponsor_information` is 2, `search_sponsors` 2, `list_sponsors` 1.\n- **Content search** — find individual videos, reels, images, shorts, or TikToks by content-level filters (publish time window, view/like thresholds, hashtags, sponsored-vs-organic, language, niche, etc.). Different from creator search — this returns posts, not channels.\n- **Topic + niche taxonomies** — paged, searchable catalogs (~470 YT topics, ~16K YT niches, ~40K each on IG/TT) for resolving the per-creator topic/niche IDs returned in profile responses. Pass `search` to resolve a phrase to entry names rather than paging.\n- **Account** — credit usage broken down by endpoint and platform.\n\nEvery tool returns the underlying V3 JSON plus a `Credits used: N | Remaining: M` footer line, so the AI knows exactly what it's spending.\n\n> **Working with Claude Code?** Open this README in Claude Code (or paste the URL into a Claude session) and say *\"set up this MCP for me.\"* The steps below are written so an AI assistant can follow them top to bottom.\n\n## Quick start\n\nThere are two ways to connect, depending on your client:\n\n- **Local clients** (Claude Code, Claude Desktop, Cursor) run the server as a subprocess via `npx` — see [Install (local / stdio)](#install-local--stdio).\n- **Web / desktop / mobile clients** connect to the hosted endpoint, or add CreatorDB straight from Claude's connector directory — see [Remote connector](#remote-connector-claude-web-desktop-mobile).\n\nBoth expose the same 45 tools. Both need a CreatorDB V3 API key.\n\n1. **Prerequisites**\n   - For the local route: Node.js 22 or newer (`node -v` to check)\n   - A CreatorDB V3 API key — get one from <https://creatordb.app> account settings, or ask your team admin\n2. **Pick a connection method** below\n3. **Restart your MCP client** so it picks up the new tools\n4. **Verify** by running `/mcp` in Claude Code — `creatordb` should appear with status `connected`\n\n## Install (local / stdio)\n\nFor Claude Code, Claude Desktop, and Cursor. The server reads one environment variable: `CREATORDB_API_KEY` (your V3 key).\n\n### Method A — `npx` from npm (recommended)\n\nThe package is published to npm as **`@creatordbai/mcp-server`**. No local clone, no SSH key, no GitHub access required:\n\n**Claude Code:**\n```bash\nclaude mcp add creatordb -s user \\\n  -e CREATORDB_API_KEY=YOUR_CREATORDB_API_KEY \\\n  -- npx -y @creatordbai/mcp-server\n```\n\n**Claude Desktop** — edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n```json\n{\n  \"mcpServers\": {\n    \"creatordb\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@creatordbai/mcp-server\"],\n      \"env\": { \"CREATORDB_API_KEY\": \"YOUR_CREATORDB_API_KEY\" }\n    }\n  }\n}\n```\n\nIf you have GitHub org access and want to track `main` instead of the npm release, swap the npm name for `git+ssh://git@github.com/CreatorDB/creatordb-mcp-server.git` — the repo's `prepare` script will build on install.\n\n### Method B — clone and build locally\n\nGood if you want to read/modify the source, or if `npx` from git doesn't work in your environment.\n\n```bash\ngit clone https://github.com/CreatorDB/creatordb-mcp-server.git\ncd creatordb-mcp-server\nnpm install\nnpm run build\n\n# Then register with Claude Code:\nclaude mcp add creatordb -s user \\\n  -e CREATORDB_API_KEY=YOUR_CREATORDB_API_KEY \\\n  -- node \"$(pwd)/dist/index.js\"\n```\n\nFor Claude Desktop, use the same JSON as Method A but swap `command` + `args`:\n```json\n\"command\": \"node\",\n\"args\": [\"/absolute/path/to/creatordb-mcp-server/dist/index.js\"],\n```\n\n### Method C — project-scoped via `.mcp.json` (best for teams)\n\nDrop a `.mcp.json` into a CreatorDB project repo. Anyone who opens that repo in Claude Code gets prompted to enable the MCP — no per-person setup commands.\n\n```json\n{\n  \"mcpServers\": {\n    \"creatordb\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"git+ssh://git@github.com/CreatorDB/creatordb-mcp-server.git\"],\n      \"env\": { \"CREATORDB_API_KEY\": \"${CREATORDB_API_KEY}\" }\n    }\n  }\n}\n```\n\n`${CREATORDB_API_KEY}` reads from the user's shell environment, so the key stays out of git. Each teammate sets it once in their `.zshrc`/`.bash_profile`:\n```bash\nexport CREATORDB_API_KEY=YOUR_CREATORDB_API_KEY\n```\n\n## Remote connector (Claude web, desktop, mobile)\n\nClaude clients that can't spawn a local subprocess connect to the hosted endpoint instead of running `npx`. There are two ways in.\n\n**From the connector directory (easiest).** CreatorDB is listed in Claude's connector directory. In Claude: **Settings → Connectors → Add → Browse connectors**, search **CreatorDB**, open **CreatorDB MCP**, and click **Connect to Claude**.\n\n**Add it manually.** You can also add it directly: **Settings → Connectors → Add → Add custom connector**, and enter the URL:\n\n```\nhttps://mcp.creatordb.app/mcp\n```\n\nLeave the Advanced OAuth Client ID / Secret fields empty — the server registers the client automatically.\n\nEither way, you'll be prompted to enter your CreatorDB API key when you connect, and the same 45 tools appear.\n\nNotes:\n- You'll be prompted to enter your key when you connect; the connector seals it into an encrypted session token and keeps no separate copy. CreatorDB stores the key only as the credential it issued you.\n- Programmatic clients calling the endpoint directly can instead send `Authorization: Bearer <your CreatorDB V3 API key>`.\n- Health check: <https://mcp.creatordb.app/health> (no auth, 0 credits) — returns `{\"status\":\"ok\",...}` when the service is up.\n- Hosted as a Firebase Cloud Function (gen 2) in `asia-northeast1`; source is in [`functions/`](./functions).\n- Don't have a key? Get one at <https://app.creatordb.app> or email hello@creatordb.app.\n\n## Changing your API key\n\nYou don't update a key inside the MCP server — it doesn't store keys. You change it in your client's MCP configuration and restart.\n\n### Local install (Claude Code, Claude Desktop, Cursor)\n\nEdit the same config file you used during setup:\n\n- **Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows)\n- **Cursor:** `~/.cursor/mcp.json` (or the in-app MCP settings UI)\n- **Claude Code:** `~/.mcp.json` or your project's `.mcp.json`\n\nChange the `CREATORDB_API_KEY` value, then **fully restart the client** (⌘Q + reopen for Claude Desktop, restart the Cursor app, etc.). MCP clients only read the key at process startup.\n\nIf you set the key from your shell environment (Method C above, with `${CREATORDB_API_KEY}` syntax), update `~/.zshrc` / `~/.bash_profile` and restart your terminal before restarting the client.\n\n### Remote connector (Claude web, desktop, mobile)\n\nIn **Settings → Connectors → CreatorDB**, disconnect and reconnect, then enter the new key when prompted. (A programmatic client sending a Bearer token just starts sending the new key.)\n\n### One thing to know about rotating a leaked key\n\nChanging the key on the client side only swaps which key your tools authenticate with. **It does NOT invalidate the previous key.** If you're rotating because the old key was exposed:\n\n1. Go to your CreatorDB account and **revoke the old key** there — that's what actually kills it at the V3 API layer.\n2. Then update the MCP client to use the new key as above.\n\nThe MCP server never persists your key past a single request, so there's no server-side \"stored key\" to purge.\n\n## Verify it works\n\nAfter install, restart Claude Code (or your MCP client) and:\n\n1. Run `/mcp` — you should see `creatordb` listed with status **connected**\n2. Ask Claude something that uses the tools, e.g. *\"use creatordb to look up the YouTube profile for MrBeast (channelId UCX6OQ3DkcsbYNE6H8uQQuVA)\"*\n3. The response should include creator data and a `Credits used: 2 | Remaining: …` footer\n\n## Troubleshooting\n\n| Symptom | Cause | Fix |\n| --- | --- | --- |\n| `/mcp` shows `creatordb` as `failed` or `connecting` forever | API key missing or wrong | Re-add with `claude mcp remove creatordb && claude mcp add …` using the correct key |\n| Tools work but every response ends `Credits used: undefined` | Stale tool schema from an older build of this server | Restart the MCP client — clients cache the schema at session start |\n| `Error: VALIDATION_ERROR` on Instagram tools | Passing `userId` instead of `uniqueId` | IG endpoints take the handle as `uniqueId`. Older clients with stale schemas hit this most |\n| `npx` install fails with `EACCES: permission denied` | npx cache permission issue | `rm -rf ~/.npm/_npx` and re-run |\n| `Error: ENOENT` or `cannot find dist/index.js` | Method B didn't run `npm run build` | `cd` into the repo and run `npm install && npm run build` |\n| Tool descriptions seem outdated vs this README | Schema cached from an old version | `claude mcp remove creatordb && claude mcp add …` to force a re-fetch |\n\n> **Why restarts matter** — MCP clients fetch the tool list once at session start. Server updates (new tools, renamed params, fixed costs) only show up after the client reconnects. This is the single most common confusion.\n\n> **Upgrading to a newer published version?** `npx` caches packages by exact version, so a configured client keeps running whatever version it first downloaded. To force-pull the latest, either pin to `@latest` in your config (`npx -y @creatordbai/mcp-server@latest` re-resolves each launch) or clear the npx cache once (`rm -rf ~/.npm/_npx`). Then restart the MCP client.\n\n## Releasing (maintainers)\n\nThe `.github/workflows/release.yml` workflow publishes to npm whenever a `v*.*.*` tag is pushed.\n\n```bash\n# bump version, commit, tag, push\nnpm version patch              # or minor / major\ngit push && git push --tags\n```\n\nThe workflow validates that the tag matches `package.json` `version`, runs `npm ci`, builds, and publishes via [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers) with sigstore provenance attestation. No long-lived `NPM_TOKEN` is stored — the workflow exchanges a GitHub OIDC token for a short-lived npm publish token at runtime.\n\n## Roadmap\n\n- **Goal**: list in the [MCP registry](https://modelcontextprotocol.io) and Claude's MCP marketplace so the server shows up when users browse MCP servers from inside their client.\n- Contributions, issues, and feedback welcome — see [Getting help](#getting-help) below.\n\n## Tools\n\n45 tools across six categories. Every tool returns a structured JSON payload plus a `Credits used: N | Remaining: M` footer line.\n\n### Account (1)\n\n| Tool | Cost | Notes |\n| --- | --- | --- |\n| `get_api_usage` | 0 | Daily request counts and credit consumption by endpoint. Defaults to last 7 days; takes optional `start`/`end` Unix-ms timestamps. |\n\n### Search (4)\n\n| Tool | Cost | Notes |\n| --- | --- | --- |\n| `search_creators_nls` | dynamic (token-based) | Natural-language search across all three platforms. The AI picks the platform and converts the query into filters. |\n| `search_youtube` | 1 per 10 filters | Structured filter search. Use `totalSubscribers` for count thresholds. |\n| `search_instagram` | 1 per 10 filters | Structured filter search. Use `totalFollowers` for count thresholds. |\n| `search_tiktok` | 1 per 10 filters | Structured filter search. Use `totalFollowers` for count thresholds. |\n\n**Filter type gotcha:** numeric ops (`>`, `<`, `=` on subscriber/follower/rate fields) require a **number** value, not a numeric string. `\"1000000\"` → `VALIDATION_ERROR`; `1000000` → ok.\n\n**Hashtag value gotcha:** stored hashtags on IG/TT carry the leading `#`, so filter values usually want `\"#beauty\"`, not `\"beauty\"`.\n\n### Sponsors / brand data (8)\n\nBrand-side intelligence: which brands sponsor creators, how much they spend, which creators they work with. Sponsor data covers **YouTube and Instagram only** — TikTok is not indexed for brands.\n\nBrand-key: `brandId`, typically the brand's primary domain (e.g. `\"acer.com\"`, `\"nike.com\"`).\n\n| Tool | Cost | Returns |\n| --- | --- | --- |\n| `search_sponsors` | 2 per page | Brand search by structured filters. Lean records (brandId, name, logo, industries, country). |\n| `list_sponsors` | 1 per page | Paginated directory of all 10K+ indexed brands. |\n| `get_sponsor_information` | 2 | Full brand profile: aliases, keyPeople, industries, location, website, socialMedia, competitors. |\n| `get_sponsor_creators` | **25 per page** | Inverse of `get_*_sponsorship` — which creators has this brand sponsored. Returns followers, lastSponsoredDate, sponsoredCount, topics, niches per creator. |\n| `get_sponsor_performance` | **25 per page** | Per-content sponsorship perf. Three stats scopes per creator (creatorTotal, allSponsored lifetime, this-brand-only). YT-only: estimatedCost, CPM. |\n| `get_sponsor_audience` | **25** | Aggregated audience demographics across the brand's sponsored creator pool. IG block reserved but null today (backend YT-only). |\n| `get_sponsor_summary` | **25** | Cross-platform rollup: totalSponsoredCreators/Content, per-platform creators + performance + growth30d. |\n| `submit_sponsor` | 1 (0 if duplicate) | Submit a brand for indexing. Rate-limited 100/day per key. Returns submissionId + status. |\n\n**Cost warning** — `get_sponsor_creators`, `get_sponsor_performance`, `get_sponsor_audience`, `get_sponsor_summary` each cost **25 credits** per call. Use `search_sponsors` / `list_sponsors` / `get_sponsor_information` for cheap exploration first.\n\n### YouTube creator data (8 + 4 platform-specific)\n\nCreator-key: `channelId` (the UC… form — `@handle` / `/c/` / `/user/` URLs are not accepted; resolve first).\n\n| Tool | Cost | Returns |\n| --- | --- | --- |\n| `get_youtube_profile` | 2 | Identity, subscribers, country, language, linked socials, channel categories, plus the creator's `topics` and `niches`. |\n| `get_youtube_contact` | 15 | Email addresses. |\n| `get_youtube_performance` | 2 | R20 (last 20 videos) + all-time (up to 800) engagement metrics; consistency scores. |\n| `get_youtube_performance_history` | 3 | Daily snapshots over the past N days. Takes `pastDayRange` (string integer, 1–365). |\n| `get_youtube_audience` | 10 | Age buckets, gender split, top countries. |\n| `get_youtube_content_detail` | 3 | Recent videos + shorts with per-item engagement. |\n| `get_youtube_sponsorship` | 5 | Sponsored content grouped by indexed brand (recent posts only — empty list ≠ \"no sponsors\"). |\n| `list_youtube_topics` | 1 | The YT TOPIC taxonomy (~470 entries with channelCount), paged. **YouTube-only — IG and TT do not have a topic taxonomy.** `search`, `category`, `minChannelCount`, `pageSize`, `offset`. |\n| `list_youtube_niches` | 1 | The YT NICHE taxonomy (~16K entries with channelCount), paged. `search`, `category`, `minChannelCount`, `pageSize`, `offset`. |\n| `search_youtube_content` | 2 per page | Search individual VIDEOS/SHORTS/STREAMS by content-level filters (different from `search_youtube`, which searches creators). Returns title, publishTime, views, isSponsored, partneredBrands, hashtags + nested creator block. Both content-level and creator-level filters supported. |\n| `get_youtube_subtitles_meta` | 1 | Per-video subtitle track listing. Takes `videoId` (not channelId). |\n| `get_youtube_subtitles_download` | 3 | Subtitle text for one video. Takes `videoId`, optional `language` (ISO 639-3). |\n\n### Instagram creator data (8 + 1)\n\nCreator-key: `uniqueId` (the handle, no `@`).\n\n| Tool | Cost | Returns |\n| --- | --- | --- |\n| `get_instagram_profile` | 2 | Identity, followers, country, language, isBusinessAccount, linked socials, hashtags, account categories, plus the creator's `niches`. |\n| `get_instagram_contact` | 15 | Email addresses. |\n| `get_instagram_performance` | 2 | First-page image + reels engagement; consistency scores. |\n| `get_instagram_performance_history` | 3 | Daily snapshots over the past N days. Takes `pastDayRange`. |\n| `get_instagram_audience` | 10 | Age buckets, gender split, top countries. |\n| `get_instagram_content_detail` | 2 | Recent images + reels with per-item engagement. |\n| `get_instagram_sponsorship` | 5 | Sponsored content grouped by indexed brand (recent posts only). |\n| `search_instagram_content` | 2 per page | Search individual IMAGES/REELS by content-level filters (different from `search_instagram`, which searches creators). NO views or lengthSec (IG data model). Returns description, publishTime, likes, isSponsored, partneredBrands, hashtags + nested creator block. |\n| `list_instagram_niches` | 1 | The IG NICHE taxonomy (~40K entries), paged. **Instagram does NOT have a \"topics\" taxonomy.** `search`, `minChannelCount`, `pageSize`, `offset`. |\n\n### TikTok creator data (7 + 1)\n\nCreator-key: `uniqueId` (the handle, no `@`).\n\n| Tool | Cost | Returns |\n| --- | --- | --- |\n| `get_tiktok_profile` | 2 | Identity, followers, country, language, hashtags, plus the creator's `niches`. |\n| `get_tiktok_contact` | 15 | Email addresses. |\n| `get_tiktok_performance` | 2 | Recent videos engagement (views, likes, comments, shares); consistency scores. |\n| `get_tiktok_performance_history` | 3 | Daily snapshots over the past N days. Takes `pastDayRange`. |\n| `get_tiktok_audience` | 10 | Age buckets, gender split, top countries. |\n| `get_tiktok_content_detail` | 2 | Recent videos with audio metadata, duet/stitch/commerce flags, per-item engagement. |\n| `search_tiktok_content` | 2 per page | Search individual VIDEOS by content-level filters (different from `search_tiktok`, which searches creators). NO isSponsored/partneredBrands (TT brand-attribution not implemented). Filter terminology uses `diggs` but response normalizes to `likes`. |\n| `list_tiktok_niches` | 1 | The TT NICHE taxonomy (~40K entries), paged. **TikTok does NOT have a topics taxonomy, and does NOT expose a per-brand sponsorship endpoint.** `search`, `minChannelCount`, `pageSize`, `offset`. |\n\n## Cross-platform differences cheat-sheet\n\n| Dimension | YouTube | Instagram | TikTok |\n| --- | --- | --- | --- |\n| Creator parameter | `channelId` (UC…) | `uniqueId` (handle) | `uniqueId` (handle) |\n| Follower field | `totalSubscribers` | `totalFollowers` | `totalFollowers` |\n| Has a topic taxonomy | ✅ `list_youtube_topics` | ❌ | ❌ |\n| Has a niche taxonomy | ✅ `list_youtube_niches` | ✅ `list_instagram_niches` | ✅ `list_tiktok_niches` |\n| Per-creator niches in `/profile` | ✅ | ✅ | ✅ |\n| Per-creator topics in `/profile` | ✅ | ❌ | ❌ |\n| Sponsorship per-brand endpoint | ✅ | ✅ | ❌ |\n| Content types in `/content-detail` | videos + shorts | images + reels | videos |\n| `/content-detail` cost | 3 | 2 | 2 |\n| Performance windows | R20 + all-time (up to 800) | First-page | Recent |\n| Engagement formula | (L+C+V) / subscribers | (L+C) / followers | (L+C+Shares) / followers |\n| Subtitles endpoints | ✅ | ❌ | ❌ |\n| Content-search endpoint | ✅ | ✅ | ✅ |\n| Brand-side sponsor data | ✅ | ✅ | ❌ |\n\nNiche IDs are **not interchangeable across platforms** — `id_vlog_PeopleBlogs` (YT) and `id_love_All` (IG) live in different namespaces. Niche/topic IDs follow the pattern `id_{slug}_{Category}`, so you can group by category by splitting on the last `_`.\n\n## Response shape highlights\n\nThese are the fields that aren't obvious from the endpoint name but you'll reach for constantly. All confirmed against live responses.\n\n### `/profile`\n\nShared across YT/IG/TT:\n- `subscriberGrowth: { g7, g30, g90 }` — % change in subscribers/followers over the last 7/30/90 days. Free trend signal — no need to call `performance-history` if you only want the headline number.\n- `hashtags: [{ name, contentCount }]` — hashtags the creator uses (note: `name` carries the `#` on IG/TT).\n- `niches: [\"id_vlog_PeopleBlogs\", …]` — per-creator niche IDs. To resolve the human-readable name + category + channelCount, cross-reference `list_{platform}_niches`.\n- `relatedCreators` — discovery vector. YT gives ~50–250 UC channelIds; IG gives ~50 handles. Cheap way to expand a seed list.\n- `lastPublishTime` / `lastDbUpdateTime` — Unix-ms; pair them to know how stale the snapshot is vs how recently the creator posted.\n- `country` — ISO 3166-1 alpha-3 (e.g. `\"USA\"`, `\"JPN\"`). On IG this value is derived from a content classifier rather than a self-declared field, and can occasionally be wrong for creators with multi-country presence — cross-check against `audienceLocations` and the creator's bio if accuracy matters.\n\nYT-only:\n- `topics: [\"id_challenges_Comedy\", …]` — coarse topic IDs (~470 universe). Resolve via `list_youtube_topics`.\n- `videoPrice` + `shortsPrice`: `{ cpmLow, cpmRaw, cpmHigh, priceLow, priceRaw, priceHigh }` — sponsored video / shorts CPM and dollar rate bands. **YouTube-only**; IG/TT do not return pricing in `/profile`.\n- `categoryBreakdown: [{ category, share }]` — share of recent content by YouTube native category.\n- `hasMemberOnlyContents` — boolean.\n\nIG-only:\n- `isBusinessAccount`, `isPrivateAccount` — flags worth checking before promising audience data; private accounts can't be scraped.\n- `otherLinks` — bio links array.\n\nTT-only:\n- `otherLinks` — bio link (TikTok allows one).\n\n### `/audience`\n\nIdentical shape across platforms:\n- `audienceLocations: [{ country, share }]` — top 6 countries with shares summing to roughly 1.0.\n- `audienceGender: { maleRatio, femaleRatio }` — sums to ~1.0; binary split only.\n- `audienceAvgAge` — integer.\n- `audienceAgeBreakdown: [{ ageRange, share }]` — fixed buckets `13-17 | 18-24 | 25-34 | 35-44 | 45-54 | 55-64 | 65+`. Always 7 entries; placeholder rows are all-zero (see footgun list below).\n\n### `/performance`\n\nThe R20-vs-all distinction is YT-only:\n- YT returns four sibling objects: `videosPerformanceRecent`, `videosPerformanceAll`, `shortsPerformanceRecent`, `shortsPerformanceAll`. \"Recent\" = R20 (last 20). \"All\" = up to 800. Each has `likes/comments/views` (with `avg/median/min/max/percentile25/percentile75/iqr`) and an `engagement` block.\n- IG returns `imagesPerformanceRecent` + `reelsPerformanceRecent`. No all-time window.\n- TT returns `videosPerformanceRecent`. No all-time window.\n- Every `engagement` block ends with `engagementConsistency: { cv, medianVsMean, topBottomRatio, consistencyScore, consistencyLevel }`. `consistencyScore` is 0–100; `consistencyLevel` is `\"high\"` (81–100), `\"moderate\"` (51–80), or `\"low\"` (0–50). Requires ≥6 content pieces, otherwise the consistency block is absent.\n- `ranking` block carries `global`, `country`, `language` percentile ranks for `totalSubscribers`/`totalFollowers` and `avgEngagementRate` — useful for \"is this creator above average for their country\" without separate benchmarking.\n- `recentVideosGrowth.g7/g30/g90` — engagement-rate delta over 7/30/90 days. Negative numbers mean engagement is declining.\n- `contentCountByDays: { 7d, 30d, 90d }` — how many posts in each window (use to detect dormant creators).\n\n### `/content-detail`\n\nPer-item objects across platforms:\n- `publishTime` (Unix-ms), `contentId`, `likes`, `comments`, `views` (YT/TT only — IG images have no view count), `engagementRate` (rounded to 4 decimals).\n- `hashtags: [\"#example\", …]` — already includes `#` prefix.\n\nPlatform-specific extras:\n- YT: `length` (seconds), `isMemberOnly`, content mix includes both videos and shorts.\n- IG: `mentionedCreators` — `@`-mentions in caption.\n- TT: `audioId`, `audioTitle`, `audioAuthor`, `audioAlbum`, `isDuetEnabled`, `isAd`, `length` (seconds), `shares`. The audio block is the cheapest way to find trending sounds.\n\n**Freshness rule** — content published within the last 4 days is excluded from all metric calculations (all platforms). **Pinned-post rule** — on IG/TT, a pinned post older than 90 days is excluded if it would be the oldest item in the sample.\n\n### `/sponsorship`\n\nYT and IG only — TikTok does not have a per-brand sponsorship endpoint.\n- `sponsorList: [{ brandName, brandId, brandIgIds, sponsoredVideos, sponsoredVideosPerformance }]`.\n- `brandIgIds` — the brand's IG handles. Use this to follow a brand from a sponsored creator back to the brand's own profile.\n- `sponsoredVideos` includes each sponsored content's full per-item engagement (same shape as `/content-detail`).\n- **Important caveat** — only scans the most recent ~20–30 posts and only detects brands already indexed in CreatorDB. An empty `sponsorList` is **not** proof the creator has no sponsors; it's \"we didn't find indexed sponsors in their recent posts.\"\n\n### Search (`search_{platform}` and `search_creators_nls`)\n\nStructured search response:\n- `creatorList: [{ displayName, uniqueId, channelId (YT only), avatarUrl, totalSubscribers | totalFollowers }]` — minimal projection; hydrate with `get_*_profile` for full data.\n- `totalResults` — total matching the filter set, not just the page.\n- `hasNextPage` + `nextOffset` — pagination idiom. Pass `nextOffset` as the next request's `offset` to advance.\n\nNLS response:\n- Same `creatorList` shape as structured search, plus a `platform: \"youtube\" | \"instagram\" | \"tiktok\"` field telling you which platform the AI routed to.\n- Streamed over SSE under the hood; the MCP layer collects the final `data:` event and returns it as one payload.\n- Dynamic pricing — typically 1–10 credits depending on input + output token count.\n\n### `/usage`\n\n- `records: [{ date (YYYYMMDD), requestCount, totalQuotaUsed, endpoints: { …per-endpoint counts }, platforms: { …per-platform counts }, quotaByPlatform }]`.\n- `totalQuotaUsed` can be fractional (e.g. 4.49 for an NLS call).\n- `endpoints` keys are camelCase: `getYoutubeProfile`, `getInstagramAudience`, `searchYoutube`, `getNLS`, etc. Useful for building a spend dashboard.\n\n## Common footguns\n\n- **Placeholder demographics**: when CreatorDB doesn't have real audience data, `/audience` returns the all-zero shape (`audienceGender: { maleRatio: 0, femaleRatio: 0 }`, age buckets all 0.0). Treat any row where male+female=0 as missing, not as \"no gender data.\"\n- **Empty `sponsorList` ≠ no sponsors** (see above).\n- **`relatedCreators` is unranked** — order is not significance. Don't slice the first N and call them \"top related\"; sample or rerank by your own metric.\n- **Freshness lag** — `lastDbUpdateTime` is when CreatorDB last refreshed. If it's older than ~14 days, the profile may not reflect recent breakout content.\n- **Niche channelCount drifts** — `list_*_niches` is updated daily; don't cache it longer than that or your \"creators in X niche\" count will lag reality.\n- **Search the taxonomy, don't page it** — `list_*_niches` returns one page at a time (100 by default, largest first) because the full taxonomies run to ~40,000 entries on Instagram and TikTok. Both are a single flat \"All\" category with no structure to browse, and the top 100 entries account for only ~18% of creator assignments, so paging rarely gets you anywhere. Pass `search` to resolve a phrase to niche names instead. Matching is whole-word, so `skin` will not find `Skincare`; CamelCase names are split (`StreetFood` matches `street food`) and common variants are folded (`vloggers`→`vlog`, `japanese`→`japan`). On TikTok ~44% of niches have under 100 creators — `minChannelCount` trims that tail.\n- **IG `country` is modelled, not self-declared** — YouTube and TikTok return the country a creator set on their own profile; for Instagram, CreatorDB's location model supplies it, so IG has country coverage where the profile states nothing.\n\n## Filter reference (search tools)\n\nCommon fields across all three platforms:\n- `displayName` — string, supports fuzzy\n- `uniqueId` — string, exact\n- `country` — string, ISO 3166-1 alpha-3 (e.g. `\"USA\"`, `\"JPN\"`, `\"GBR\"`)\n- `mainLanguage` — string, ISO 639-3 (e.g. `\"eng\"`, `\"jpn\"`, `\"zhs\"`)\n- `hashtags` — string (with `#` prefix on IG/TT)\n- `niches` — string (use IDs from the platform's `list_*_niches`)\n- `mainAudienceLocation` / `mainAudienceAge` / `mainAudienceGender` — string\n- `hasSponsors` — boolean\n\nPlatform-specific:\n- YouTube: `totalSubscribers` (number), `topics` (string from `list_youtube_topics`)\n- Instagram / TikTok: `totalFollowers` (number)\n\nOperators: `>`, `<`, `=` for numbers; `=`, `in` for strings; `=` for booleans. `in` takes an array of up to 100 values. `pageSize` max 100; `filters` max 10 per request.\n\n## Response envelope\n\nEvery tool returns the underlying CreatorDB V3 envelope:\n\n```json\n{\n  \"data\": { },\n  \"creditsUsed\": 2,\n  \"creditsAvailable\": 953270.5,\n  \"traceId\": \"abc-123\",\n  \"timestamp\": 1779722787120,\n  \"errorCode\": \"\",\n  \"errorDescription\": \"\",\n  \"success\": true\n}\n```\n\nOn error, the envelope carries `errorCode`, `error`, `message`, and `details`. The MCP layer flattens that into a clean error message with a `TraceId:` line for support.\n\n## Development\n\n```bash\nnpm run dev   # tsc --watch\nnpm run build # tsc once\nnpm start     # node dist/index.js\n```\n\nSource layout:\n\n```\nsrc/\n  index.ts                 # registers all tools, stdio transport\n  tools/\n    account.ts             # 1 tool\n    search.ts              # 4 tools (NLS + 3 platform creator searches)\n    youtube.ts             # 12 tools (incl. search_youtube_content)\n    instagram.ts           # 9 tools (incl. search_instagram_content)\n    tiktok.ts              # 8 tools (incl. search_tiktok_content)\n    sponsors.ts            # 8 tools (brand-side sponsor intelligence)\n  util/\n    api-client.ts          # fetch wrapper for REST + SSE\n    response.ts            # MCP result formatter (credits, errors)\n```\n\n## Getting help\n\n- **Bugs / feature requests / new endpoint coverage**: open an issue at <https://github.com/CreatorDB/creatordb-mcp-server/issues>\n- **API key / data questions**: <hello@creatordb.app>\n- **Just trying to install it on your machine?** See [SETUP.md](./SETUP.md) — a 5-minute guide aimed at end users rather than contributors.\n\n## License\n\nMIT\n",
  "bytes": 30732,
  "sha": "e51aa425867f593a3645832870f816ec73777f39d75bd619c57820dfe257f306",
  "repo_slug": "creatordb/creatordb-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_app_creatordb_mcp_e7b0c63d/readme"
}