npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pipeworx/mcp-analyst-ratings

v0.1.2

Published

Analyst Ratings — today's US stock analyst upgrades, downgrades, coverage initiations and price-target changes, market-wide, plus the consensus rating and covering brokerages for any US ticker.

Readme

@pipeworx/analyst-ratings

Today's US stock analyst upgrades, downgrades, coverage initiations and price-target changes, market-wide, plus the standing consensus rating and covering-brokerage list for any US ticker.

Part of Pipeworx — an MCP gateway connecting AI agents to 1683+ live data sources.

Tools

  • analyst_upgrades_today(action?, symbol?, us_only?, limit?) — every ratings action Wall Street brokerages published this session: ticker, company, exchange, brokerage, analyst, old and new rating, old and new price target. Answers "which stocks were upgraded today", "analyst downgrades today", "today's price target changes", "what did analysts initiate coverage on". action is one of all (default), upgrade, downgrade, initiated, price_target, reiterated.
  • analyst_ratings_for_symbol(symbol) — consensus rating (Buy/Hold/Sell), the number of analysts covering the stock, and the list of brokerage firms publishing recommendations on it. Answers "what do analysts think of NVDA", "who covers Apple".

Auth

Keyless. Both upstreams are public and serve without credentials, registration or a plan.

Data sources

  • https://www.marketbeat.com/ratings/ — the combined daily ratings table (~400 rows, ~2 MB HTML). Also /ratings/upgrades/, /ratings/downgrades/, /ratings/initiations/, which carry the same table filtered to one action and are roughly 10x smaller. The pack picks the narrow page when action selects one, so the common query does not pull 2 MB.
  • https://api.nasdaq.com/api/analyst/{SYMBOL}/ratings — per-symbol consensus: meanRatingType, ratingsSummary, brokerNames[].

Traps

  • api.nasdaq.com answers 520 to a non-browser User-Agent. Measured from a deployed Cloudflare Worker, 2026-09-10: PipeworxBot/1.0 (+https://pipeworx.io) → 520 in 65 ms; Mozilla/5.0 (pipeworx.io) → 200. The 520 is Cloudflare's generic origin error, so it reads as an outage rather than as a refused request. The pack sends the Mozilla/5.0 (pipeworx.io) form the rest of the catalog already uses.
  • upgradesDowngrades[] on the Nasdaq endpoint is always empty. Checked on AAPL, AMGN, NVDA, TSLA and AAL on 2026-09-10 — every one returned [], including tickers that were actually downgraded that morning. The field is dead; do not surface it as if it carried the day's actions. analyst_upgrades_today is where that data lives.
  • Neither source has a date selector. https://www.marketbeat.com/ratings/?date=... returns 200 and silently ignores the parameter; /ratings/2026/09/09/ and /ratings/9/9/2026/ are 404. There is no per-row date in the table either. So both tools answer for the current session only, and as_of is derived — the US/Eastern date at fetch time, rolled back off a weekend. The payload says so in as_of_basis rather than presenting a date the source never gave us. Market holidays are not adjusted for.
  • The combined /ratings/ feed is not US-only. Measured 2026-09-10: 402 rows spanning NYSE 178, NASDAQ 177, TSE 14, OTCMKTS 13, LON 13, NYSEAMERICAN 3, CVE 3. us_only defaults to true and drops the Toronto/London listings, because the question being asked is about US stocks.
  • Parse off data-clean, not the cell text. Every cell carries a data-clean="old|new" attribute — AAPL|Apple, $445.00|$425.00, Buy|Hold — while the rendered text is wrapped in logos, star ratings and upsell links. The action is in data-sort-value on the second cell. A missing price target is 0, not an empty string, so it has to be mapped to null explicitly or it reads as a $0 target.
  • MarketBeat is reachable from Cloudflare Worker egress with the honest Mozilla/5.0 (compatible; PipeworxBot/1.0; +https://pipeworx.io) UA (200, 212 KB, 187 ms, measured from wrangler dev --remote on 2026-09-10). It sits behind Cloudflare itself, so this was worth checking before building.

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "analyst-ratings": {
      "url": "https://gateway.pipeworx.io/analyst-ratings/mcp"
    }
  }
}

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/analyst-ratings/mcp returns the tools in the table above plus the shared Pipeworx meta-tools — ask_pipeworx, discover_tools, search_within, remember/recall and the rest of the gateway-wide set. So the tool count you see is larger than this table: a single-pack endpoint currently lists roughly 30 shared tools alongside the pack's own. The connection's initialize response states its exact scope, and is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a scoped connection answer a question this pack does not cover — via ask_pipeworx, which routes across the whole catalog — without you adding a second MCP server. There is currently no way to mount a pack endpoint without them; if the extra schemas cost you more context than the routing is worth, connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

Both URLs reach the same gateway and the same 1683+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one.

No MCP client? Call it over HTTP

curl -X POST https://gateway.pipeworx.io/v1/tools/analyst_upgrades_today \
  -H 'Content-Type: application/json' \
  -d '{"action":"upgrade","limit":10}'

No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/analyst_upgrades_today. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.

Standalone (no gateway account)

This package also runs as a local stdio MCP server — no Pipeworx account, no gateway round-trip:

{
  "mcpServers": {
    "analyst-ratings": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-analyst-ratings"]
    }
  }
}

Or run it directly to confirm it starts:

npx -y @pipeworx/mcp-analyst-ratings

It speaks MCP over stdin/stdout and answers initialize/tools/list/tools/call for only this pack's tools — none of the shared meta-tools the gateway connection above adds. Same source, same tools, no ask_pipeworx routing.

Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:

ask_pipeworx({ question: "your question about Analyst Ratings data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT