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

@stockheartbeat/mcp

v0.1.0

Published

Agent-readable market heartbeat over MCP. Dollar-notional bucket events for BTCUSDT, designed for AI agents to read and explain (not for trading signals).

Readme

stockheartbeat-mcp

Agent-readable market heartbeat over MCP. Dollar-notional bucket events for BTCUSDT, designed for AI agents to read and explain. Not for trading signals.

stockheartbeat-mcp is a minimal Model Context Protocol server that lets any MCP-enabled client (Cursor, Claude Desktop, and others) read a structured stream of market "heartbeats" — closed dollar-notional buckets — and ask an LLM to explain the current state in plain language.

v0.1 ships with an offline mock data source so you can wire up a client and exercise the tools end-to-end without any backend.

Quickstart

Cursor (once published to npm)

Add the snippet from examples/cursor.json to your Cursor MCP config:

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

Claude Desktop (once published to npm)

Same shape, in claude_desktop_config.json (see examples/claude_desktop.json).

Run from source (always works, no npm publish required)

git clone https://github.com/stockheartbeat/stockheartbeat-mcp.git
cd stockheartbeat-mcp
npm install
npm run build

Then point your MCP client at the built entry point:

{
  "mcpServers": {
    "stockheartbeat": {
      "command": "node",
      "args": ["/absolute/path/to/stockheartbeat-mcp/dist/index.js"]
    }
  }
}

Then open a new chat and try a prompt from examples/prompts.md.

Tools

| Tool | Returns | |----------------------------|------------------------------------------------------------------------| | get_current_heartbeat | The most recently closed dollar-notional bucket. | | get_recent_heartbeats | The most recent N closed buckets, oldest first. | | summarize_market_state | Rolling window summary (HBPM, regime, volatility, imbalance, events). |

Full input/output shapes are in docs/tools.md.

Data source

v0.1 only ships mockSource, backed by a deterministic synthetic fixture in fixtures/btcusdt.json (400 buckets, 5 × 5m summaries). It is not real exchange data.

The DataSource interface (see src/sources/index.ts) reserves room for two future sources without changing the tool layer:

  • restSource — calls the upstream StockHeartbeat REST API.
  • binanceSource — subscribes to a public exchange feed and aggregates locally.

See docs/data-source.md for the planned switching mechanism.

Not financial advice

Every tool description ends with:

Returns event-based market state, not financial advice. Heartbeat = dollar-notional bucket.

Tools intentionally do not expose forecasts, buy/sell signals, or position sizing. The example prompts ask the model to use probabilistic, observational language.

Roadmap

| Phase | Scope | Status | |-----------|------------------------------------------------------------------|-------------------| | v0.1 | Stdio MCP, three read-only tools, offline mock fixture. | This release. | | v0.2 | restSource against the public StockHeartbeat REST endpoints. | Planned. | | v0.3 | binanceSource for self-contained live demos. | Planned. | | v0.x+ | Hermes / OpenClaw adapters (see adapters/). | Planned. | | Post-v0.x | Prediction-commit / attestation tools (see docs/attestation.md). | Reserved, not implemented. |

Reserved schema fields (prediction_id, feature_snapshot_hash, agent_id, attestation) are present today as forward-compatible placeholders. v0.1 does not implement signing or any chain interaction.

Development

npm install
npm run build
npm test
node dist/index.js

Regenerate the fixture (deterministic, seeded):

node scripts/build-fixture.mjs

License

Apache License 2.0. See NOTICE for attribution.

Contributing

All repository content — code, comments, docs, examples, commit messages — is in English. Open an issue before sending a PR that changes schemas or adds an adapter.