Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/hassansaadfr/log-reader-mcp/workflowgit clone --depth 1 https://github.com/hassansaadfr/log-reader-mcpWhat 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 | $0.00837 | $0.00837 |
| Opus 5 | $0.00418 | $0.00418 |
| Sonnet 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 2d 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.
- 2d 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.0042 per session on Opus 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.