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.
curl -O https://raw.githubusercontent.com/hassansaadfr/log-reader-mcp/main/.cursor/log-reader-mcp/workflow.mdcgit clone --depth 1 https://github.com/hassansaadfr/log-reader-mcpWrote 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.
[](https://agentmods.dev/rules/hassansaadfr/log-reader-mcp/workflow)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.logand placed in this folder.
Log Format
- Structured JSON format: Each line in the
logs.logfile 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_logtool 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.logfile 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.
- Retrieve a user's journey (via
- 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.
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.
- 2mo ago First seen · 90 lines · 837 tokens per session scan A f3c75521059d
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.
workflow compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| workflowhassansaadfr/log-reader-mcp | Cursor rule | 6 | 1y ago | MIT | A | 837 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 185k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 101k | yesterday | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 75k | yesterday | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | yesterday | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | yesterday | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | yesterday | Apache-2.0 | A | 0 | Cursor |