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

aether-mcp-server

AGENTS.md0 starsChanged 5 months agoMITArchived repositoryView on GitHub

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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.

The file

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

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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. Distinctive:

    All errors are human-readable Russian with hints.

    line 110
  2. Very specific:

    NEVER use cmd.exe or powershell.exe to perform system operations — use Win32 API directly

    line 135
  3. Distinctive:

    NEVER print to stdout — MCP uses stdout for JSON-RPC exclusively

    line 136
  4. Distinctive:

    ALWAYS canonicalize file paths before operations

    line 137
  5. Very specific:

    ALWAYS check force: true for dangerous operations

    line 138
  6. Very specific:

    ALWAYS audit-log via audit::log_* functions

    line 139
  7. Very specific:

    NEVER modify mcp.json or .env without explicit user request

    line 140

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

AGENTS.md — AETHER_01

Project Identity

  • Name: AETHER_01
  • Type: MCP (Model Context Protocol) server over stdio
  • Language: Rust (edition 2021, stable 1.85+)
  • Target: Windows 10/11 x86-64 MSVC only
  • Transport: stdio (no HTTP, no SSE)

Stack

DependencyVersionPurpose
rmcp0.5Official MCP Rust SDK — server, tools, transport
windows0.58Win32 API bindings (50+ features)
windows-registry0.3High-level registry access
tokio1Async runtime
serde / serde_json1JSON serialization
schemars0.8JSON Schema generation for MCP tool params
tracing0.1Structured logging
dotenvy0.15.env loading
thiserror2Error derive macros
chrono0.4Timestamps
base640.22Binary encoding (screenshots)

Build

# Dev check
$env:CARGO_HOME = ".\.cargo_home"
cargo check

# Dev build
cargo build

# Release build (hardened: CFG, ASLR, DEP, static CRT, LTO, strip)
cargo build --release

Architecture

main.rs
  ├── dotenvy::dotenv()         # Load .env
  ├── tracing_subscriber::fmt() # stderr, no ANSI
  ├── FeatureGates::load()
  ├── AetherServer::new(gates)
  └── serve((stdin, stdout)).await

server.rs
  ├── struct AetherServer { gates, tool_router: ToolRouter<Self> }
  ├── #[tool_router(router = tool_router)]   # 10 tool methods
  └── #[tool_handler(router = self.tool_router)]  # ServerHandler metadata

tools/*.rs
  ├── pub fn handle_*(action, params) -> Result<String, AetherError>
  └── Dispatch: match action { "list" => ..., "kill" => ..., ... }

error.rs
  ├── enum AetherError (thiserror)
  ├── FormatMessageW FFI → win32_description(code: u32) -> String
  └── helpers: invalid_param, permission_denied, not_found, win32, feature_disabled, wmi_error, internal

Key Patterns

Tool registration (rmcp 0.5)

#[derive(Clone)]
pub struct AetherServer {
    pub gates: FeatureGates,
    tool_router: ToolRouter<Self>,  // field name matches router attribute
}

#[tool_router(router = tool_router)]
impl AetherServer {
    #[tool(description = "...")]
    async fn tool_name(&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 { ... }

Dangerous operations

fn check_force(params: &Value) -> Result<(), AetherError> {
    if !params.get("force").and_then(|v| v.as_bool()).unwrap_or(false) {
        return Err(AetherError::permission_denied("Это опасная операция. Используйте `\"force\": true`."));
    }
    Ok(())
}

Feature gates (from .env)

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

Error handling

All errors are human-readable Russian with hints. Win32 codes auto-translated via FormatMessageW.

Conventions

  • File layout: One tool = one file in src/tools/
  • Naming: snake_case for Rust, camelCase for JSON keys
  • unsafe: #![allow(unsafe_code)] per module, each block has // SAFETY: comment
  • Logging: tracing::info! / warn! / error! to stderr only
  • MCP transport: stdout is JSON-RPC ONLY — never print to stdout

Testing

# Compile check
cargo check

# Run (manually — test via MCP client)
cargo run

# Lint
cargo clippy -- -D clippy::all -D clippy::pedantic

Notes for AI Agents

  • NEVER use cmd.exe or powershell.exe to perform system operations — use Win32 API directly
  • NEVER print to stdout — MCP uses stdout for JSON-RPC exclusively
  • ALWAYS canonicalize file paths before operations
  • ALWAYS check force: true for dangerous operations
  • ALWAYS audit-log via audit::log_* functions
  • NEVER modify mcp.json or .env without explicit user request

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.