

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# UniFi MCP Server - Claude Instructions23This file provides project-specific instructions for AI coding assistants working on the UniFi MCP Server.45## Project Overview67The UniFi MCP Server is a Model Context Protocol (MCP) server that exposes the UniFi Network Controller API, enabling AI agents and applications to interact with UniFi network infrastructure in a standardized way.89**Current Version**: v0.2.310**Python Version**: 3.10+11**Framework**: FastMCP1213## Quick Start for AI Assistants1415### Before Starting Work16171. **Read Key Documentation**:18 - `README.md` - Project overview and features19 - `AGENTS.md` - Universal AI agent guidelines20 - `DEVELOPMENT_PLAN.md` - Roadmap and priorities21 - `TODO.md` - Current tasks and phase breakdown22 - `API.md` - Complete MCP tool documentation23242. **Understand the Architecture**:25 - `src/main.py` - MCP server entry point26 - `src/api/` - UniFi API client27 - `src/models/` - Pydantic data models28 - `src/tools/` - MCP tool implementations29 - `tests/unit/` - Unit tests (1,156 tests passing)3031### Development Workflow32331. **Feature Development**:34 - Create feature branch: `git checkout -b feature/your-feature`35 - Follow TDD: Write tests first, then implementation36 - Maintain 80% minimum test coverage for new code37 - Use Pydantic models for all data structures38 - Add comprehensive docstrings (Google style)39402. **Code Quality**:41 - Run tests: `pytest tests/unit/`42 - Format: `black src/ tests/` and `isort src/ tests/`43 - Lint: `ruff check src/ tests/ --fix`44 - Type check: `mypy src/`45 - Pre-commit: `pre-commit run --all-files`46473. **Safety Mechanisms**:48 - All mutating operations require `confirm=True`49 - Implement dry-run mode for preview50 - Add audit logging for operations51 - Validate all user inputs52 - Never commit secrets or credentials5354### Technology Stack5556- **Language**: Python 3.10+57- **Framework**: FastMCP (MCP server framework)58- **API Client**: httpx (async HTTP)59- **Data Validation**: Pydantic v260- **Testing**: pytest with asyncio support61- **Caching**: Redis (optional)62- **Monitoring**: agnost.ai (optional)6364### API Modes6566The server supports three UniFi API access modes:67681. **Local Gateway API** (Recommended): Full feature support69 - `UNIFI_API_TYPE=local`70 - `UNIFI_LOCAL_HOST=192.168.2.1`71722. **Cloud V1 API**: Stable, aggregate statistics only73 - `UNIFI_API_TYPE=cloud-v1`74753. **Cloud EA API**: Early Access, aggregate statistics only76 - `UNIFI_API_TYPE=cloud-ea`7778### Current Development Focus7980**Version 0.2.3** (Current):8182- ✅ P1 API bug fixes (QoS audit_action, Site Manager decorator, Topology warnings, Backup client methods)83- ✅ P2 RADIUS & Guest Portal — Complete CRUD (get/update for RADIUS accounts and hotspot packages)8485**Version 0.2.2** (Complete ✅):8687- ✅ Port Profile & Switch Port Management (8 tools)88- ✅ Security hardening (dependency updates, PII removal)89- ✅ API endpoint fixes (RADIUS, firewall, WLAN, network)90- ✅ Bug fixes (dry_run, list handling, type hints)9192**Version 0.2.0** (Complete ✅):9394- ✅ Zone-Based Firewall (7 working tools)95- ✅ Traffic Flow Monitoring (15 tools)96- ✅ Advanced QoS (11 tools)97- ✅ Backup & Restore (8 tools)98- ✅ Multi-Site Aggregation (4 tools)99- ✅ ACL & Traffic Filtering (7 tools)100- ✅ Site Management (9 tools)101- ✅ RADIUS & Guest Portal (10 tools — full CRUD)102- ✅ Network Topology (5 tools)103104**Total**: 86+ MCP tools, 1,156 tests passing105106### Important Constraints1071081. **UniFi Network 9.0+ Required**: Some features require Network 9.0+1092. **Local API Recommended**: Cloud APIs have limited functionality1103. **Endpoint Verification**: Some documented API endpoints may not exist in all versions1114. **Testing**: Integration tests require real UniFi hardware112113### Getting Help114115- **Issues**: [GitHub Issues](https://github.com/enuno/unifi-mcp-server/issues)116- **Documentation**: See `API.md` for complete tool reference117- **Examples**: Check `docs/examples/` for AI assistant prompts118119## Key Principles1201211. **Safety First**: Never perform destructive operations without confirmation1222. **Quality Over Speed**: Maintain high test coverage and code quality1233. **Clarity**: Write self-documenting code with clear docstrings1244. **Consistency**: Follow existing patterns and conventions1255. **Security**: Never commit credentials, validate all inputs126127## Additional Resources128129- [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines130- [SECURITY.md](SECURITY.md) - Security policy and best practices131- [AGENTS.md](AGENTS.md) - Detailed AI agent guidelines132- [TESTING_PLAN.md](docs/archive/TESTING_PLAN.md) - Testing strategy133- [DEVELOPMENT_PLAN.md](DEVELOPMENT_PLAN.md) - Complete roadmap134135---136137**Last Updated**: 2026-02-18138**Maintained By**: Development Team139
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| enuno/unifi-mcp-server.claude/skills/fastmcp/CLAUDE.md · 226 | CLAUDE.md | no sections | 25/100 | today | |
| enuno/unifi-mcp-server.clinerules · 226 | Cline rules | setuptestlint-formatstyle+10 | 96/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/common-mistakes.mdc · 226 | Cursor rules | testlint-formatgitdo-not | 93/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/core-principles.mdc · 226 | Cursor rules | teststyletypestesting-strategy+3 | 59/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/environment-setup.mdc · 226 | Cursor rules | setupgitsecurityapi+2 | 57/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/mcp-tools.mdc · 226 | Cursor rules | no sections | 45/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/project-context.mdc · 226 | Cursor rules | testlint-formatstylearch+2 | 73/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/unifi-api.mdc · 226 | Cursor rules | setupsecurityapiui+1 | 62/100 | today | |
| enuno/unifi-mcp-server.cursor/rules/workflow.mdc · 226 | Cursor rules | testlint-formatgitagent-behaviour | 86/100 | today | |
| enuno/unifi-mcp-server.cursorrules · 226 | .cursorrules | setuptestlint-formatstyle+7 | 93/100 | today | |
| enuno/unifi-mcp-serverAGENTS.md · 226 | AGENTS.md | setuptestlint-formatstyle+10 | 84/100 | today | |
| enuno/unifi-mcp-serverGEMINI.md · 226 | GEMINI.md | setuptestlint-formatstyle+8 | 89/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| dotCMS/corecore-web/libs/sdk/react/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 14 days ago | |
| dotCMS/corecore-web/libs/sdk/client/CLAUDE.md · 949 | CLAUDE.md | setupbuildtestlint-format+9 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/enuno-unifi-mcp-server-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.