unifi-mcp-server / rules
Cursor rule294 starsChanged 18 days agoApache-2.0View on GitHub
This directory contains project-specific rules and guidelines for Cursor IDE AI assistants. These rules migrated from the legacy .cursorrules format to the current modular .mdc (Markdown Cursor) standard. Rules are organized by domain for better context-specific application: core-principles.mdc - Fundamental coding principles mcp-tools.mdc - MCP tool implementation patterns unifi-api.mdc - UniFi API integration guidelines project-context.mdc - Project overview and context workflow.mdc - Development workflow environment-setup.mdc - Configuration management common-mistakes.mdc - Best practices and pitfalls Cursor IDE automatically loads these rules…
We split this README.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 82
When adding new rules:
- Very specific: line 84
Create a new .mdc file with descriptive name
- Very specific: line 85
Add YAML frontmatter with description, globs, and alwaysApply
- Distinctive: line 86
Follow existing format and style
- Distinctive: line 87
Update this README with brief description
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cursor Rules for UniFi MCP Server
This directory contains project-specific rules and guidelines for Cursor IDE AI assistants. These rules migrated from the legacy .cursorrules format to the current modular .mdc (Markdown Cursor) standard.
File Organization
Rules are organized by domain for better context-specific application:
Core Rules (Always Applied)
core-principles.mdc - Fundamental coding principles
- Async-first development patterns
- Type safety and validation
- Security-first design
- Comprehensive testing requirements
- Documentation standards
mcp-tools.mdc - MCP tool implementation patterns
- Tool structure and organization
- Safety checks and confirm parameters
- Error handling patterns
- Cache invalidation strategies
unifi-api.mdc - UniFi API integration guidelines
- Authentication with API keys
- Cloud vs local gateway modes
- Rate limiting considerations
- Error handling patterns
- Official documentation references
Contextual Rules
project-context.mdc - Project overview and context
- Technology stack
- Architecture patterns
- File structure conventions
- Naming standards
workflow.mdc - Development workflow
- Git branching and commit practices
- Testing procedures
- Code quality checklist
- Pre-commit requirements
environment-setup.mdc - Configuration management
- Environment variables
- Configuration loading order
- Security best practices
common-mistakes.mdc - Best practices and pitfalls
- Common mistakes to avoid
- Quick command reference
- Key resources
- Reminders
How to Use
Cursor IDE automatically loads these rules based on:
- File patterns (
globs) - Rules apply when editing matching files - Always apply flag (
alwaysApply: true) - Rules always loaded regardless of context - File context - Rules apply when working in specific directories
Migration Notes
Migrated from legacy .cursorrules format on 2025-01-XX:
- Split monolithic rules into focused
.mdcfiles - Added metadata headers for better organization
- Maintained all original guidelines and patterns
- Improved discoverability with descriptive file names
Contributing
When adding new rules:
- Create a new
.mdcfile with descriptive name - Add YAML frontmatter with
description,globs, andalwaysApply - Follow existing format and style
- Update this README with brief description
Related Documentation
For more detailed guidelines, see:
docs/AI-Coding/AI_CODING_ASSISTANT.md- AI coding assistant guidelinesdocs/AI-Coding/AI_GIT_PRACTICES.md- Git best practicesAGENTS.md- Agent guidelines and rulesCONTRIBUTING.md- General contribution guidelines
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/fastmcp/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/fastmcp/CLAUDE.mdCLAUDE.md
- .cursor/rules/common-mistakes.mdcCursor rule
- .cursor/rules/core-principles.mdcCursor rule
- .cursor/rules/environment-setup.mdcCursor rule
- .cursor/rules/mcp-tools.mdcCursor rule
- .cursor/rules/project-context.mdcCursor rule
- .cursor/rules/unifi-api.mdcCursor rule
- .cursor/rules/workflow.mdcCursor rule
- FastMCP DevelopmentSkill
- mcp-builderSkill
- source-command-build-dockerSkill
- source-command-check-depsSkill
- source-command-cleanSkill
- source-command-docsSkill
- source-command-formatSkill
- source-command-lintSkill
- source-command-prSkill
- source-command-securitySkill
- source-command-setupSkill
- source-command-testSkill
- source-command-unifi-api-docs-update-2Skill
- source-command-unifi-api-docs-updateSkill
- source-command-unifi-mcp-add-toolSkill
- source-command-unifi-mcp-release-prepSkill
- source-command-unifi-mcp-test-coverageSkill
- source-command-unifi-mcp-update-docsSkill
- unifi-cloud-fleet-toolsSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-protect-toolsSkill
- unifi-security-toolsSkill
- FastMCP DevelopmentSkill
- mcp-builderSkill
- unifi-cloud-fleet-toolsSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-protect-toolsSkill
- unifi-security-toolsSkill
- unifiSkill
- unifi-channel-planningSkill
- unifi-cloud-fleet-toolsSkill
- unifi-devicesSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-networkSkill
- unifi-protect-toolsSkill
- unifi-securitySkill
- unifi-security-toolsSkill
- unifi-systemSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

