mcp-cursor-demo-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-cursor-demo-server
A runnable MCP server that demonstrates one specific bug: offset pagination silently returns the wrong page when an agent replays a cursor against different filters.
list_records(status="open", limit=5) -> nextCursor: "..."
list_records(status="closed", cursor) -> offset 5 of a different result setSame response shape, different rows, no error. The model summarises it and the answer is wrong.
This server returns invalid_cursor instead.
Run
npx mcp-cursor-demo-serverNo build step, no database, no API keys. 120 in-memory records.
Claude Desktop / Cursor / any MCP client
{
"mcpServers": {
"cursor-demo": {
"command": "npx",
"args": ["-y", "mcp-cursor-demo-server"],
"env": { "CURSOR_SECRET": "pick-a-long-random-string" }
}
}
}Related MCP server: redis-guard-mcp
Tools
Tool | What it does |
| One page of records filtered by |
| Total count plus counts by status and owner. |
Try the bug
list_records({ status: "open", limit: 5 })→ returns 5 rows and anextCursor.list_records({ status: "closed", limit: 5, cursor: "<that cursor>" })→invalid_cursor: "Cursor was issued for different filters. Start again from the first page."
With a plain offset cursor, step 2 would have returned rows 6–10 of the closed set as if they were a continuation. No error anywhere.
What the cursor carries
payload = { v: 1, f: filterFingerprint(filters), o: offset, exp: expiresAt }
cursor = base64url(payload) + "." + hmacSha256(payload, secret)filterFingerprint is order-insensitive, so {a:1,b:2} and {b:2,a:1} hash the same. Signature comparison uses timingSafeEqual. Expired cursors are rejected.
Scope
This is the demo: two tools, in-memory data, stdio only.
The production starter kit adds scoped bearer auth, per-token rate limiting, stdio and Streamable HTTP transport, a read-only tool guard, structured logs, and the full test suite: https://legaza.gumroad.com/l/mcp-kit (79 EUR, one payment).
If you only want the cursor logic, the standalone library is mcp-cursor-guard (MIT).
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search, filter, count and sum Australian government open data, with every version kept.
Contradiction-verified, freshness-SLA'd signed feed: per-record status + as-of date + receipt.
Read-only discovery and bounded access to a finite market briefing with evidence boundaries.
Search, sample and query open reproducible datasets published as immutable Parquet with schemas.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides read-only SQL analytics on local CSV, Parquet, and JSON datasets using DuckDB, with pagination, security guardrails, and health monitoring.MIT
- AlicenseAqualityCmaintenanceEnables safe, read-only interaction with Redis databases via cursor-based tools for retrieving keys, hashes, lists, sets, and sorted sets, backed by ACL DRYRUN-verified privilege checks.13MIT
- AlicenseNot gradedqualityCmaintenanceEnables read-only collection research through six snapshot-backed tools for capabilities, facets, typed selection, ranking, bounded object metadata hydration, and evidence resolution.MIT
- AlicenseNot gradedqualityBmaintenanceEnables loading persona documents, searching summarized and original canon text with evidence verification, and paginated reading of full source files with per-file SHA-256 integrity checks. Provides user-authorized persistent memory that can be queried, saved, corrected, and deleted under per-user isolation and version checks, backed by D1 storage and R2 file retrieval on Cloudflare Workers.AGPL 3.0