log-reader-mcp: Cursor rule for Cursor

.cursor/log-reader-mcp/workflow.mdc

workflow is a cursor rule for Cursor from hassansaadfr/log-reader-mcp. It costs 837 tokens per session, scanned A, original, MIT.

A logging guide for projects that use an MCP server, a service that lets an agent interact with external tools. It requires structured JSON log entries in logs/logs.log with fields such as level, timestamp, and message.

In plain words
What is it for?
Creating the logs folder, writing compliant log records, recording service or user context, and following the project's logging utility or MCP API.
Why use it?
It gives developers one predictable log location and format, making events easier to inspect and process automatically.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is hassansaadfr/log-reader-mcp's own configuration. It tells Cursor how to work on log-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 log-reader-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hassansaadfr/log-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/hassansaadfr/log-reader-mcp/main/.cursor/log-reader-mcp/workflow.mdc
Clone the repo
git clone --depth 1 https://github.com/hassansaadfr/log-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 workflow

README.md
[![agentmods](https://agentmods.dev/badge/rules/hassansaadfr/log-reader-mcp/workflow/github.svg)](https://agentmods.dev/rules/hassansaadfr/log-reader-mcp/workflow)
Your own site
<a href="https://agentmods.dev/rules/hassansaadfr/log-reader-mcp/workflow"><img src="https://agentmods.dev/badge/rules/hassansaadfr/log-reader-mcp/workflow/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 workflow

Your own site · 80×15
<a href="https://agentmods.dev/rules/hassansaadfr/log-reader-mcp/workflow"><img src="https://agentmods.dev/badge/rules/hassansaadfr/log-reader-mcp/workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 837 This file is loaded in full into every session.
When invoked 837 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.00837 $0.00837
Opus 5.5 $0.00335 $0.00335
Sonnet 5.5 $0.00167 $0.00167
Haiku 4.5 $0.00084 $0.00084

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

Security

Grade A, and why

workflow 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.

.cursor/log-reader-mcp/workflow.mdc · 90 lines

How it starts

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

MCP Logging Workflow

This guide defines the standards for log management in a project using the MCP server. It is intended for the AI agent and anyone developing on this project.

Log Structure and Location

  • Required folder: Every project must have a logs/ folder at the root.
  • Log file: The main log file must be named logs.log and placed in this folder.

Log Format

  • Structured JSON format: Each line in the logs.log file must be a JSON object following the schema below (see also the definition in @mcp-server.ts):
{
  "level": "INFO|WARN|ERROR|DEBUG|CRITICAL",
  "timestamp": "YYYY-MM-DDTHH:MM:SS.sssZ",
  "message": "string",
  "service_name": "string (optional)",
  "user_id": "string (optional)",
  "context": { ... } (optional),
  "event": { ... } (optional)
}
  • Example:
{
  "level": "INFO",
  "timestamp": "2025-06-01T12:34:56.789Z",
  "message": "User login succeeded",
  "service_name": "auth",
  "user_id": "12345",
  "context": { "ip": "192.168.1.10" },
  "event": { "action": "login" }
}
  • Schema compliance: Always use the project's logging utility function (or the MCP API) to ensure format compliance. Never write directly to the file without validation.

Using the read_log Tool

  • MCP Tool: The server exposes the read_log tool to read the last lines of the log file, with optional time interval filtering.
  • Main arguments:
    • lines: number of lines to read (default: 50)
    • start_time / end_time: optional ISO 8601 time bounds
  • Log file: The server always uses the logs/logs.log file in the user's working directory.
  • Example call:
{
  "tool": "read_log",
  "args": {
    "lines": 100,
    "start_time": "2025-06-01T00:00:00Z",
    "end_time": "2025-06-01T23:59:59Z"
  }
}

Use Cases

Here are several concrete examples of using logs and the read_log tool:

  • Debugging a production error:
    • Read the last 200 lines of the log to identify a sequence of events leading to a critical error.
    • Filter logs over a specific time range to isolate an incident.
  • Verifying a new feature implementation:
    • Check that expected events (e.g., user creation, payment validated) appear in the logs after a deployment.
  • Security audit:
    • Search for failed login attempts or suspicious accesses over a given period.
  • Performance analysis:
    • Extract DEBUG-level logs to measure response times or detect slow endpoints.
  • User support:
    • Retrieve a user's journey (via user_id) to understand a bug or complaint.
  • Automated monitoring:
    • Integrate log reading into a script or external tool to generate alerts in case of detected anomalies.
  • Migration or refactoring validation:
    • Compare logs before/after a migration to ensure no regressions.

Read the full file on GitHub · 90 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 · 90 lines · 837 tokens per session scan A f3c75521059d

Subscribe to this mod's changes

workflow is a cursor rule published in the GitHub repository hassansaadfr/log-reader-mcp (6 stars, last pushed 1y ago), licensed MIT. It adds 837 tokens to every session, about $0.0033 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

workflow compared with cursor rules from other repositories

workflow next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
workflowhassansaadfr/log-reader-mcpCursor rule61y agoMITA837Cursor
ponytailDietrichGebert/ponytailCursor rule185k8d agoMITA604Cursor
angular-20angular/angularCursor rule101kyesterdayMITA0Cursor
dev-standardapache/supersetCursor rule75kyesterdayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor