cursorrules

A set of coding rules for working with a codebase through MCP, a standard way for an AI assistant to use external tools. It covers file access, Git history, GitHub, web research, and structured problem solving.

In plain words
What is it for?
Use it when an AI assistant needs to inspect files, review Git changes, check GitHub issues or pull requests, research practices, or break down a complex task.
Why use it?
It gives the coding assistant clear guidance on which tools to use and how much project context to read. This helps avoid unnecessary file reads and keeps changes aligned with the project.

Cursor rule for Cursor

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 rules/mjdevaccount/aistack-mcp/cursorrules
Clone the repo
git clone --depth 1 https://github.com/mjdevaccount/AIStack-MCP

Made for: Cursor.

Per session 2,545 This file is loaded in full into every session.
When invoked 2,545 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.02545 $0.02545
Opus 5 $0.01273 $0.01273
Sonnet 5 $0.00509 $0.00509
Haiku 4.5 $0.00254 $0.00254

Measured yesterday against content hash 0eeda2bcc097, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 yesterday.

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.

.cursorrules · 421 lines

How it starts

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

AIStack Development Standards

Project Context

You have access to the codebase via MCP protocol with these tools:

  • filesystem: Read/write/search files (including .env files)
  • git: View history and changes
  • github: Check PRs and issues
  • sequential-thinking: Break down complex tasks
  • brave-search: Research best practices

Environment Files

You CAN and SHOULD read .env files when needed:

  • .env file is explicitly allowed in .cursorignore
  • Use it to read API keys, tokens, and configuration values
  • This is necessary for setting up MCP servers and services
  • Example: Reading GITHUB_PERSONAL_ACCESS_TOKEN from .env to configure GitHub MCP server

MCP Usage Guidelines

When to Use MCP Tools

  1. Understanding Context: Use filesystem to read related files
  2. Pattern Matching: Search for similar implementations
  3. Change History: Use git to understand why code exists
  4. Research: Use brave-search for best practices
  5. Complex Tasks: Use sequential-thinking to plan approach

Token Optimization

  • Read only necessary files (ask which files before reading)
  • Use git log with --oneline for quick history
  • Summarize large files before suggesting changes
  • Prefer targeted searches over reading entire directories

MCP Environment Self-Test

Before starting work, verify the MCP environment is properly configured:

# Quick self-test of MCP environment
python scripts/test_mcp_environment.py

# Verbose output with details
python scripts/test_mcp_environment.py --verbose

# Test specific server only
python scripts/test_mcp_environment.py --server aistack-intelligence

What the self-test discovers automatically:

  • MCP servers configured in .cursor/mcp.json
  • Service dependencies (Ollama, Qdrant, etc.) from environment variables
  • Service health checks (HTTP endpoints)
  • Server configuration validation
  • Workspace accessibility

The script follows SOLID principles:

  • Single Responsibility: Each checker handles one concern
  • Open/Closed: Easy to add new service checkers without modifying existing code
  • Liskov Substitution: All checkers implement consistent interface
  • Interface Segregation: Separate concerns (discovery, checking, reporting)
  • Dependency Inversion: Depends on configuration abstraction, not hardcoded values

Read the full file on GitHub · 421 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. yesterday First seen · 421 lines · 2,545 tokens per session scan A 0eeda2bcc097

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository mjdevaccount/AIStack-MCP (2 stars, last pushed 2mo ago), licensed MIT. It adds 2,545 tokens to every session, about $0.0127 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-31.