Borrowing it
Nothing to install: this file belongs to ahmetbarut/mcp-database-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ahmetbarut/mcp-database-server/main/.cursorrulesgit clone --depth 1 https://github.com/ahmetbarut/mcp-database-serverWrote 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/ahmetbarut/mcp-database-server/cursorrules)<a href="https://agentmods.dev/rules/ahmetbarut/mcp-database-server/cursorrules"><img src="https://agentmods.dev/badge/rules/ahmetbarut/mcp-database-server/cursorrules/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/ahmetbarut/mcp-database-server/cursorrules"><img src="https://agentmods.dev/badge/rules/ahmetbarut/mcp-database-server/cursorrules.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.03262 | $0.03262 |
| Opus 5.5 | $0.01305 | $0.01305 |
| Sonnet 5.5 | $0.00652 | $0.00652 |
| Haiku 4.5 | $0.00326 | $0.00326 |
Grade A, and why
cursorrules 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 444 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PROJECT OVERVIEW
You are an expert Node.js developer tasked with building a Model Context Protocol (MCP) server that provides multi-database query execution capabilities. This server should support SQLite, PostgreSQL, and MySQL databases with a focus on security, performance, and extensibility using modern Node.js and TypeScript. Note: This project is mcp-server, not a web app or another app.
CORE REQUIREMENTS
1. MCP Protocol Implementation
- Implement full MCP server specification compliance
- Use JSON-RPC for client-server communication
- Provide proper error handling and response formatting
- Support async/await patterns with modern ES modules
2. Database Support
- SQLite: File-based database support with better-sqlite3 or sqlite3
- PostgreSQL: Production database support with pg (node-postgres)
- MySQL: Enterprise database support with mysql2
- Implement connection pooling for each database type
- Provide unified interface across all database types
3. Security Requirements
- MANDATORY: Use parameterized queries only (prevent SQL injection)
- Implement credential encryption for database connections
- Add query validation and sanitization
- Include audit logging for all database operations
- Support rate limiting and timeout controls
4. Architecture Pattern
- Use dependency injection for database drivers
- Implement proper connection lifecycle management
- Follow SOLID principles and clean architecture
- Use Zod for data validation and schema management
- Use TypeScript for type safety
PROJECT STRUCTURE
mcp-database-server/ ├── src/ │ ├── index.ts │ ├── server/ │ │ ├── index.ts │ │ ├── mcp-server.ts # Main MCP server implementation │ │ ├── handlers.ts # Request handlers │ │ └── tools/ # MCP tools implementation │ │ ├── index.ts │ │ ├── execute-query.ts │ │ ├── list-databases.ts │ │ ├── describe-table.ts │ │ └── list-tables.ts │ ├── database/ │ │ ├── index.ts │ │ ├── base.ts # Abstract base database interface │ │ ├── factory.ts # Database driver factory │ │ ├── pool.ts # Connection pooling │ │ └── drivers/ │ │ ├── index.ts │ │ ├── sqlite-driver.ts │ │ ├── postgresql-driver.ts │ │ └── mysql-driver.ts │ ├── config/ │ │ ├── index.ts │ │ ├── settings.ts # Configuration schemas │ │ └── database-config.ts # Database configurations │ ├── security/ │ │ ├── index.ts │ │ ├── encryption.ts # Credential encryption │ │ ├── validators.ts # Query validation │ │ └── audit.ts # Audit logging │ ├── utils/ │ │ ├── index.ts │ │ ├── logger.ts # Structured logging │ │ ├── exceptions.ts # Custom exceptions │ │ └── helpers.ts # Utility functions │ └── types/ │ ├── index.ts │ ├── database.ts │ ├── mcp.ts │ └── config.ts ├── tests/ │ ├── unit/ │ ├── integration/ │ └── fixtures/ ├── examples/ │ ├── basic-usage.js │ ├── configuration-examples/ │ └── client-examples/ ├── docs/ ├── package.json ├── package-lock.json ├── tsconfig.json ├── .env.example ├── .gitignore ├── README.md ├── jest.config.js └── LICENSE
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.
- 2mo ago First seen · 444 lines · 3,262 tokens per session scan A c814602f41e0
cursorrules is a cursor rule published in the GitHub repository ahmetbarut/mcp-database-server (6 stars, last pushed 8mo ago), licensed MIT. It adds 3,262 tokens to every session, about $0.0130 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-31.
cursorrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursorrulesahmetbarut/mcp-database-server | Cursor rule | 6 | 8mo ago | MIT | A | 3,262 | Cursor |
| about-codebaselineai-intelligence/lineai-mcp-server | Cursor rule | 37 | 11d ago | MPL-2.0 | A | 13 | Cursor |
| toc-readmekontent-ai/mcp-server | Cursor rule | 10 | 2d ago | MIT | A | 0 | Cursor |
| runwhen-infrastructurerunwhen-contrib/runwhen-platform-mcp | Cursor rule | 1 | 5d ago | Apache-2.0 | A | 0 | Cursor |
| php-client-implementationdalehurley/php-mcp-sdk | Cursor rule | 27 | 11mo ago | MIT | A | 8 | Cursor |
| cursor_rulesgiantswarm/mcp-prometheus | Cursor rule | 11 | yesterday | Apache-2.0 | A | 374 | Cursor |
| validate-design-earlyRethunk-AI/clodbridge | Cursor rule | 0 | 4mo ago | MIT | A | 227 | Cursor |