@ltorrey/beforethechart-mcp
v1.1.0
Published
Licensed MCP decision-support tools for market news sentiment and position-size modeling
Maintainers
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_KEYfrom your BeforeTheChart AI purchase. - A user-owned Marketaux API token in
MARKETAUX_API_TOKENfor 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 asAAPL,TSLA,BTCUSD, orCRYPTO: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-runSee the QA record for the release checks.
