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/sharpninja/mcpserver/mcp-session-logginggit clone --depth 1 https://github.com/sharpninja/McpServerWhat 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.00280 | $0.00280 |
| Opus 5 | $0.00140 | $0.00140 |
| Sonnet 5 | $0.00056 | $0.00056 |
| Haiku 4.5 | $0.00028 | $0.00028 |
Grade A, and why
mcp-session-logging 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 yesterday.
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.
What it actually says
MCP Session Logging — Mandatory Precondition
⚠️ PRIORITY ORDER — NON-NEGOTIABLE ⚠️
Speed is never more important than following workspace procedures.
Before doing ANY work on ANY user request, you MUST complete these steps in order:
- Read
AGENTS-README-FIRST.yamlin the repo root for the current API key and endpoints - GET
/healthto verify the MCP server is running - POST
/mcp/sessionlogwith your session entry — do NOT proceed until this succeeds - GET
/mcp/sessionlog?limit=5to review recent session history for context - GET
/mcp/todoto check current tasks - THEN begin working on the user's request
On EVERY subsequent user message:
- POST an updated session log entry BEFORE starting work
- Complete the user's request
- POST the final session log with results, actions taken, and files modified
If you skip any of these steps, STOP and go back and do them before continuing. Session logging is not optional, not deferred, and not secondary to the task. Failure to maintain the session log is a compliance violation.
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.
- yesterday First seen · 28 lines · 280 tokens per session scan A 777338266175
mcp-session-logging is a cursor rule published in the GitHub repository sharpninja/McpServer (2 stars, last pushed 11d ago), licensed Apache-2.0. It adds 280 tokens to every session, about $0.0014 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
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
java-springboot-jpa-cursorrules-prompt-file
description: "Cursor rules for Java development with Springboot and JPA integration." globs: / alwaysApply: false.
002-verify-before-act
Requires Claude to read before writing, verify before installing, and confirm before destructive operations.
swift-development
Swift development: SwiftUI, Combine, async/await, iOS patterns, and Apple platform conventions.
design-patterns
Design patterns (GoF) and file size conventions for sweagent TypeScript codebase.
database
Cursor rule "database" from ItamarZand88/awesome-agent-conventions, covering database best practices, prisma setup, prisma models, prisma queries and supabase setup.