@datadive-tools/mcp

中文文档
0.21.0发布于 2026/11/05MITTypeScriptES Module构建来源已验证近 30 天下载 2522

MCP server for DataDive — query your niches, keywords, competitors, and Rank Radar data from Claude Desktop, Claude Code, or Cursor.

原始使用文档
文档目录16 节
  1. What you can ask
  2. 1. Get a DataDive API key
  3. 2. Add it to your MCP client
  4. Claude Desktop
  5. Claude Code
  6. Cursor
  7. 3. Verify
  8. Available tools
  9. Tools that change something
  10. Configuration
  11. Troubleshooting
  12. Privacy
  13. Development
  14. Releasing
  15. Support
  16. License

@datadive-tools/mcp

An MCP server that lets Claude (or any MCP-compatible client) query your DataDive niches, keywords, competitors, and Rank Radar data using your existing API key.

Runs locally on your machine over stdio. Your API key never leaves your machine except as the x-api-key header on requests to api.datadive.tools.

What you can ask

  • "List my DataDive niches in marketplace com."
  • "What's the master keyword list for niche z515cGOFg3?"
  • "Who are the top competitors in niche X and what are their sales?"
  • "What's my ranking juice for niche X — where can I improve?"
  • "Show me my rank radars."
  • "Plot the organic ranking trend for rank radar Y from 2024-03-01 to 2024-04-01."
  • "Run a niche dive on ASIN B08N5WRWNW in the US marketplace with 5 competitors."
  • "Refresh niche X with today's data, same competitors."
  • "Re-dive niche X with 12 competitors but keep B08N5WRWNW in the set."
  • "Is my dive done yet?"
  • "Start a rank radar tracking 10 keywords for ASIN B08N5WRWNW in niche X."
  • "Which Amazon seller accounts are connected?"
  • "Search my catalog for active 'widget' products in the US."
  • "What price or content changes happened on my listings last week?"

1. Get a DataDive API key

  1. Sign in at https://2.datadive.tools.
  2. Go to Settings → API Key (/api-key).
  3. Click Generate API Key. Copy the value — you'll paste it into your MCP client config below.

Requires the Billing Manager or Owner role and the Standard plan or higher. Contact your org admin if you can't see the page.

2. Add it to your MCP client

Claude Desktop

Edit your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the datadive entry under mcpServers:

