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

@ltorrey/beforethechart-mcp

v1.1.0

Published

Licensed MCP decision-support tools for market news sentiment and position-size modeling

Readme

BeforeTheChart AI MCP Server

BeforeTheChart AI is locally run decision-support software for Claude Desktop and Cursor. It provides two MCP tools:

  • get_market_sentiment — analyzes recent Marketaux news tone for a market symbol and returns timestamps, sample size, and source links.
  • calculate_position_size — models position units from an account balance, risk percentage, entry price, and stop level.

It does not place trades, provide personalized investment advice, or promise any trading outcome.

Every sentiment call either returns timestamped provider evidence or an explicit error/insufficient-data status. The tool never substitutes sample market data.

Requirements

  • Node.js 22 or newer; use the current Node.js LTS release (Node.js 24 LTS when version 1.1.0 was prepared).
  • A valid GUMROAD_LICENSE_KEY from your BeforeTheChart AI purchase.
  • A user-owned Marketaux API token in MARKETAUX_API_TOKEN for the sentiment tool. Marketaux applies its own current limits and terms. Users are responsible for confirming that their provider plan permits their intended use; BeforeTheChart AI does not include or resell a Marketaux data license.

The position-size tool does not require a Marketaux token.

Installation

Direct launch check

macOS/Linux:

GUMROAD_LICENSE_KEY="YOUR_GUMROAD_LICENSE_KEY" \
MARKETAUX_API_TOKEN="YOUR_MARKETAUX_API_TOKEN" \
npx -y @ltorrey/[email protected]

PowerShell:

$env:GUMROAD_LICENSE_KEY="YOUR_GUMROAD_LICENSE_KEY"
$env:MARKETAUX_API_TOKEN="YOUR_MARKETAUX_API_TOKEN"
npx -y @ltorrey/[email protected]

The server communicates over stdio. A successful direct launch stays running and writes a startup confirmation to stderr. Press Ctrl+C to stop it.

Tool behavior

get_market_sentiment

Inputs:

  • ticker — a Marketaux-supported symbol such as AAPL, TSLA, BTCUSD, or CRYPTO:BTC.
  • lookback_hours — optional integer from 1 to 168; default 72.
  • article_limit — optional integer from 1 to 100; default 3 so the request works on Marketaux Free. Set this only as high as your Marketaux plan allows.

Output includes the provider symbol, average entity sentiment score, positive/neutral/negative article counts, retrieval timestamp, latest article timestamp, and cited articles. Scores describe automated news tone, not expected price movement.

calculate_position_size

Inputs:

  • portfolio_balance — positive account balance.
  • risk_percentage — positive modeled risk budget, capped at 10%.
  • entry_price — positive entry price.
  • stop_loss — positive stop level different from entry price.

Output includes the risk budget, risk per unit, calculated units, estimated notional value, and inferred long/short direction. It does not account for slippage, gaps, fees, taxes, liquidity, or broker constraints.

Environment variables

| Variable | Required | Purpose | | --- | --- | --- | | GUMROAD_LICENSE_KEY | Yes | Verified with Gumroad before the MCP server starts. | | MARKETAUX_API_TOKEN | Sentiment only | Authenticates on-demand requests to Marketaux. |

BEFORETHECHART_LICENSE_KEY is not read by the server.

Privacy summary

The MCP process runs locally and includes no product telemetry. At startup, it sends the Gumroad product ID and license key to Gumroad for validation. When get_market_sentiment is called, it sends the requested symbol, time-window filters, and your Marketaux token to Marketaux. Position-size inputs are calculated inside the local process and are not sent by this package to Gumroad or Marketaux.

Development

npm install
npm test
npm pack --dry-run

See the QA record for the release checks.