agentleFS
foursecondfivefourfoursecondfivefour/aether-mcp-server/CLAUDE.md

aether-mcp-server

CLAUDE.md0 starsChanged 5 months agoMITArchived repositoryView on GitHub

Release: lto=fat, codegen-units=1, panic=abort, strip=symbols, target-cpu=native, CFG, ASLR, DEP, static CRT. All gates: AETHER_BCD_EDIT, AETHER_HAL_CONFIG, AETHER_OFFLINE_REGISTRY, AETHER_DLL_INJECT, AETHER_TOKEN_MANIPULATION, AETHER_LSA_SECRETS.

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 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.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All gates: AETHER_BCD_EDIT, AETHER_HAL_CONFIG, AETHER_OFFLINE_REGISTRY, AETHER_DLL_INJECT, AETHER_TOKEN_MANIPULATION, AETHER_LSA_SECRETS.

    line 95
  2. Very specific:

    NEVER use windows::core::* (shadows Result)

    line 99
  3. Distinctive:

    NEVER print to stdout (MCP uses it for JSON-RPC)

    line 100
  4. Distinctive:

    NEVER spawn cmd/powershell for system ops — use Win32 API

    line 101
  5. Very specific:

    ALWAYS use // SAFETY: comments on unsafe blocks

    line 102
  6. Very specific:

    ALWAYS .map_err(|e| AetherError::win32(e))?

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md — AETHER_01

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

Build

$env:CARGO_HOME = ".\.cargo_home"
cargo check    # verify
cargo build    # binary → target/debug/aether-mcp-server.exe

Release: lto=fat, codegen-units=1, panic=abort, strip=symbols, target-cpu=native, CFG, ASLR, DEP, static CRT.

Architecture

main.rs → dotenvy → 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) -> Result<String, AetherError>
error.rs  → AetherError + FormatMessageW FFI (Russian errors)
audit.rs  → log_success/failure/forced/security
config.rs → FeatureGates from .env (all disabled by default)

10 Tools

  1. process_control — list, kill, create, priority, threads, affinity, jobs, suspend, modules, DLL inject*
  2. file_system — read/write/delete, ACL, symlinks, ADS, EFS, quotas, volumes, shares
  3. registry_editor — read/write/delete/enumerate, security, monitor, offline mount*
  4. service_manager — list, start/stop/restart, config, triggers, failures, drivers
  5. gui_automation — mouse, keyboard, windows, screenshot, clipboard, display, audio
  6. system_info — CPU, memory, disk, OS, power, devices, BIOS, NTP, software, updates, BCD*
  7. network_manager — adapters, TCP/UDP, DNS, firewall, proxy, routing, WiFi, VPN, BT
  8. user_management — users, groups, sessions, policies, certificates, credentials, token*
  9. security_audit — audit, UAC, Defender, AppLocker, BitLocker, TPM, Secure Boot, exploit
  10. system_automation — Event Log, Scheduled Tasks, WMI queries
  • = disabled by default, enabled via .env feature gate

Key Patterns

Tool Registration

#[tool_router(router = tool_router)]
impl AetherServer {
    #[tool(description = "...")]
    async fn my_tool(&self, Parameters(args): Parameters<ActionParams>) -> String {
        tools::module::handle_*(&args.action, args.params)
            .unwrap_or_else(|e| format!("Error: {e}"))
    }
}
#[tool_handler(router = self.tool_router)]
impl ServerHandler for AetherServer { fn get_info(&self) -> ServerInfo { ... } }

Error Handling

// Validate params
let val = params.get("key").and_then(|v| v.as_str())
    .ok_or_else(|| AetherError::invalid_param("key required"))?;

// Force gate
check_force(&params)?;

// Windows API
unsafe { SomeWin32Call() }.map_err(|e| AetherError::win32(e))?;

// Audit
audit::log_success("tool", "action", "detail");

Feature Gates

server.gates.check(server.gates.dll_inject, "AETHER_DLL_INJECT")?;

All gates: AETHER_BCD_EDIT, AETHER_HAL_CONFIG, AETHER_OFFLINE_REGISTRY, AETHER_DLL_INJECT, AETHER_TOKEN_MANIPULATION, AETHER_LSA_SECRETS.

Conventions

  • NEVER use windows::core::* (shadows Result)
  • NEVER print to stdout (MCP uses it for JSON-RPC)
  • NEVER spawn cmd/powershell for system ops — use Win32 API
  • ALWAYS use // SAFETY: comments on unsafe blocks
  • ALWAYS .map_err(|e| AetherError::win32(e))? on Win32 calls
  • snake_case for Rust, camelCase for JSON, Russian for error messages
  • Log: tracing::info! to stderr with .with_ansi(false).with_writer(std::io::stderr)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.