Npm Trends API MCP Server

npm package download trends and adoption growth over time. Free key at trendsapi.ai

Local serverstdioPython

What is the Npm Trends API MCP server?

npm package download trends and adoption growth over time. Free key at trendsapi.ai. The npm trends api mcp server wraps that behind the Model Context Protocol, so an assistant can use it rather than through you.

What it actually does

res = requests.post( "https://api.trendsapi.ai/api", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={"mode": "get_growth", "source": "npm", "keyword": "zod", "percent_growth": ["3M", "12M"]}, ) print(res.json()) ```

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Configuration

You will need 2 environment variables: AUTH_HEADER, YOUR_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the npm trends api mcp server does with a few real requests.

When to reach for it

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. It is maintained by ai.trendsapi; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

How to install the Npm Trends API MCP server

{
  "mcpServers": {
    "trendsapi": {
      "url": "https://api.trendsapi.ai/mcp",
      "transport": "http",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
AUTH_HEADERConfiguration value read at startup.Optional
YOUR_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

It connects Npm Trends API to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Npm Trends API directly.