@tenantegroup/ai-rules-mcp
v1.2.0
Published
Unified MCP server providing AI coding rules for Cloudflare Backend, Nuxt Frontend, Flutter Client, and dotNET MAUI stacks with smart context filtering
Maintainers
Readme
🎯 Unified AI Rules MCP Server (@tenantegroup/ai-rules-mcp)
Model Context Protocol (MCP) server providing structured, production-tested AI coding rules for Cloudflare Backend, Nuxt Frontend, Flutter Client, and .NET MAUI Client stacks.
By dynamically scanning your current task, files, and keywords, it selects only the rules relevant to your active session. This achieves a ~75% token footprint reduction and prevents conflicting instructions between frontend, mobile, and backend paradigms (e.g., stopping mobile SQLite rules from polluting a Cloudflare D1 worker context).
⚡ Key Features
- Smart Context Filtering: Dynamically evaluates stack requirements, stripping out dotNET rules during Flutter sessions and vice-versa.
- Interactive AI Scaffolder: Integrates the
install_rules_to_projecttool. Running this inside any repository auto-detects the tech stack and copies appropriate.ai/rules, static compilers, and pre-commit Git validators. - Multi-Agent Support: Out-of-the-box support for all major modern AI development interfaces.
- Obsidian Vault Synced: The source of truth rules are maintained in a structured Obsidian vault/ folder right in the repository, making it easy to version-control documentation alongside the MCP code.
🛠️ Supported Stacks
- Cloudflare Backend: Workers runtime edge parity, Drizzle ORM, D1 SQLite, Workflows (durable sagas), KV storage, R2 bucket storage, and Durable Objects.
- Nuxt Frontend: Nuxt 4 directories, Pinia reactive state, layout routing, and client-side API integrations.
- Flutter Client: Riverpod state management, GoRouter, Retrofit clients, and Drift SQLite databases.
- dotNET Client: .NET MAUI UI shell, XAML layouts, MVVM pattern (CommunityToolkit), Refit HTTP clients, and sqlite-net.
🚀 Installation
Ensure you have Node.js (version 18 or higher) installed, then install the package globally:
npm install -g @tenantegroup/ai-rules-mcp⚙️ Configuration for Coding Agents
1. Claude Desktop (macOS & Windows)
Add the server to your desktop client configuration:
- Configuration File Location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- JSON Configuration:
{ "mcpServers": { "ai-rules": { "command": "ai-rules-mcp" } } } - To Apply: Restart the Claude Desktop application.
2. Claude Code (CLI)
Claude Code supports direct command-line utility configurations.
- Using the CLI (Recommended):
Run the interactive setup wizard in your terminal:
claude mcp add --transport stdio ai-rules ai-rules-mcp - Manual Setup:
Open or create
~/.claude.jsonand add the configuration under themcpServersblock:{ "mcpServers": { "ai-rules": { "command": "ai-rules-mcp", "args": [] } } } - Verify Configuration: Check connection status by running
claude mcp list.
3. GitHub Copilot (CLI & IDEs)
GitHub Copilot handles MCP integrations across CLI contexts and IDE extension layers.
- Using the Copilot CLI:
Run the helper tool to bind the server:
(Follow the interactive terminal wizard to selectcopilot mcp addstdiotype, name itai-rules, and enterai-rules-mcpas the command.) - Manual CLI Config Location: Saved in
~/.copilot/mcp-config.json. - VS Code / Visual Studio:
Click the Configure Tools gear icon inside the Copilot Chat pane, navigate to the MCP config panel, and add a local command server pointing to
ai-rules-mcp. - Repository-Level (GitHub.com): Go to your repository Settings ➔ Copilot (under Code & Automation) ➔ MCP Servers to configure server hooks globally for your team's Copilot workspace.
4. Antigravity CLI (agy)
The Google Antigravity developer environment natively integrates local and remote MCP hosts.
- Configuration File Location:
- Global Settings:
~/.gemini/antigravity-cli/mcp_config.json - Workspace-local Settings:
.agents/mcp_config.json(inside your project directory)
- Global Settings:
- JSON Configuration:
{ "mcpServers": { "ai-rules": { "command": "ai-rules-mcp", "args": [] } } } - TUI Management:
Launch
agyin your terminal and type/mcpto open the Interactive MCP Manager to check statuses and reload configurations.
5. Pi Coding Agent
Pi manages external toolsets via the pi-mcp-adapter.
- Step 1: Install the Adapter:
pi install npm:pi-mcp-adapter - Step 2: Configuration File Location:
- Global:
~/.pi/agent/mcp.json - Project-local:
.pi/mcp.json(overrides global preferences)
- Global:
- JSON Configuration:
{ "mcpServers": { "ai-rules": { "command": "ai-rules-mcp", "args": [] } } } - Step 3: Verification:
Open the Pi REPL and use
/mcp setupto auto-detect and register the server, or type/mcpto list active tools.
📖 Available Tools
get_relevant_rules(task_description, file_types, keywords, include_all): Evaluates task context, filters irrelevant tech stacks, and returns matching standards.get_rule_by_name(rule_name): Directly retrieves a specific rule (e.g.,flutter/riverpod,cloudflare/workflows).search_rule_content(query, case_sensitive): Performs a regex search inside the contents of all rule files.list_all_rules(): Lists all rule titles grouped by target technology stack.install_rules_to_project(target_dir, stack): Scaffolds the.ai/settings folder, copies rule files, and drops git validator scripts into the specified project root directory.
📁 Obsidian Vault Structure
The rules served by this MCP server are maintained in the vault/ folder of this repository. This folder is structured to be opened directly as an Obsidian vault:
00 - Core Standards/— General software engineering and reviewer standards.01 - Cloudflare Backend Stack/— Workers, Workflows, and D1 configuration standards.02 - Nuxt Frontend Stack/— Nuxt 4 and Vue configurations.03 - Flutter Client Stack/— Dart and Riverpod layouts.04 - dotNET Client Stack/— C# and .NET MAUI layouts.99 - Master Index.md— The central map linking all manual entries.
📄 License
This project is licensed under the MIT License. See LICENSE (if present) or package.json for details.
