unifi-mcp-server / rules
Cursor rule294 starsChanged 18 days agoApache-2.0View on GitHub
Project context and technology stack overview
- Reads credentials
We split this project-context.mdc into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Follow the development workflow and coding standards documented in these files
- Very specific: line 61
Python files: Use snake_case (e.g., device_manager.py)
- Very specific: line 62
Classes: Use PascalCase (e.g., UniFiClient)
- Very specific: line 63
Functions/variables: Use snake_case (e.g., get_devices())
- Very specific: line 64
Constants: Use UPPER_SNAKE_CASE (e.g., DEFAULT_TIMEOUT)
≈ “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
--- description: Project context and technology stack overview globs: ["**/*.py", "**/*.md"] alwaysApply: false --- # Project Context ## Project Overview You are an expert Python developer working on a production-grade MCP (Model Context Protocol) server for UniFi Network Controller integration. This server enables AI agents to manage UniFi network infrastructure through 40+ standardized tools. ## AI Assistant Guidelines - Project-specific guidance for AI coding assistants is in `CLAUDE.md` and `AGENTS.md` - Follow the development workflow and coding standards documented in these files - Maintain consistency across all AI-assisted development ## Technology Stack **Core Technologies:** - Python 3.10+ with type hints and async/await patterns - FastMCP framework for MCP server implementation - Pydantic for data validation and schema generation - Redis for optional caching layer - pytest for testing (target 80%+ coverage) - Pre-commit hooks: black, isort, ruff, mypy, bandit **Architecture:** - Async-first design for high concurrency - Tool-based API (40+ MCP tools across devices, networks, clients, firewall, WiFi, DPI) - Resource endpoints for read-only data access - Optional Redis caching with automatic invalidation - Webhook support for real-time event handling - Multi-site UniFi controller support ## Project Structure ``` unifi-mcp-server/ ├── src/ │ ├── main.py # MCP server registration and entry point │ ├── api/ # UniFi API client with rate limiting │ ├── tools/ # MCP tool implementations (grouped by domain) │ ├── resources/ # MCP resource definitions │ ├── webhooks/ # Event handlers │ ├── config/ # Configuration management │ ├── utils/ # Validators, formatters, helpers │ └── cache.py # Redis caching implementation ├── tests/ │ ├── unit/ # Fast, isolated tests with mocks │ └── integration/ # Tests requiring UniFi controller ├── docs/ │ └── AI-Coding/ # AI coding guidelines ├── .env.example # Environment variable template └── pyproject.toml # Dependencies and project config ``` ## File Naming Conventions - **Python files:** Use `snake_case` (e.g., `device_manager.py`) - **Classes:** Use `PascalCase` (e.g., `UniFiClient`) - **Functions/variables:** Use `snake_case` (e.g., `get_devices()`) - **Constants:** Use `UPPER_SNAKE_CASE` (e.g., `DEFAULT_TIMEOUT`) - **Test files:** Prefix with `test_` (e.g., `test_device_manager.py`) ## Version **UniFi MCP Server v0.1.2** Python 3.10+ | FastMCP | Async-first Architecture
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/README.mdCursor 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.

