Skip to main content
MCP server CX Codex

npm Trends API — Claude Code MCP server: what it does, how to install

npm Trends API supplies AI coding assistants with 0-100 normalized download history and growth rates for npm packages. Helps evaluate package momentum directly in your IDE.

MIT updated 2026-08-18

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http npm-trends-api https://npm.api.trendsapi.ai/mcp
Open on GitHub

What npm Trends API does

This server connects coding agents to package adoption metrics using the endpoint https://npm.api.trendsapi.ai/mcp. It exposes tools to fetch time series points and calculate growth across intervals such as 7D, 30D, 12M, or custom date baselines.

Requests require a free key set in TRENDSAPI_KEY, obtained from trendsapi.ai. Package names must match exactly and remain case-sensitive, including scoped names like @tanstack/react-query. Each call inspects a single library at a time.

Values represent a normalized 0-100 index rather than raw integers. When your task requires exact download counts, query api.npmjs.org/downloads instead.

What it helps with

  • check package download trends over the past 12 months
  • measure adoption growth before adopting a new dependency
  • spot declining interest in legacy JavaScript libraries
  • inspect normalized npm popularity indexes directly inside the agent

Example prompts for the agent

  • Check the 12M download growth rate for the vite package.
  • Pull the normalized popularity time series for @tanstack/react-query.
  • Compare 3M and 1Y adoption trends between zustand and redux.

How to install npm Trends API

Platform CLI: remote server

claude mcp add --transport http npm-trends-api https://npm.api.trendsapi.ai/mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about npm Trends API

How to install npm Trends API in Claude Code?

Run claude mcp add --transport http npm-trends-api https://npm.api.trendsapi.ai/mcp. You must also export your access key via the TRENDSAPI_KEY environment variable.

What does npm Trends API provide?

It delivers normalized 0-100 download interest series and percentage growth calculations for npm packages. Tools evaluate historical momentum across standard periods like 30D or 12M.

Does the server return exact download counts?

No, the API provides an indexed 0 to 100 score of interest. For absolute integer counts, use api.npmjs.org/downloads directly.

Similar MCP servers

All MCP servers for Frontend and UI →

Project sponsors

Companies that keep this analytics open