{
  "mcpServers": {
    "datadive": {
      "command": "npx",
      "args": ["-y", "@datadive-tools/mcp"],
      "env": {
        "DATADIVE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Desktop. You should see datadive in the tools menu.

Claude Code

claude mcp add datadive -- npx -y @datadive-tools/mcp
# Then add the env var via:
#   claude mcp add datadive --env DATADIVE_API_KEY=YOUR_API_KEY -- npx -y @datadive-tools/mcp

Or edit .mcp.json in your project / ~/.claude/mcp.json globally with the same JSON shape as above.

Cursor

Settings → MCP → Add new MCP server and paste the same JSON shape:

{
  "datadive": {
    "command": "npx",
    "args": ["-y", "@datadive-tools/mcp"],
    "env": { "DATADIVE_API_KEY": "YOUR_API_KEY" }
  }
}

3. Verify

Ask Claude: "List my DataDive niches."

You should see a tool call to list_niches and a JSON response with your niches, plus pagination metadata. If you don't, see Troubleshooting below.

Available tools

ToolDescription
list_nichesPaginated list of your niches. Discovery step — returns nicheIds for the niche-scoped tools below.
list_nichesPaginated list of your niches. Discovery step — returns nicheIds for the niche-scoped tools below. Filter by searchText, searchAsin, spaces or labels; each niche lists the ids of its spaces and labels.
list_spacesYour Spaces as a tree (id, name, path, children). A connected member sees only the Spaces they have rights on. Ids feed add_niche_spaces and the spaces filters.
list_labelsYour labels as a tree. Ids feed add_niche_labels and the labels filters.
list_fast_keywordsPaginated list of your organization's Fast Keywords runs (fastKeywordsId, ASIN, status, keyword count, search volume). Filter by search or marketplace.
get_fast_keywordsOne Fast Keywords result: product, keyword roots and the top 10 competitors. Poll it until status is success.
get_fast_keywords_keywordsThe keywords of a finished Fast Keywords run: search volume, organic and sponsored rank, highest volume first. Paged (up to 100).
run_fast_keywordsSpends 1 dive token. Finds a product's keywords from just its ASIN. Async — poll get_fast_keywords. Previews the cost first and requires confirm: true.
refresh_fast_keywordsSpends 1 dive token. Re-runs a Fast Keywords result; allowed once every 24 hours. Requires confirm: true.
get_niche_keywordsMaster keyword list for a niche: search volume, relevancy, competitor ASIN ranks, suggested bid.
get_niche_outlier_keywordsA niche's Outliers, paginated: high search volume keywords only a few competitors rank for.
get_niche_residue_keywordsA niche's Residue, paginated: keywords in neither the Master Keyword List nor the Outliers.
get_niche_rootsKeyword lexical roots for a niche — high-impact words with frequency and broad search volume.
get_niche_competitorsCompetitor ASINs, titles, BSR, category and niche statistics (sales, revenue, ratings, opportunity score).
get_ranking_juiceDataDive proprietary ranking-juice metric per competitor (current vs optimized listing).
list_rank_radarsPaginated list of rank radars. Filter by nicheId, searchText, spaces, labels (matched through the niche) or status (ACTIVE by default, plus PAUSED, ARCHIVED, ALL).
get_rank_radar_dataHistorical keyword rankings for a rank radar within a startDate/endDate range (max 90 days). Returns every active keyword by default; pass currentPage/pageSize (up to 100) to read one page at a time.
get_rank_radar_sqp_dataAmazon Search Query Performance per Rank Radar keyword: search volume, impressions, clicks, cart adds, purchases — market total vs this ASIN family. Same date range and paging as get_rank_radar_data.
get_rank_radar_ppc_dataSponsored Products metrics per Rank Radar keyword: sponsored rank, spend, sales, ACOS, CPC, match types; optional per-campaign breakdown. Same date range and paging as get_rank_radar_data.
create_niche_diveSpends dive tokens. Starts new niche research from a seed ASIN. Async — returns a diveId to poll with get_dive_status. Pass fastKeywordsRequestId (from run_fast_keywords) to link it to a Fast Keywords run. Requires confirm: true.
create_niche_dive_from_competitors_listSpends dive tokens. Starts niche research from your own list of 2–200 competitor ASINs, with no automatic discovery. Async — returns a diveId to poll with get_dive_status. Requires confirm: true.
redive_nicheSpends dive tokens. Refreshes an existing niche with current data — either the same competitors or a newly discovered set. Async — returns a diveId to poll with get_dive_status. Requires confirm: true.
add_niche_keywordsAdds keywords to a niche's Master Keyword List (1–100 per call). Free on a niche dived in the last 24 hours. On an older niche it re-dives the niche and spends dive tokens — then it asks for confirm: true first.
remove_niche_keywordsTakes keywords back out of a niche's Master Keyword List: hand-added ones are deleted, ones from Outliers/Residue go back there, dive-found ones stay. Free.
list_keyword_exclusionsThe keywords a niche hides from its Master Keyword List: exact entries with their search volume, phrase entries with how many keywords and how much search volume they hide.
add_keyword_exclusionsHides keywords from a niche's Master Keyword List — exact (one keyword) or phrase (every keyword containing it), 1–100 entries per call. Free; undone by remove_keyword_exclusions.
remove_keyword_exclusionsRemoves exact or phrase exclusions so the keywords they hid show again. Free.
add_niche_spaces / remove_niche_spacesPuts a niche in, or takes it out of, 1–100 Spaces (spaceIds from list_spaces). Free, no confirm. Needs Manage access to the niche, as in the web app; a Space you only have view rights on is refused. One unknown or refused id fails the whole call and nothing changes.
add_niche_labels / remove_niche_labelsSame for labels (labelIds from list_labels). Needs Manage access to the niche.
get_dive_statusPoll a dive started by create_niche_dive or redive_niche: in_progress, success (carries the nicheId), or error.
create_rank_radarSpends Search Term tokens. Starts tracking keyword rankings for an ASIN in a niche. Returns a rankRadarId. Requires confirm: true.
add_rank_radar_search_termsStarts tracking extra keywords on an existing rank radar. Takes one Daily Tracked Keywords slot per new keyword; reversible with pause_rank_radar_search_terms.
pause_rank_radar_search_termsPauses individual keywords of a rank radar, keeping their history and freeing their tracking slots. Takes keyword ids from get_rank_radar_data.
resume_rank_radar_search_termsRestarts tracking on paused keywords of a rank radar. Takes back one tracking slot each.
pause_rank_radarPauses a whole rank radar (what the API calls archiving — listed under status: PAUSED, not ARCHIVED). Tracking stops, the history is kept, and the tracking slots are freed. Reversible with resume_rank_radar.
resume_rank_radarReactivates a paused rank radar, restoring as many keywords as the remaining quota allows (most relevant first).
delete_rank_radarDestroys ranking history. Deletes a rank radar permanently (listed under status: ARCHIVED) and frees its tracking slots. Requires confirm: true — prefer pause_rank_radar if the data may be wanted later.
delete_nicheDestroys niche data. Deletes a niche with its keywords, competitors and dive history; spent dive tokens are not refunded. Blocked while a rank radar uses the niche. Requires confirm: true.
generate_listing_copySpends an AI Copywriter prompt. Drafts an optimised title, bullets and description from a niche's keyword research. Nothing is published to Amazon. Async — returns a generationId. Requires confirm: true.
get_listing_copy_generation_statusPoll a draft started by generate_listing_copy: generating, complete (carries the generated copy), or failed. Free to poll.
list_seller_profilesPaginated list of connected Amazon seller accounts. Discovery step — returns the sellerId + marketplace the seller-scoped tools below (and the alert tools) need.
get_seller_catalogPaginated catalog of a seller's own ASINs. Filter by search, brand, and status (Active by default).
get_seller_listing_changesPaginated price/content/image changes on a seller's listings. Filter by types, asin, brand, search, and a date range; optionally include ranking/conversion correlation.
list_ppc_campaignsSponsored Products campaigns of a seller account with window totals and a per-placement breakdown. Filter by asin / parentAsin, state, search; sort by any metric. Window up to 90 days (default 30).
get_asin_inventory_distributionInventory metrics for an ASIN (stock, days of stock, low-inventory state, LILF and LTSF fees, aged units) and its per-fulfillment-center sellable inventory. Requires sellerId from list_seller_profiles or your Connections page.
list_indexing_issue_alertsPaginated list of indexing-issue alerts — ASINs no longer indexed for their tracked keywords. Filter by sellerId, marketplace, status, or updatedSince.
list_blind_spend_alertsPaginated list of blind-spend alerts — ad spend on search terms with little or no sales, with per-term spend/clicks/CVR. Same filters as above.
get_quotaCurrent quota usage and capacity per billable feature, plus the next refresh date. No arguments.
list_usagePaginated billable usage logs (token-consumption events). Filter by type, search (user), and startDate/endDate.

All data is scoped to the organization that owns the API key. Most tools are read-only. The tools that change something are marked above; the ones that cannot be undone also require an explicit confirm: true — see Tools that change something.

Tools that change something

Six tools cannot be undone, so they require an explicit confirm: true argument. Called without it, they change nothing and return a note asking the assistant to confirm the cost with you first:

  • create_niche_dive, redive_niche — spend dive tokens (scales with numberOfCompetitors).
  • create_rank_radar — spends Search Term tokens (scales with numberOfKeywords).
  • generate_listing_copy — spends one AI Copywriter prompt per call.
  • delete_niche, delete_rank_radar — destroy data permanently.

Check your remaining balance any time with get_quota.

create_rank_radar uses that first, unconfirmed call to preview the creation against the API, so the note it comes back with can tell you something specific rather than only the token cost — for instance that the product family you asked for is already tracked by another of your Rank Radars, which would spend Tracked Search Terms on it twice. The preview creates nothing and spends nothing, and a warning never blocks the creation: two Rank Radars on one family is how you track two different sets of search terms and keep separate statistics.

The other write tools — pause_rank_radar, resume_rank_radar and the three *_rank_radar_search_terms tools — need no confirmation. They only move Daily Tracked Keywords capacity, which is freed again when you pause, and each is undone by its counterpart.

add_niche_keywords asks for confirm: true only when it would spend: on a niche dived in the last 24 hours its first call adds the keywords for free, while on an older niche that call changes nothing and returns the Dive token cost of the re-dive the add triggers. remove_niche_keywords and the keyword exclusion tools are free and need no confirmation.

To skip the per-call confirmation (e.g. in an automated setup), set DATADIVE_AUTO_CONFIRM_WRITES=true in your client config — then all six run without confirm, deletes included.

None of the three is safe to retry — each call spends tokens again and creates a separate dive / re-dive / Rank Radar, even with identical arguments. If a call errors or times out, check get_dive_status / list_niches / list_rank_radars for what already exists before calling again.

Dives are asynchronous. create_niche_dive returns a diveId and an estimated completion time immediately; poll get_dive_status with that diveId until it reports success, which carries the new nicheId you then feed to list_niches, get_niche_keywords, and the other niche tools.

redive_niche refreshes a niche you already have rather than creating another one, and it keeps the same nicheId — so rank radars and reports built on that niche follow the refreshed data. It takes a mode:

  • same_competitors — re-dive the niche's current competitor set. Nothing else to supply; use it purely to pull in current sales, price and keyword data.
  • discover — search for a fresh competitor set of numberOfCompetitors ASINs. Steer it with heroAsin (the seed to build around; defaults to the niche's highest-selling competitor, preferring one of your own ASINs), lockedAsins (kept no matter what discovery finds) and excludedAsins (never selected).

⚠️ For create_niche_dive, marketplace uses full Amazon domain suffixes (com, co.uk, com.mx, co.jp, …) — e.g. the UK marketplace is co.uk, not uk.

Configuration

Env varRequiredDefaultNotes
DATADIVE_API_KEYyes—Generate at https://2.datadive.tools/api-key
DATADIVE_API_BASE_URLnohttps://api.datadive.toolsOverride for staging
DATADIVE_AUTO_CONFIRM_WRITESnofalseSet truthy to let every confirm: true tool run without it — dives, rank radar creation, listing copy and the two deletes.

Troubleshooting

If a tool call returns an error message, it'll be one of these — each maps to a specific HTTP status from the DataDive API.

Message starts with…What to do
Authentication failed: your DATADIVE_API_KEY is invalid or expiredThe key is wrong, deleted, or expired. Generate a new one at https://2.datadive.tools/api-key.
Subscription is inactive or pausedResume billing at https://2.datadive.tools — the API key is valid but the subscription isn't active.
Quota exceeded / … quota exceededThe subscription's quota for that billable feature (Dive tokens, Rank Radar tracked keywords, AI Copywriter prompts, …) is used up. The message names the feature, the usage, the next refresh date when there is one, and links to the subscription overview page where it can be raised. Don't retry until it has been.
ForbiddenThe key is valid but doesn't have access to that resource. Usually a niche/rank-radar that belongs to a different org.
Rate limit exceededWait a few seconds and retry.
Bad requestCheck the parameters — the message echoes the server's validation error (e.g., pageSize must not exceed 50).
DataDive API error (5xx)Transient backend issue. Try again; if it persists, contact support.
Network error reaching …Your machine can't reach api.datadive.tools — check VPN / firewall / DNS.

If the server itself fails to start, look in your MCP client's log output:

  • DATADIVE_API_KEY environment variable is required — the env var isn't being passed through to the binary. Confirm your client config has it under env (not args), and that you've restarted the client after editing.

Privacy

  • The MCP server runs locally on your machine. It is a thin shim — every tool call becomes a single HTTPS request from your machine to api.datadive.tools with your API key as the x-api-key header.
  • Your API key is stored only in your MCP client's config file (which you control). It is never sent anywhere else.
  • The server logs nothing on its own. Standard backend access logs at DataDive record per-request metadata (organization, route, status, latency) the same way any direct API call would.

Development

npm install
npm run build       # tsup -> dist/index.js (with shebang)
npm test            # vitest run
npm run typecheck   # tsc --noEmit
npm run lint        # eslint

Test the binary end-to-end with the MCP Inspector:

DATADIVE_API_KEY=YOUR_API_KEY npx @modelcontextprotocol/inspector dist/index.js

Releasing

The repo uses Changesets:

npx changeset             # add a changeset describing the change (patch/minor/major)
git commit -am "fix: ..."
git push

A "Version Packages" PR opens automatically. Merging it bumps the version, updates CHANGELOG.md, and publishes to npm with provenance.

Support

License

MIT — see LICENSE.

版本与发布记录

@datadive-tools/mcp 共发布 23 个版本,首次发布于 2026/05/06;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.21.0latest2026/11/056 天前
0.20.12026/10/2616 天前
0.20.02026/10/2616 天前
0.19.02026/10/1626 天前
0.18.02026/10/1527 天前
0.17.02026/10/1329 天前

关于 @datadive-tools/mcp 的常见问题

@datadive-tools/mcp 是什么?

MCP server for DataDive — query your niches, keywords, competitors, and Rank Radar data from Claude Desktop, Claude Code, or Cursor.

如何安装 @datadive-tools/mcp?

在项目目录运行 npm install @datadive-tools/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 datadive-mcp,可以用 npx datadive-mcp 直接运行。

@datadive-tools/mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@datadive-tools/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@datadive-tools/mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@datadive-tools/mcp 可以商用吗?

@datadive-tools/mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@datadive-tools/mcp 的下载量有多少?

根据 npm 官方下载统计,@datadive-tools/mcp 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,522 次,日均约 84 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@datadive-tools/mcp 还在维护吗?

最新版本 0.21.0 发布于 2026/11/05(6 天前);至今共发布 23 个版本,其中过去 12 个月发布了 23 个;首次发布于 2026/05/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。