Prisma ORM is a Node.js and TypeScript database toolkit that lets applications work with databases through a programming interface instead of writing every query directly in SQL. Developers use it with databases including PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB, and CockroachDB. The catalogue add-ons provide agent rules, skills, hooks, agents, and other workflows for using Prisma.
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/ormWrote 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/orm/mongodb-memory-server-setup)<a href="https://agentmods.dev/rules/prisma/orm/mongodb-memory-server-setup"><img src="https://agentmods.dev/badge/rules/prisma/orm/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/orm/mongodb-memory-server-setup"><img src="https://agentmods.dev/badge/rules/prisma/orm/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.00542 |
| Opus 5.5 | $0.00011 | $0.00217 |
| Sonnet 5.5 | $0.00006 | $0.00108 |
| Haiku 4.5 | $0.00003 | $0.00054 |
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 1mo 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- mongodb-memory-server-setup — 94% identical, 4 lines differ
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 '@repo/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
"@repo/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.
- 1mo ago First seen · 54 lines · 28 tokens per session scan A 8b24e48e26d7
mongodb-memory-server-setup is a cursor rule published in the GitHub repository prisma/orm (47,693 stars, last pushed today), licensed Apache-2.0. It adds 28 tokens to every session and 542 once invoked, about $0.0001 per session on Opus 5.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.
Other cursor rules, from other repositories
prisma
Prisma database patterns and conventions for Next.js and TypeScript projects.
react-query-tests
// ✅ CORRECT: Legacy React Query pattern const ctx = konn() .beforeEach(() => createAppRouter()) .afterEach((ctx) => ctx?.close?.()) .done().
tanstack-react-query-tests
// ✅ CORRECT: Use await using for automatic cleanup await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
upgrade-tests
// ✅ CORRECT: Upgrade package pattern await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
test-patterns
// ✅ CORRECT: Use await using for automatic cleanup await using ctx = testServerAndClientResource(router, { client(opts) { return { links: [ httpLink({ url: opts.httpUrl, fetch: mockFetch, }), ], }; }, }).
testing
Test conventions for openapi-to-cli (Jest).