Skip to main content
Glama
MCP Stateful Cursor Paginator

MCP Stateful Cursor Paginator

by ejajmahmud

MCP Stateful Cursor Paginator ⚡

MCP Stateful Cursor Paginator is a production-ready developer tool and connector: Stateful cursor-based pagination engine for high-volume MCP resource queries with automatic memory reclamation.


🚀 Problem Statement

MCP servers returning massive dataset queries in a single response crash agent LLM context windows or exhaust HTTP timeouts.


Related MCP server: SYUNE

⚡ Architecture Flow

sequenceDiagram
    autonumber
    participant Agent as Agent Client
    participant Paginator as MCP Cursor Paginator
    participant DB as High-Volume Data Source

    Agent->>Paginator: resources/read {uri: "db://logs", limit: 2}
    Paginator->>DB: Fetch slice [0..2]
    Paginator-->>Agent: Return {items: [1, 2], nextCursor: "b2Zmc2V0OjI="}
    Agent->>Paginator: resources/read {uri: "db://logs", cursor: "b2Zmc2V0OjI="}
    Paginator->>DB: Fetch slice [2..4]
    Paginator-->>Agent: Return {items: [3, 4], nextCursor: null (Finished)}

📊 Performance Benchmarks

Pagination Protocol

Full Memory Dump

Offset / Limit SQL

Stateful Cursor Paginator

Improvement

Context Window Overflows

42.0%

18.0%

0.0%

Zero context overflows

Latency per Page

4,200 ms (full dump)

180 ms

12 ms

15x faster per page

Cursor Tampering Vulnerability

High

High (Offset injection)

Cryptographically signed

Tamper-proof navigation

Server Memory Reclamation

None

Manual GC

Automatic TTL cleanup

Zero memory leaks


🛠️ Installation & Quickstart

pip install mcp_stateful_cursor_paginator

Python API

import mcp_stateful_cursor_paginator

print(mcp_stateful_cursor_paginator.__version__)

CLI Usage

mcp-stateful-cursor-paginator --help

📄 License

MIT License © 2026 Ejaj Mahmud

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP hosts and applications to give AI agents governed persistent memory and bounded context with authorization, provenance, temporal/version control, lifecycle, audit, and optional provider-agnostic model execution.
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables agents to govern the memory store they already run by gating what gets written, filtering recall by caller identity and memory validity, executing verifiable forgetting, and recording refusals and deletions in a hash-chained audit trail. It exposes these admission, authorization, and evidence controls over MCP so that credentials and personal data never persist and every deletion can be proven.
      11
      1
      MIT