mcp-docs

A documentation rule set for Model Context Protocol implementations, which connect AI tools to external data or actions.

In plain words
What is it for?
Use it when documenting MCP projects. It requires Mermaid diagrams, protocol details, setup information, security notes, performance details, rate limits where relevant, and test-coverage documentation.
Why use it?
It gives developers a consistent checklist for explaining how an MCP implementation works, including its errors, commands, security, and tests.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/arjshiv/localutils-mcp-server/mcp-docs
Clone the repo
git clone --depth 1 https://github.com/arjshiv/localutils-mcp-server

Made for: Cursor.

Per session 2 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00002 $0.00461
Opus 5 $0.00001 $0.00230
Sonnet 5 $0.00000 $0.00092
Haiku 4.5 $0.00000 $0.00046

Measured 2d ago against content hash d1bf3099c59e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-docs 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.

.cursor/rules/mcp-docs.mdc · 93 lines

What it actually says

MCP Documentation Standards

Required Documentation Components

1. Workflow Diagrams

Every MCP implementation must include Mermaid diagrams for:

  • Main protocol workflow
  • Error handling flow
  • Data processing pipeline
  • Command execution sequence

Example workflow:

graph TD
    A[Start] --> B{Protocol Type}
    B -->|Command| C[Execute Command]
    B -->|Query| D[Process Query]
    B -->|Event| E[Handle Event]
    C --> F[Return Result]
    D --> F
    E --> F
    F --> G[End]

2. Protocol Documentation

  • Protocol name and version
  • Request/Response schema
  • Supported commands
  • Error codes and handling
  • Example usage

3. Implementation Details

Each implementation must document:

  • Dependencies and requirements
  • Configuration options
  • Security considerations
  • Performance characteristics
  • Rate limiting (if applicable)

4. Testing Requirements

Document test coverage for:

graph LR
    A[Unit Tests] --> D[Coverage]
    B[Integration Tests] --> D
    C[E2E Tests] --> D
    D{80% Min Coverage}

File Organization

README.md Structure

protocol-name/
├── README.md
├── WORKFLOW.md
├── SECURITY.md
└── examples/
    └── basic-usage.md

Style Guidelines

Mermaid Diagrams

  • Use consistent node shapes
  • Include color coding for different types
  • Add descriptive labels
  • Keep diagrams focused and clear

Code Examples

  • Include TypeScript types
  • Show error handling
  • Provide complete working examples
  • Include comments for complex logic

Review Checklist

  • All required diagrams present
  • Diagrams follow style guidelines
  • Documentation is complete
  • Examples are tested and working
  • Security considerations documented
  • Performance characteristics documented

Maintenance

  • Update diagrams when workflow changes
  • Keep examples up to date
  • Review and update security docs
  • Maintain test coverage documentation
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. 2d ago First seen · 93 lines · 2 tokens per session scan A d1bf3099c59e

Subscribe to this mod's changes

mcp-docs is a cursor rule published in the GitHub repository arjshiv/localutils-mcp-server (2 stars, last pushed 8mo ago), licensed MIT. It adds 2 tokens to every session and 461 once invoked, about $0.0000 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.