ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Hybrid Recursive Ladder

โดย MagicSquarekeyรุ่น 0.0.6i★ 1iรันบนเครื่อง
ชื่อใน registryio.github.MagicSquarekey/hybrid-recursive-ladder

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

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

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: อื่น ๆ
  • ต้องใส่ค่าเหล่านี้: HL_TB_PASSWORD, HL_TB_TOKEN, HL_PG_DSN

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 2 จาก 2 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: HL_SOURCE, HL_TB_URL, HL_TB_USERNAME, HL_TB_PASSWORD, HL_TB_TOKEN, HL_PG_DSN, HL_TIMEZONE, HL_FINEST

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • PyPIติดตั้ง uv ของ Python (มีคำสั่ง uvx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "hybrid-recursive-ladder": {
      "command": "uvx",
      "args": [
        "hybrid-recursive-ladder-mcp"
      ],
      "env": {
        "HL_SOURCE": "ใส่ค่าของคุณ",
        "HL_TB_URL": "ใส่ค่าของคุณ",
        "HL_TB_USERNAME": "ใส่ค่าของคุณ",
        "HL_TB_PASSWORD": "ใส่ค่าของคุณ",
        "HL_TB_TOKEN": "ใส่ค่าของคุณ",
        "HL_PG_DSN": "ใส่ค่าของคุณ",
        "HL_TIMEZONE": "ใส่ค่าของคุณ",
        "HL_FINEST": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add hybrid-recursive-ladder --env HL_SOURCE='ใส่ค่าของคุณ' --env HL_TB_URL='ใส่ค่าของคุณ' --env HL_TB_USERNAME='ใส่ค่าของคุณ' --env HL_TB_PASSWORD='ใส่ค่าของคุณ' --env HL_TB_TOKEN='ใส่ค่าของคุณ' --env HL_PG_DSN='ใส่ค่าของคุณ' --env HL_TIMEZONE='ใส่ค่าของคุณ' --env HL_FINEST='ใส่ค่าของคุณ' -- uvx hybrid-recursive-ladder-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "hybrid-recursive-ladder": {
      "command": "uvx",
      "args": [
        "hybrid-recursive-ladder-mcp"
      ],
      "env": {
        "HL_SOURCE": "ใส่ค่าของคุณ",
        "HL_TB_URL": "ใส่ค่าของคุณ",
        "HL_TB_USERNAME": "ใส่ค่าของคุณ",
        "HL_TB_PASSWORD": "ใส่ค่าของคุณ",
        "HL_TB_TOKEN": "ใส่ค่าของคุณ",
        "HL_PG_DSN": "ใส่ค่าของคุณ",
        "HL_TIMEZONE": "ใส่ค่าของคุณ",
        "HL_FINEST": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "hybrid-recursive-ladder": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "hybrid-recursive-ladder-mcp"
      ],
      "env": {
        "HL_SOURCE": "ใส่ค่าของคุณ",
        "HL_TB_URL": "ใส่ค่าของคุณ",
        "HL_TB_USERNAME": "ใส่ค่าของคุณ",
        "HL_TB_PASSWORD": "ใส่ค่าของคุณ",
        "HL_TB_TOKEN": "ใส่ค่าของคุณ",
        "HL_PG_DSN": "ใส่ค่าของคุณ",
        "HL_TIMEZONE": "ใส่ค่าของคุณ",
        "HL_FINEST": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • HL_SOURCE env
    Source backend: demo (default), thingsboard, or postgres.
  • HL_TB_URL env
    ThingsBoard base URL, for example http://localhost:9090.
  • HL_TB_USERNAME env
    ThingsBoard username; pair with HL_TB_PASSWORD.
  • HL_TB_PASSWORD ความลับ env
    ThingsBoard password.
  • HL_TB_TOKEN ความลับ env
    ThingsBoard access token, used instead of username and password.
  • HL_PG_DSN ความลับ env
    PostgreSQL DSN for the local materialized store.
  • HL_TIMEZONE env
    IANA timezone for calendar boundaries; default Asia/Shanghai.
  • HL_FINEST env
    Finest ladder level: minute, hour, day, or month.

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 11 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub MagicSquarekey ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 14 วันที่ผ่านมา

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 82% ของอีก 19103 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 73% ของอีก 19103 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 19103 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Hybrid Recursive Ladder ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 2 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: HL_TB_PASSWORD, HL_TB_TOKEN, HL_PG_DSN

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 14 วันที่ผ่านมา และส่งรุ่นล่าสุด (0.0.6) เข้า registry 14 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี World Monitor, Claude Flow, Tldraw

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 102 tools.

โดย koala73ใช้กันมาก★ 90.4Kอัปเดต 6 วันที่ผ่านมา

รันบนคลาวด์✓ worldmonitor.app

Claude Flow

AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.

โดย ruvnetใช้กันมาก↓ 13.5K/สัปดาห์★ 81.4Kอัปเดต 14 เดือนที่ผ่านมา

รันบนเครื่อง

Tldraw

Draw and visually collaborate with your agents on tldraw's canvas.

โดย tldrawใช้กันมาก★ 51.4Kอัปเดต 8 เดือนที่ผ่านมา

รันบนคลาวด์

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Hybrid Recursive Ladder

Query planning for bucket-limited time-series APIs. Aggregate long ranges with a handful of source requests instead of thousands of per-bucket queries.

Languages: English · 简体中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português · Русский · العربية · हिन्दी

Algorithm spec · API reference · Benchmarks · Related work · Public disclosure · Docs index

Same output granularity. The per-bucket client pays one round trip per row; the ladder fetches each level once.

Why this exists

Most time-series APIs charge you per request, per bucket, or per round trip. A naive "one query per statistical bucket" client turns a two-day minute-level range into 2,880 buckets, each needing up to four HTTP calls. In a production ThingsBoard deployment, 1,140 buckets took 139 seconds over a VPN.

The bottleneck is not arithmetic. It is the number of network round trips.

Three obvious fixes all sacrifice something:

FixWhat it costs
Ask for one coarse intervalLoses the per-minute or per-day rows the dashboard needs
Pre-aggregate (continuous aggregates, rollup tables)Requires write access to, or control of, the source
PaginateSame number of pages, plus more boundary cases

The ladder takes a different route: keep the output granularity, but stop fetching one request per output unit. A source that can return an interval aggregate over a contiguous run can fill many output segments in one request.

How it works

  1. Decompose [start, end) into complete calendar units, from month down to the configured finest level. Emit only complete units; push the partial left and right edges to the next finer level.
  2. Group adjacent segments only when they need the same fetch level. Hours and minutes can share a minute-level run; months and days cannot.
  3. Fetch each maximal contiguous run once at the next finer aggregation: months as days, days as hours, hours as minutes, minutes as minutes.
  4. Fold the returned buckets into the output segments locally.

For 2026-01-01 00:00:00 → 2026-10-21 18:49:59, that is 97 segments instead of 423,049 minute buckets. A typical 10-month query needs roughly 5–7 aggregation requests.

Rules
  • Left-closed, right-open — [start, end).
  • Complete units only — a month/day/hour/minute is emitted at its level only when it lies entirely inside the range.
  • Recursive edges — a partial edge is pushed to the next finer level; a sub-minute remainder becomes its own tail segment.
  • Local calendar — boundaries use the configured IANA timezone (default Asia/Shanghai).
  • Tiling — segments are ordered, contiguous, non-overlapping, and their union is exactly [start, end).
Request bound

For a fetch run of duration T at bucket size Δ, with K buckets per request:

requests(run) = ceil(T / (K * Δ))

Fine-grained work is confined to the two partial units at the edges. For the default hierarchy, N <= N_month + 639; recursion depth is at most 4. The request count is O(N_month / K + 1) — it grows with the coarse units, not with the number of minute buckets. The formal propositions are in docs/algorithm.md §5.3–5.5 (中文).

Quick start

pip install hybrid-recursive-ladder

hybrid-ladder demo hybrid-ladder decompose --start 2026-01-01 --end 2026-10-21T18:49:59

The demo builds synthetic 15-minute data, decomposes a 120-day range, materializes half of it, runs a local-first mixed query, and verifies that the totals match. No database, no network, no configuration.

Optional extras:

pip install "hybrid-recursive-ladder[thingsboard]"   # ThingsBoard source (httpx)

pip install "hybrid-recursive-ladder[postgres]" # local store (psycopg 3) pip install "hybrid-recursive-ladder[api]" # FastAPI HTTP API pip install "hybrid-recursive-ladder[mcp]" # MCP server pip install "hybrid-recursive-ladder[all]" # everything

The core decomposition has zero third-party dependencies (only tzdata for reliable IANA time zones on Windows).

Usage

FormEntry pointBest for
Python libraryfrom hybrid_ladder import ...embedding in a service or pipeline
CLIhybrid-ladder ...ad-hoc inspection, scripts, cron
HTTP APIhybrid-ladder servelanguage-agnostic integration, async tasks
MCP serverhybrid-ladder mcpAI agents and MCP-compatible clients
Agent skillskills/hybrid-recursive-ladder/Claude/ZCode-style skill installation
Python library
from hybrid_ladder import LadderEngine, MemorySource

source = MemorySource() source.add("device-1", "energy", [(ts, 1.0) for ts in range(0, 86_400_000, 60_000)])

engine = LadderEngine(source) result = engine.sum([("device-1", "energy")], 0, 86_400_000)

print(result.grand_total) # 1440.0 print(result.rows[0].segments[0].label) # 1970-01-01 00:00 print(result.rows[0].empty_count) # 0

The engine depends on two small protocols: TimeSeriesSource (interval_agg, raw_series) and PointStore (sum_ranges, series, coverage, upsert_points, ...). Built-ins: MemorySource/MemoryStore, ThingsBoardSource, PostgresStore. See docs/architecture.md (中文) to add another source.

CLI
# Demo data

hybrid-ladder sum --series demo-chiller-1:energy --start 2026-01-01 --end 2026-02-01

ThingsBoard, local-first

export HL_TB_URL=https://tb.example.com export HL_TB_TOKEN=... export HL_PG_DSN='postgresql://user:pass@127.0.0.1:5432/telemetry' hybrid-ladder sum --source thingsboard --series : \ --start 2026-01-01 --end 2026-10-21T18:49:59 \ --mode mixed --materialize

Verify and repair the local copy

hybrid-ladder verify --source thingsboard --series : --start ... --end ... hybrid-ladder repair --source thingsboard --series : --start ... --end ...

HTTP API
hybrid-ladder serve --port 8000

OpenAPI docs: http://127.0.0.1:8000/docs

curl "http://127.0.0.1:8000/v1/decompose?start_ts=1767196800000&end_ts=1792512599000"

curl -X POST http://127.0.0.1:8000/v1/ladder/sum \ -H 'content-type: application/json' \ -d '{"series":[{"entity":"demo-chiller-1","key":"energy"}], "start_ts":1767196800000,"end_ts":1777564800000,"mode":"tb"}'

→ {"code":0,"data":{"task_id":"...","async":true}}

curl http://127.0.0.1:8000/v1/tasks/

The API uses {"code":0,"data":...} on success and {"code":1,"detail":...} on error. Every endpoint is in docs/api.md (中文).

MCP server
pip install "hybrid-recursive-ladder[mcp]"

hybrid-ladder mcp

Tools: ladder_meta, ladder_decompose, ladder_sum, ladder_verify. With no configuration it serves demo data, so an agent can try it immediately. Example client configuration:

{

"mcpServers": { "hybrid-ladder": { "command": "hybrid-ladder", "args": ["mcp"], "env": { "HL_SOURCE": "thingsboard", "HL_TB_URL": "https://tb.example.com", "HL_TB_TOKEN": "...", "HL_PG_DSN": "postgresql://..." } } } }

Agent skill

Copy skills/hybrid-recursive-ladder/ into your agent's skills directory (for example ~/.claude/skills/ or ~/.zcode/skills/). The skill teaches the agent when to use the ladder, how to call the CLI/API, and how to interpret null vs 0.0 and source.

Local-first mode

When you have a local point store, the same segments are split against materialized coverage. Covered parts come from one batched local query; uncovered parts come from the source; a partially covered segment fetches only the missing slice.

<img src="https://raw.githubusercontent.com/MagicSquarekey/hybrid_recursive_ladder_algorithm/m

ตัดมาแค่ช่วงต้น อ่านต่อใน repo