context7-mcp-tools-instructions

context7-mcp-tools-instructions is a cursor rule for Cursor from PerkyZZ999/MemorizedMCP. It costs 489 tokens per session, scanned A, original, MIT.

A rule that tells a coding agent to use Context7, a documentation service, when answering questions about software libraries or writing code examples.

In plain words
What is it for?
Use it when generating code, examples, or library guidance that should match current, version-specific documentation.
Why use it?
It reduces the risk of relying on outdated documentation or suggesting library functions that do not exist in the requested version.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when generating code, examples, or library guidance that should match current, version-specific documentation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions
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.

Clone the repo
git clone --depth 1 https://github.com/PerkyZZ999/MemorizedMCP

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 context7-mcp-tools-instructions

README.md
[![agentmods](https://agentmods.dev/badge/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions/github.svg)](https://agentmods.dev/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions)
Your own site
<a href="https://agentmods.dev/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions"><img src="https://agentmods.dev/badge/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions/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 context7-mcp-tools-instructions

Your own site · 80×15
<a href="https://agentmods.dev/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions"><img src="https://agentmods.dev/badge/rules/perkyzz999/memorizedmcp/context7-mcp-tools-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 489 This file is loaded in full into every session.
When invoked 489 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.00489 $0.00489
Opus 5 $0.00244 $0.00244
Sonnet 5 $0.00098 $0.00098
Haiku 4.5 $0.00049 $0.00049

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

Security

Grade A, and why

context7-mcp-tools-instructions 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 8d 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/context7-mcp-tools-instructions.mdc · 43 lines

How it starts

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

AI Agent Rule: Using Context7

Objective: To provide accurate, up-to-date, and version-specific code documentation and examples by using the Context7 MCP server.

Core Principle: When a prompt involves a request for code, examples, or information about a software library, you should use the Context7 tool to fetch the latest documentation directly from the source. This prevents the use of outdated training data and avoids generating hallucinated or non-existent APIs.

Available Tools & Commands

When activated, you have access to the following internal tools to fulfill the user's request. You should use these tools logically to first identify the correct library and then retrieve its documentation.

1. resolve-library-id

  • Purpose: Resolves a general library name (e.g., "next.js", "mongo") into a specific, Context7-compatible library ID.
  • When to Use: Use this first to ensure you are requesting docs for the correct library.
  • Parameters:
    • libraryName (required): The name of the library you are searching for.

2. get-library-docs

  • Purpose: Fetches the documentation for a library once you have its specific ID.
  • When to Use: After you have used resolve-library-id or if the user provides an exact Context7-compatible ID.
  • Parameters:
    • context7CompatibleLibraryID (required): The exact ID for the library (e.g., /vercel/next.js, /mongodb/docs).
    • topic (optional): A specific topic to focus on within the documentation (e.g., "routing", "hooks").
    • tokens (optional, default: 10000): The maximum number of tokens to return in the documentation.

Workflow

  1. Think if Context7 is needed, if yes use it if no dont.
  2. Identify the library or package the user is asking about.
  3. Use the resolve-library-id tool to get the precise library ID.
  4. Use the get-library-docs tool with the ID to fetch the relevant documentation. If the user mentioned a specific topic, include it in the topic parameter.
  5. Synthesize the retrieved documentation and code examples into a final, accurate answer for the user.

Read the full file on GitHub · 43 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. 8d ago First seen · 43 lines · 489 tokens per session scan A d5d3f11653d8

Subscribe to this mod's changes

context7-mcp-tools-instructions is a cursor rule published in the GitHub repository PerkyZZ999/MemorizedMCP (7 stars, last pushed 10mo ago), licensed MIT. It adds 489 tokens to every session, about $0.0024 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.