Skip to main content

Hybrid Recursive Ladder MCP

语言 / Languages: English · 简体中文

Aggregate long time-series ranges with a handful of source requests instead of one per bucket.

An MCP server (stdio) for the Hybrid Recursive Ladder query planner. It splits a time range into complete calendar units — month, day, hour, minute — and reads each level once, so a ten-month range costs about five to seven source requests instead of 423,049 per-minute buckets.

Works with no configuration: the server exposes deterministic demo data, so every tool answers immediately. Point it at ThingsBoard or PostgreSQL when you have real data.

Install

uvx hybrid-recursive-ladder-mcp

or, with pip:

pip install hybrid-recursive-ladder-mcp
hybrid-recursive-ladder-mcp

Client configuration

{
  "mcpServers": {
    "hybrid-recursive-ladder": {
      "command": "uvx",
      "args": ["hybrid-recursive-ladder-mcp"]
    }
  }
}

Tools

Tool Reads What it does
ladder_meta local Version, ladder levels, active source and store, demo range.
ladder_decompose local Split [start, end) into ordered, contiguous ladder segments. No I/O.
ladder_sum source Sum a range, optionally materializing raw points into the local store first.
ladder_verify source Compare the local copy against the source and report or repair drift.

All four are annotated: ladder_meta and ladder_decompose are local and side-effect free, ladder_sum can write through materialize=True, and ladder_verify reaches the source.

Configuration

Set these as environment variables in the client config. All are optional.

Variable Meaning
HL_SOURCE demo (default), thingsboard, or postgres.
HL_TB_URL, HL_TB_USERNAME, HL_TB_PASSWORD ThingsBoard endpoint and credentials.
HL_TB_TOKEN ThingsBoard access token, instead of username/password.
HL_PG_DSN PostgreSQL DSN for the local store.
HL_TIMEZONE IANA zone used for calendar boundaries (default Asia/Shanghai).
HL_FINEST Finest ladder level: minute, hour, day, or month.

When not to use it

The tool computes sums only in this version. It does not do averages (needs weighted sum plus count), meter deltas, or non-additive metrics, and it needs a source that supports interval aggregation.

Metadata

Release files for hybrid-recursive-ladder-mcp 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hybrid-recursive-ladder-mcp 0.0.7
File Size Uploaded Provenance Actions
hybrid_recursive_ladder_mcp-0.0.7.tar.gz 4.1 kB Without provenance Details for hybrid_recursive_ladder_mcp-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hybrid-recursive-ladder-mcp 0.0.7
File Interpreter ABI Platform Actions
hybrid_recursive_ladder_mcp-0.0.7-py3-none-any.whl Python 3 none any Details for hybrid_recursive_ladder_mcp-0.0.7-py3-none-any.whl

Total release size: 7.5 kB

Release files / hybrid_recursive_ladder_mcp-0.0.7.tar.gz

Download URL hybrid_recursive_ladder_mcp-0.0.7.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0a53e2b0bd12a655d9fe813eb267cdad41e5f3e5bccd506ed23eaceec2e95969
BLAKE2b-256 checksum
How to use checksums
0ce7e8cd426b5bb53ade428d17f850f00d2d114d55d61c0730206ebc711a0dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / hybrid_recursive_ladder_mcp-0.0.7-py3-none-any.whl

Download URL hybrid_recursive_ladder_mcp-0.0.7-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4b6308fc1cce384ea28140581334632bb0860c4b1ae3b979d5ada37da8fe81a
BLAKE2b-256 checksum
How to use checksums
f97bf927eb6f7ea08e2f91b4b5a6e5e878d4015483b985d20064e7e8d3c933ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for hybrid-recursive-ladder-mcp 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page