mongodb-mcp: Instructions file for Codex

AGENTS.md

mongodb-mcp AGENTS.md is an instructions file for Codex, OpenCode from VitalyOstanin/mongodb-mcp. It costs 3,872 tokens per session, scanned A, original, MIT.

A set of contributor instructions for mongodb-mcp, an MCP server that connects AI tools with MongoDB databases. MongoDB is a database that stores data in document-like records.

In plain words
What is it for?
Use it when adding features, refactoring code, updating documentation, or changing tools that read or modify MongoDB data.
Why use it?
It defines the language, testing, planning, documentation, and verification rules contributors must follow, including checking that changed database data was really updated.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is VitalyOstanin/mongodb-mcp's own configuration. It tells Codex and OpenCode how to work on mongodb-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mongodb-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to VitalyOstanin/mongodb-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.

Copy the file
curl -O https://raw.githubusercontent.com/VitalyOstanin/mongodb-mcp/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/VitalyOstanin/mongodb-mcp

Made for: Codex, OpenCode.

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 mongodb-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vitalyostanin/mongodb-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/vitalyostanin/mongodb-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/vitalyostanin/mongodb-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/vitalyostanin/mongodb-mcp/agents-md/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 mongodb-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/vitalyostanin/mongodb-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/vitalyostanin/mongodb-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,872 This file is loaded in full into every session.
When invoked 3,872 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03872 $0.03872
Opus 5 $0.01936 $0.01936
Sonnet 5 $0.00774 $0.00774
Haiku 4.5 $0.00387 $0.00387

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

Security

Grade A, and why

mongodb-mcp AGENTS.md scanned grade A with 1 finding 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- When debugging complex flows, prefer writing a short Node.js script that uses `StdioClientTransport` and `Client` from `@modelcontextprotocol/sdk/dist/esm/client/index.js`. Spawn the server via `child_process.spawn`, w
AGENTS.md · 340 lines

How it starts

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

Repository Guidelines

Contributor Notes

  • Keep source code, comments, documentation, and commit messages in English.
  • Run npm run build and npx eslint . before publishing changes to ensure type-checking and linting stay green.
  • When formatting or refactoring code, default to running npx eslint --fix (without dry-run) so lintable issues are auto-corrected early.
  • Maintain README.md in English and README-ru.md in Russian so both stay aligned with the MongoDB MCP feature set.
  • Ensure every data-mutating MCP tool description explicitly instructs clients to re-fetch the updated entity and verify that requested properties were applied.

Planning Workflow

  • Always create a plan document before implementation for non-trivial tasks (new features, significant refactoring, or multi-file changes).
  • Plan documents must be stored in temp/ directory with descriptive filenames (e.g., temp/issue-star-tools-plan.md).
  • All plan documents must include a Table of Contents (TOC) for easy navigation.
  • Rule: Documentation changes come before code changes - When a task requires both adding new rules/guidelines and implementing them:
    1. First, update AGENTS.md with new rules and best practices
    2. Then, implement the code changes following those rules
    3. This ensures guidelines are documented before they become implicit knowledge
  • Plan document structure should include:
    • Overview and motivation
    • Detailed implementation steps with file references and line numbers where applicable
    • Type definitions and interfaces
    • API endpoints and parameters
    • Error handling strategy
    • Testing approach
    • Files to be modified with estimated line counts
  • Use the plan as a checklist during implementation - mark sections as completed as you progress.

Documentation Guidelines

Language Policy

  • This AGENTS.md must always be written in English. Do not localize or translate this file.
  • Examples, code snippets, and rule text in this file should remain in English for consistency across all contributors and tools.
  • STRICTLY FORBIDDEN: Never use emojis in any documentation, commit messages, code comments, or tool responses. This applies to:
    • All Markdown files (README.md, README-ru.md, CHANGELOG.md, etc.)
    • Git commit messages
    • Code comments and documentation strings
    • MCP tool descriptions and responses
    • Release notes and GitHub releases
    • Any other project documentation
  • Keep documentation clear, concise, and technically accurate.
  • Focus on technical content rather than decorative elements.
  • Table of Contents (TOC) Policy:
    • TOC is required for all Markdown files intended for human readers (e.g., README.md, README-ru.md, user-facing documentation, guides).
    • TOC is not required for instruction files for AI agents (e.g., AGENTS.md, CLAUDE.md, or similar AI instruction files).
    • Rationale: AI agents can navigate documents without TOC; humans benefit from quick navigation.
  • TOC should use standard Markdown anchor links (e.g., [Overview](#overview)).
  • Include all level 2 (##) and level 3 (###) headers in the TOC for easy navigation.
  • Update the TOC whenever document structure changes (new sections, renamed headers, etc.).
  • Example TOC format:
    ## Table of Contents
    - [Section 1](#section-1)
      - [Subsection 1.1](#subsection-11)
    - [Section 2](#section-2)
    

Read the full file on GitHub · 340 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. 9d ago First seen · 340 lines · 3,872 tokens per session scan A 691d907361be

Subscribe to this mod's changes

mongodb-mcp AGENTS.md is an instructions file published in the GitHub repository VitalyOstanin/mongodb-mcp (0 stars, last pushed 2d ago), licensed MIT. It adds 3,872 tokens to every session, about $0.0194 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens