document-reader-mcp: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from ifmelate/document-reader-mcp. It costs 986 tokens per session, scanned A, original, MIT.

A set of Cursor rules for developing the document-reader-mcp project. Cursor is a code editor with an AI assistant that follows project-specific instructions.

In plain words
What is it for?
For guiding code changes, refactors, research, source citations, and secret handling in that repository.
Why use it?
It gives the assistant consistent expectations for edits, research, security, error handling, and code quality.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is ifmelate/document-reader-mcp's own configuration. It tells Cursor how to work on document-reader-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything document-reader-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ifmelate/document-reader-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ifmelate/document-reader-mcp/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/ifmelate/document-reader-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/ifmelate/document-reader-mcp/cursorrules/github.svg)](https://agentmods.dev/rules/ifmelate/document-reader-mcp/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/ifmelate/document-reader-mcp/cursorrules"><img src="https://agentmods.dev/badge/rules/ifmelate/document-reader-mcp/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/ifmelate/document-reader-mcp/cursorrules"><img src="https://agentmods.dev/badge/rules/ifmelate/document-reader-mcp/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 986 This file is loaded in full into every session.
When invoked 986 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00986 $0.00986
Opus 5.5 $0.00394 $0.00394
Sonnet 5.5 $0.00197 $0.00197
Haiku 4.5 $0.00099 $0.00099

Measured 2mo ago against content hash 207b0058b2a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cursor project rules for document-reader-mcp

Purpose

  • Establish consistent development rules for this repository when using Cursor.
  • Optimize for security, maintainability, and developer experience.

Assistant behavior

  • Default to concise answers; expand only when asked.
  • Before large refactors or breaking changes, propose a short plan and ask for confirmation.
  • Prefer minimal, targeted edits. Preserve existing indentation style and width. Do not reformat unrelated code.
  • Always add missing imports/exports and keep code type-safe. Avoid unsafe casts or any-typed surfaces.
  • Use guard clauses over deep nesting. Avoid unnecessary try/catch; never swallow errors.
  • For new code, choose clarity over cleverness; write high-verbosity, readable code with descriptive names.

Research and external knowledge

  • For web research or best-practices questions, prefer the Perplexity Sonar MCP server.
  • Always set a system role appropriate to the task (e.g., “senior DevOps engineer”, “MCP expert”, “applied research engineer”).
  • Cite authoritative sources with links. Highlight critical items and security concerns.

Security and privacy

  • Never commit secrets or credentials. Use secret managers (GitHub Encrypted Secrets for CI; SOPS/age or cloud secret stores for config).
  • Strip/redact sensitive data in logs and error messages. Do not include secrets in telemetry.
  • Default to least-privilege access in code, CI, and cloud roles.

Git and reviews

  • Use Conventional Commits for messages (feat:, fix:, docs:, chore:, refactor:, test:, ci:, build:, perf:).
  • Require signed commits and signed tags for releases where supported.
  • All changes go through PRs with passing checks (build, lint, tests, security scans) before merge.

Testing

  • For non-trivial changes, include or update unit tests. Add integration/E2E tests when behavior spans boundaries (I/O, network, persistent stores).
  • Aim for fast, deterministic tests. Favor hermetic tests with clear fixtures.

Formatting and linting

  • Respect the project’s existing linters/formatters. Do not mix indentation styles or change unrelated formatting.
  • If missing, prefer: EditorConfig for basics; language-standard tools (e.g., ESLint+Prettier for TS, Ruff/Black for Python). Enforce via pre-commit and CI.

Architecture and code style

  • Name functions as verb phrases and variables as clear nouns. Avoid cryptic abbreviations.
  • Prefer pure functions for logic; isolate I/O at boundaries. Inject dependencies for testability.
  • Avoid deep nesting; split complex logic into smaller functions.

MCP server guidelines

  • Structure
    • Separate layers: transport/API, validation, authz/authn, domain logic, tool adapters, and persistence.
    • Keep adapters pluggable and stateless; pass context explicitly.
  • Configuration
    • Use environment variables for config; no secrets in code. Document required vars.
  • Authentication/authorization
    • Support API keys and/or OAuth with short-lived tokens. Scope service accounts narrowly.
  • Quotas and rate limiting
    • Enforce per-user/key budgets; handle 429 responses with backoff.
  • Validation
    • Validate requests/responses against schemas; reject out-of-spec traffic.
  • Streaming
    • Support streaming for long operations; implement backpressure.
  • Reliability
    • Use idempotency keys for mutating operations. Retry with exponential backoff and jitter for transient failures.
  • Observability
    • Use structured logs with correlation IDs. Instrument with OpenTelemetry where applicable.
  • Versioning and compatibility
    • Version public APIs; provide deprecation windows for breaking changes.

Perplexity Sonar integration rules

  • Use models appropriate to task complexity (e.g., Sonar Pro for deep, citation-heavy research).
  • Default temperature to 0–0.3 for deterministic, factual outputs.
  • Require citations with answers; surface them clearly. Warn when citations are insufficient.
  • Apply timeouts and retries with exponential backoff. Handle 429s and 5xx robustly.
  • Cache deterministic queries where allowed; include freshness timestamps.
  • Respect API ToS and data usage limits. Never expose API keys in client code.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 91 lines · 986 tokens per session scan A 207b0058b2a3

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository ifmelate/document-reader-mcp (3 stars, last pushed 1y ago), licensed MIT. It adds 986 tokens to every session, about $0.0039 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesifmelate/document-reader-mcpCursor rule31y agoMITA986Cursor
code-optimizationleshchenko1979/fast-mcp-telegramCursor rule504d agoMITA0Cursor
implementation-workflowleshchenko1979/fast-mcp-telegramCursor rule504d agoMITA1,721Cursor
memory-bankleshchenko1979/fast-mcp-telegramCursor rule504d agoMITA1,623Cursor
docs-plain-languageleshchenko1979/fast-mcp-telegramCursor rule504d agoMITA0Cursor
generalleshchenko1979/fast-mcp-telegramCursor rule504d agoMITA228Cursor
qa-agentArdaka/cursor-mcp-qa-agentCursor rule02mo agoMITA149Cursor