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.
git clone --depth 1 https://github.com/prisma/prisma-nextWrote 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.
[](https://agentmods.dev/rules/prisma/prisma-next/mongodb-memory-server-setup)<a href="https://agentmods.dev/rules/prisma/prisma-next/mongodb-memory-server-setup"><img src="https://agentmods.dev/badge/rules/prisma/prisma-next/mongodb-memory-server-setup/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.
<a href="https://agentmods.dev/rules/prisma/prisma-next/mongodb-memory-server-setup"><img src="https://agentmods.dev/badge/rules/prisma/prisma-next/mongodb-memory-server-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.00546 |
| Opus 5.5 | $0.00011 | $0.00218 |
| Sonnet 5.5 | $0.00006 | $0.00109 |
| Haiku 4.5 | $0.00003 | $0.00055 |
Grade A, and why
mongodb-memory-server-setup 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 3mo 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.
This is a copy
94% identical to mongodb-memory-server-setup — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mongodb-memory-server setup
When adding mongodb-memory-server (MMS) to a package or writing tests that use it, follow these rules to prevent CI failures.
Version: use the pnpm catalog
MMS is pinned to an exact version in pnpm-workspace.yaml's catalog: section. All consumers must reference it via "mongodb-memory-server": "catalog:" in package.json.
Never use a ^ range or inline version — version drift between packages can cause one package's download to corrupt the shared binary cache used by another.
Vitest config: mandatory timeouts
Every package that depends on MMS must configure its vitest.config.ts with:
import { timeouts } from '@prisma-next/test-utils';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
testTimeout: timeouts.spinUpMongoMemoryServer,
hookTimeout: timeouts.spinUpMongoMemoryServer,
fileParallelism: false,
},
});
Why this matters
MMS downloads, extracts, and caches the mongod binary on first use. On CI this happens in the beforeAll hook. If the hook times out mid-download/extraction:
- The partially-written binary is left in the shared MMS cache (
~/.cache/mongodb-binaries/). - Every subsequent test package that starts MMS executes the corrupted binary.
- The corrupted binary crashes with
SIGSEGV, causing cascading failures across the entire CI run.
The spinUpMongoMemoryServer timeout (60s × TEST_TIMEOUT_MULTIPLIER) is sized to survive a cold-cache download on CI. The default vitest timeout (10s) is not.
fileParallelism: false
MMS instances within the same package must not start concurrently — parallel replica set startups compete for resources and can cause flaky timeouts.
Checklist for adding MMS to a new package
- Add
"mongodb-memory-server": "catalog:"todevDependencies - Add
"@prisma-next/test-utils": "workspace:*"todevDependencies - Configure
vitest.config.tsas shown above - Use
timeouts.spinUpMongoMemoryServerfor anydescribe()/beforeAll()/afterAll()timeout overrides in test files - Run
pnpm installto update the lockfile
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.
- 3mo ago First seen · 54 lines · 28 tokens per session scan A 4bd8f3beb63a
mongodb-memory-server-setup is a cursor rule published in the GitHub repository prisma/prisma-next (407 stars, last pushed 5d ago), licensed Apache-2.0. It adds 28 tokens to every session and 546 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 94% identical to mongodb-memory-server-setup, differing in 4 lines, and is treated as a copy.
mongodb-memory-server-setup compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mongodb-memory-server-setupprisma/prisma-next | Cursor rule | 407 | 5d ago | Apache-2.0 | A | 28 | Cursor |
| mongo-no-obsolete-commandsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 20 | Cursor |
| fhzxlie/FeHelper | Cursor rule | 5.7k | 4d ago | MIT | A | 610 | Cursor |
| windsurfrulesAnandPilania/eloquentjs | Cursor rule | 75 | 2mo ago | MIT | A | 826 | Windsurf |
| nodejs-mongodb-jwt-express-react-cursorrules-prompXD3an/awesome-ai-coding-all-in-one | Cursor rule | 14 | 2d ago | none | A | 443 | Cursor |
| fastapi_endpoint_tracking_with_mongodbjondoescoding/jondoescoding-coding-rules | Cursor rule | 2 | 4mo ago | MIT | A | 14 | Cursor |
| nosql-specialist-intelligentshahshrey/cursor-hub | Cursor rule | 15 | 19d ago | none | A | 150 | Cursor |