aether-mcp-server / rules
Cursor rule0 starsChanged 5 months agoMITArchived repositoryView on GitHub
Release build is hardened: lto=fat, codegen-units=1, panic=abort, strip=symbols, target-cpu=native, control-flow-guard=yes, /DYNAMICBASE, /NXCOMPAT, /HIGHENTROPYVA, +crt-static. All dangerous gates default to 0 in .env.example. Gate names: AETHER_BCD_EDIT, AETHER_HAL_CONFIG, AETHER_OFFLINE_REGISTRY, AETHER_DLL_INJECT, AETHER_TOKEN_MANIPULATION, AETHER_LSA_SECRETS. AETHER_01 echo tests: process_control.list, service_manager.list, system_info.cpu_info, gui_automation.mouse_position, network_manager.adapters.
- Reads credentials
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 4,263 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 repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- aether-windows-mcpSkill
The file
We split this aether-mcp.mdc into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Sensitive files: NEVER modify mcp.json or .env without explicit user request
- Very specific: line 59
Add a new match arm in tools/<tool>.rs in the handle_* function
- Very specific: line 70
All dangerous gates default to 0 in .env.example.
- Very specific: line 74
Use AetherError::invalid_param(), .permission_denied(), .not_found(), .win32()
- Distinctive: line 75
All errors are Russian with Win32 code translation via FormatMessageW
- Very specific: line 84
Never use cmd.exe/powershell.exe for system ops — use Win32 API directly
- Distinctive: line 85
Always canonicalize file paths before operations
≈ “Common” is an estimate: at least 1 in 5 of the 7,111 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:
globs: **/*.rs, **/*.toml, AGENTS.md, SECURITY.md, README.md
alwaysApply: false
---
# AETHER_01 — Cursor Rules
## Project Identity
- **Name**: AETHER_01
- **Type**: MCP server over stdio, 10 tools, 99% Windows management
- **Language**: Rust (edition 2021, stable 1.85+)
- **Target**: Windows 10/11 x86-64 MSVC only
- **Transport**: stdio — stdout is JSON-RPC ONLY, never print to stdout
- **Sensitive files**: NEVER modify `mcp.json` or `.env` without explicit user request
## Stack
| Dependency | Version | Purpose |
|-----|---|---|
| `rmcp` | 0.5 | Official MCP Rust SDK |
| `windows` | 0.58 | Win32 API bindings (50+ features) |
| `windows-registry` | 0.3 | High-level registry access |
| `tokio` | 1 | Async runtime |
| `serde` / `serde_json` | 1 | JSON serialization |
| `schemars` | 0.8 | JSON Schema for MCP tool params |
| `tracing` | 0.1 | Structured logging (stderr only, ansi=false) |
| `dotenvy` | 0.15 | .env loading |
## Build
```powershell
$env:CARGO_HOME = ".\.cargo_home"
cargo check # fast verify
cargo build # binary in target/debug/
```
**Release build** is hardened: `lto=fat, codegen-units=1, panic=abort, strip=symbols, target-cpu=native, control-flow-guard=yes, /DYNAMICBASE, /NXCOMPAT, /HIGHENTROPYVA, +crt-static`.
## Architecture
```
main.rs → dotenvy::dotenv() → FeatureGates → AetherServer → serve((stdin,stdout))
server.rs: AetherServer { gates, tool_router }
#[tool_router(router = tool_router)] → 10 tools
#[tool_handler(router = self.tool_router)] → ServerHandler
tools/*.rs → pub fn handle_*(action, params) → match action { ... }
error.rs → AetherError enum + FormatMessageW FFI (Russian messages)
audit.rs → log_success / log_failure / log_forced / log_security
```
## Essential Patterns
### Adding a new action to an existing tool
1. Add a new match arm in `tools/<tool>.rs` in the `handle_*` function
2. Validate params: `params.get("key").and_then(|v| v.as_str())`
3. For dangerous ops: `check_force(¶ms)?`
4. Log via `audit::log_success("tool_name", "action_name", "detail")`
5. Return `serde_json::json!({...}).to_string()`
### Feature gates
```rust
server.gates.check(server.gates.dll_inject, "AETHER_DLL_INJECT")?;
```
All dangerous gates default to `0` in `.env.example`. Gate names: `AETHER_BCD_EDIT`, `AETHER_HAL_CONFIG`, `AETHER_OFFLINE_REGISTRY`, `AETHER_DLL_INJECT`, `AETHER_TOKEN_MANIPULATION`, `AETHER_LSA_SECRETS`.
### Error handling
- Use `AetherError::invalid_param()`, `.permission_denied()`, `.not_found()`, `.win32()`
- All errors are Russian with Win32 code translation via FormatMessageW
- Windows API calls: `.map_err(|e| AetherError::win32(e))?`
### Conventions
- `snake_case` for Rust, `camelCase` for JSON keys
- `#![allow(unsafe_code)]` per module, `// SAFETY:` on every unsafe block
- Documentation on every public item
- `cargo fmt` before commit, `cargo clippy -- -D clippy::all -D clippy::pedantic`
- Never use `cmd.exe`/`powershell.exe` for system ops — use Win32 API directly
- Always canonicalize file paths before operations
## Testing
```powershell
cargo check # fast compile check
cargo run # manual test via MCP client
cargo clippy -- -D clippy::all -D clippy::pedantic
```
AETHER_01 echo tests: `process_control.list`, `service_manager.list`, `system_info.cpu_info`, `gui_automation.mouse_position`, `network_manager.adapters`.
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.

