# npm Trends API

> npm Trends API is a freemium MCP server for analytics and data. Weekly npm package download trends and growth rates, as an API and MCP server. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI
- **Website:** https://trendsapi.ai/trends/npm-trends
- **Repository:** https://github.com/trendsapi-ai/npm-trends-api
- **MCP Registry name:** ai.trendsapi/npm
- **Categories:** analytics and data, developer tools
- **Listing updated:** 2026-11-14

## About

Raw npm download counts are hard to compare, because popular packages can have a hundred times the traffic of a niche one. This server rescales a package's weekly downloads to a 0-100 curve and works out growth over 3-month, 6-month, 12-month and 5-year windows, so an assistant can say whether a library is still climbing or has levelled off.

It is one of several per-source endpoints from Trends API, served at its own npm address over streamable HTTP. A Python client (`trendsapi-npm`) and a plain REST call, `POST https://api.trendsapi.ai/api` with a bearer key, return the same data. Package names are exact and case-sensitive, and scoped packages such as `@tanstack/react-query` work.

The service has a free tier of 100 requests a month, and the response shape matches the vendor's other sources (Google, TikTok and more), which makes cross-source comparison straightforward.

## Features

- **Normalized download curve:** Weekly downloads for any package rescaled to a 0-100 series.
- **Built-in growth windows:** 3M, 6M, 12M and 5Y growth plus presets like YTD and custom date pairs.
- **Scoped package support:** Names such as @tanstack/react-query are passed in full.
- **Python and REST clients:** The same data is available from a pip package or a single POST endpoint.
- **Shared response shape:** Output matches the vendor's other trend sources for easy comparison.

## Good for

- Check whether a library is still growing before adopting it
- Back a technology choice with a download curve
- Track a package's adoption after a launch or conference talk
- Compare momentum across competing frameworks

## Install

### Claude Code (Terminal)

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

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://npm.api.trendsapi.ai/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "npm": {
      "url": "https://npm.api.trendsapi.ai/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "npm": {
      "type": "http",
      "url": "https://npm.api.trendsapi.ai/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "npm": {
      "serverUrl": "https://npm.api.trendsapi.ai/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "npm": {
      "type": "http",
      "url": "https://npm.api.trendsapi.ai/mcp"
    }
  }
}
```

## Tools

- `get_time_series`: Weekly download series for an exact package name, normalized 0-100.
- `get_growth`: Growth percentages over chosen windows for a package.

## FAQ

### Does it handle scoped packages?

Yes. Pass the full name including the scope, for example @tanstack/react-query.

### How can two packages be compared?

Make one call per package and compare the normalized values; the 0-100 scale makes that meaningful even when raw counts differ widely.

### How fresh is the data?

Weekly series update as npm publishes new counts, and each response carries its own timestamp.

### What does it cost to try?

The free tier allows 100 requests a month with no credit card.

### Is npm Trends API free?

npm Trends API has a free plan, with paid plans for more usage or features.

### How do I add npm Trends API to Claude Code?

Run this command in your terminal: claude mcp add --transport http npm https://npm.api.trendsapi.ai/mcp

### What are the best alternatives to npm Trends API?

The closest alternatives to npm Trends API are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/npm-trends-api
