mongodb-mcp-server copilot-instructions.md

mongodb-mcp-server copilot-instructions.md is an instructions file for GitHub Copilot from mongodb-js/mongodb-mcp-server. It costs 1,576 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for a TypeScript and Node.js monorepo: a project containing multiple related packages. It provides an MCP server, a standard way for AI tools to connect to MongoDB and MongoDB Atlas.

In plain words
What is it for?
Use them when changing MongoDB tools, the command-line server, sessions, configuration, authentication storage, HTTP connections, or other workspace packages.
Why use it?
They explain the package boundaries, command-line entry point, shared infrastructure, and supported embedding and transport layers.

Instructions file for GitHub Copilot

About the project

MongoDB MCP Server connects AI agents to MongoDB databases and MongoDB Atlas clusters through the Model Context Protocol. It lets agents interact with self-managed MongoDB deployments locally or use the hosted Atlas MCP server through the official plugins. The catalogue entries provide agent integrations and guidance for using the server.

mongodb-js/mongodb-mcp-server · 1,121 stars · on GitHub

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 instructions/mongodb-js/mongodb-mcp-server/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/mongodb-js/mongodb-mcp-server

Made for: GitHub Copilot.

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-server copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mongodb-js/mongodb-mcp-server/copilot-instructions.svg)](https://agentmods.dev/instructions/mongodb-js/mongodb-mcp-server/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/mongodb-js/mongodb-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/mongodb-js/mongodb-mcp-server/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,576 This file is loaded in full into every session.
When invoked 1,576 The same file — it is already loaded in full.
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.01576 $0.01576
Opus 5 $0.00788 $0.00788
Sonnet 5 $0.00315 $0.00315
Haiku 4.5 $0.00158 $0.00158

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

Security

Grade A, and why

mongodb-mcp-server copilot-instructions.md 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 4d 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.

.github/copilot-instructions.md · 95 lines

How it starts

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

Project Overview

This project is a monorepo implementing the MCP (Model Context Protocol) server that lets users interact with their MongoDB clusters and MongoDB Atlas accounts. It is built using TypeScript, Node.js, pnpm workspaces, and the official @modelcontextprotocol v2 SDK packages (client, server, core, node).

The server ships as the v3 API: a set of scoped @mongodb-js/mcp-* packages. The mongodb-mcp-server package is the binary CLI distribution (npx mongodb-mcp-server / MCPB) — library embedding uses the scoped packages.

Folder Structure

This project uses pnpm workspaces (pnpm-workspace.yaml). The source of the server lives in packages/*:

  • packages/mongodb-mcp-server: The shipped CLI binary entrypoint and its scripts.
  • packages/cli: CLI wiring — runMcpCli, CliServer, Session, parseUserConfig, UserConfigSchema, applyConfigOverrides, create*FromConfig factories, Resources.
  • packages/core: Shared infrastructure — ToolBase/ToolClass, StdioRunner, InMemoryTransport, SessionStore, Keychain, Elicitation, NoopLogger, NoopTelemetry, McpServer re-export.
  • packages/http-runners: HTTP transport — StreamableHttpRunner, MCPHttpServer, MonitoringServer.
  • packages/tools-mongodb: MongoDB tools (MongoDBTools, MongoDBToolBase), connection management (MCPConnectionStore, MCPConnectionManager, ConnectionRegistry), ErrorCodes, MongoDBError.
  • packages/tools-atlas: Atlas Admin API tools (AtlasTools).
  • packages/tools-atlas-local: Atlas Local tools (AtlasLocalTools).
  • packages/tools-assistant: Assistant / knowledge tools (AssistantTools).
  • packages/atlas-api-client: Atlas API client (ApiClient, ClientCredentialsAuthProvider).
  • packages/atlas-telemetry: Telemetry pipeline (AtlasTelemetry).
  • packages/logging: Loggers (ConsoleLogger, DiskLogger, McpLogger).
  • packages/metrics: Metrics (PrometheusMetrics, createDefaultMetrics).
  • packages/types: Shared types (UserConfig, TransportRequestContext, ToolCategory, OperationType, ServerMetadata, McpSession, …).
  • packages/ui: MCP UI resources (UIRegistry).
  • Test packages: packages/integration-tests (start the server and interact with it), packages/accuracy-tests (accuracy tests that use different models to ensure tools have reliable descriptions), packages/eval-tests, packages/browser-tests, packages/test-utils.
  • packages/scripts: repo maintenance scripts (API report generation, tool argument/UI generation, release notes).

Read the full file on GitHub · 95 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. 4d ago First seen · 95 lines · 1,576 tokens per session scan A 811f9b2384af

Subscribe to this mod's changes

mongodb-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository mongodb-js/mongodb-mcp-server (1,121 stars, last pushed today), licensed Apache-2.0. It adds 1,576 tokens to every session, about $0.0079 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-30.