mcp-cursor-demo-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cursor-demo-server list 5 open records and give me the cursor for the next page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: MCP Stateful Cursor Paginator
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
Available Tools
2 toolsdataset_summaryDataset summaryBRead-onlyIdempotent
Returns total record count plus counts by status and owner.
Inputs: no named parameters.
list_recordsList recordsARead-onlyIdempotent
Returns one page of records matching the filters. A non-null nextCursor means more records match: pass it back to continue. Never treat one page as the complete result set.
Inputs: limit, owner, cursor, status.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve clearly different purposes: list_records returns a paginated filtered list, while dataset_summary returns aggregate counts by status and owner. An agent can easily tell which is for enumeration versus aggregate statistics, with no overlap in intent.
Both names use snake_case and are immediately readable, giving a consistent visual pattern. However, list_records is verb_noun while dataset_summary is noun_noun, a minor stylistic deviation from a single convention.
With only two tools, the surface is thin for a records/dataset server, though each tool is distinct and earns its place. It feels like a narrow read-only demo scope rather than a complete toolset.
The server offers only retrieval and aggregation: there is no way to fetch a single record by ID, and no create/update/delete operations. For a records domain this leaves significant lifecycle gaps that would block most write workflows.
Maintenance
Related MCP Connectors
Free samples, summaries and provenance for each dataset, plus live feeds. Query fee for filters.
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.
Structured REST API and Remote MCP for 6 weekly public record datasets on Cloudflare Edge.
Related MCP Servers
- 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
- AlicenseNot gradedqualityBmaintenanceEnables high-volume MCP resource queries to be paginated with cryptographically signed, stateful cursors, automatic TTL cleanup, and bounded memory use so agent clients avoid context-window overflows and timeouts.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents and MCP clients to query SQL databases safely through a read-only gateway with AST validation, forced pagination, scoped authorization, and hash-chained audit logging.MIT
- AlicenseNot gradedqualityBmaintenanceEnables read-only queries over a published website-change dataset, including schema inspection, search, exact row lookup, row comparison, summary statistics, rankings, and provenance/citation retrieval.79 npmMIT