MyPivots Daily Notes

v1.0.2
com.mypivots/mypivots Checked 1 day ago Published 12 days ago

Pivot points, Crabel patterns and technicals for stocks, futures, forex, indices and crypto.

Stateless stdio Model Context Protocol (MCP) server wrapping the MyPivots Daily Notes matrix API (POST /api/v1/dailynotes/query). @mypivots/mcp connects AI assistants such as Claude Desktop and Cursor directly to MyPivots Daily Notes market data, exposing OHLCV bars, Classic/Woodie/Camarilla/DeMark/Fisher pivot points, Fibonacci retracements and extensions, Toby Crabel price-action patterns (NR4, NR7, ID, IDnr4, Stretch, etc.), moving averages (5, 10, 20, 50, 100, 200), volatility and range statistics (5d–120d), RSI(14), and MACD(12, 26, 9).

Summary extracted from the README.

@mypivots/mcp

Stateless stdio Model Context Protocol (MCP) server wrapping the MyPivots Daily Notes matrix API (POST /api/v1/dailynotes/query).

@mypivots/mcp connects AI assistants such as Claude Desktop and Cursor directly to MyPivots Daily Notes market data, exposing OHLCV bars, Classic/Woodie/Camarilla/DeMark/Fisher pivot points, Fibonacci retracements and extensions, Toby Crabel price-action patterns (NR4, NR7, ID, IDnr4, Stretch, etc.), moving averages (5, 10, 20, 50, 100, 200), volatility and range statistics (5d–120d), RSI(14), and MACD(12, 26, 9).


Where to Find Your API Token

Active MyPivots Premium subscribers receive a Bearer API token included with their membership:

  1. Sign in to MyPivots.
  2. Open your MyPivots profile → API Token (Daily Notes) (https://www.mypivots.com/users/profile#premium-membership).
  3. Click Issue API token (or Regenerate token) and copy the mp_live_... token value shown.

Partner API keys (mp_live_...) are also accepted using the same MYPIVOTS_API_TOKEN environment variable.


Configuration

Claude Desktop

Add the following entry to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "mypivots": {
      "command": "npx",
      "args": ["-y", "@mypivots/mcp"],
      "env": {
        "MYPIVOTS_API_TOKEN": "mp_live_your_token_here"
      }
    }
  }
}

Cursor

Add the following entry to .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "mypivots": {
      "command": "npx",
      "args": ["-y", "@mypivots/mcp"],
      "env": {
        "MYPIVOTS_API_TOKEN": "mp_live_your_token_here"
      }
    }
  }
}

Configuration Surface (Environment Variables)

Variable Required Default Fallback Description
MYPIVOTS_API_TOKEN Required for tool calls (none) No fallback Subscriber API token (MyPivots profile → API Token (Daily Notes)) or partner API key, sent as Authorization: Bearer <token>. If unset, the server starts and lists tools normally, and calling daily_notes_query returns a tool error naming MYPIVOTS_API_TOKEN.
MYPIVOTS_API_BASE_URL Optional https://www.mypivots.com No other fallback Base URL for the MyPivots API (<MYPIVOTS_API_BASE_URL>/api/v1/dailynotes/query).

The server is completely stateless: it performs no disk writes, keeps no sessions, and stores no state between calls.


Tool Reference

daily_notes_query

Queries POST /api/v1/dailynotes/query for a matrix of (symbol × date) Daily Notes cells.

Input Parameters

  • symbols (string[], required, non-empty): Namespaced symbol identifiers:
    • stk:<TICKER> — equities and ETFs (e.g. stk:AAPL, stk:SPY)
    • fut:<TICKER> — futures contracts (e.g. fut:ES, fut:NQZ26)
    • idx:<TICKER> — cash indices (e.g. idx:VIX, idx:SP500)
    • fx:<TICKER> — spot forex pairs and precious metals (e.g. fx:EURUSD, fx:XAUUSD)
    • crypto:<TICKER> — cryptocurrency pairs (e.g. crypto:BTCUSD, crypto:ETHUSD)
  • dates (string[], required, non-empty): ISO-8601 calendar dates in YYYY-MM-DD format (e.g. ["2026-09-23", "2026-09-24"]).

Batch Capacity Cap: At most 100 cells (symbols.length * dates.length <= 100) may be requested in a single tool call. Requests exceeding 100 cells are rejected client-side before any HTTP request is made.

Output & Error Handling

  • Success (HTTP 200): Returns a short text summary of the symbol/date/cell count along with the structured cells payload (and billing / schemaVersion metadata).
  • Payment Required (HTTP 402): Returns an MCP tool error (isError: true) surfacing the payment-required challenge details when MYPIVOTS_API_TOKEN is missing, invalid, revoked, or the linked MyPivots Premium subscription is inactive.
  • HTTP & Network Errors: Returns an MCP tool error (isError: true) carrying the HTTP status and error message without crashing the server.

Development

cd packages/mcp
npm install
npm run build
npm test
npm pack --dry-run

Dependency Notes

  • 2026-11-12 — @modelcontextprotocol/sdk (1.32.2): Added exclusively to packages/mcp/package.json as the official Model Context Protocol TypeScript SDK for implementing the stateless stdio MCP server and tool request handlers (Issue #3326). The root application's package.json dependency set is untouched.