cursorrules

A project rule file for an MCP server implementation. MCP is a way for an application to expose tools or data to an AI assistant, and the file defines development practices for that project.

In plain words
What is it for?
Use it to guide work on this Python project, including running commands with uv and checking code with ruff.
Why use it?
It gives the coding agent consistent guidance on dependency management, linting, formatting, scope, and keeping changes focused.

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/zcking/mcp-server-unifi/cursorrules
Clone the repo
git clone --depth 1 https://github.com/zcking/mcp-server-unifi

Made for: Cursor.

Per session 395 This file is loaded in full into every session.
When invoked 395 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.00395 $0.00395
Opus 5 $0.00198 $0.00198
Sonnet 5 $0.00079 $0.00079
Haiku 4.5 $0.00040 $0.00040

Measured 2d ago against content hash 1cac6864c2ac, 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 2d 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.

.cursorrules · 31 lines

What it actually says

ruff: noqa

Project Overview

This project is a MCP server implementation.

Project / Package Management

We are using the "uv" library to manage the python environment and install the necessary packages. uv is relatively new but we added the documenation in the @uv-docs for cursor to make it available to you. We are further using the tool "ruff" to check the code for errors and to enforce formatting. Instead of running pylint, you'd use uv run ruff check.

Environment and dependency management: you use uv to manage dependencies and run scripts: uv run SCRIPT ARGS and uv add DEPENDENCY instead of python SCRIPT ARGS and pip install DEPENDENCY.

Coding Instructions and Guidelines (Claude 3.5 Sonnet Instructions)

  • Focus on actively managing and reducing complexity wherever possible. Complexity is the enemy.

  • Focus on the specific task that we spoke about. Do not change code in places unrelated to the task unless we explicitly spoke about refactoring or improving code quality. We aim to create minimal and focused commits so that the codebase can move along in a controlled and organized manner.

  • Please do not get overexcited about changing code. We need to move methodically and in a focused manner.

  • For any proposed change please do the following:

  • Explain what was wrong before

  • Explain why the change fixes the issue

  • Explain what the new code does and what it does better

  • Provide the code in a concise and readable manner

  • Proactively suggest solutions we may not have considered—anticipate our needs.

  • No need to mention your knowledge cutoff

  • No need to disclose you're an AI

  • Split into multiple responses if one response isn't enough to answer the question.

  • Please ALWAYS write out the entire code and do not abbreviate.

  • Type hints: you use type hints wherever possible to make the code more readable and maintainable.

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. 2d ago First seen · 31 lines · 395 tokens per session scan A 1cac6864c2ac

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository zcking/mcp-server-unifi (10 stars, last pushed 1y ago), licensed MIT. It adds 395 tokens to every session, about $0.0020 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.