Encoding-aware, indentation-smart file tools for AI coding agents.
agent-tool
MCP (Model Context Protocol) tool server for AI coding agents.
Why?
Built-in tools in AI coding agents (Claude Code, Cursor, Codex, etc.) have known limitations:
- Tab indentation breaks: LLMs output spaces, but your project uses tabs. The built-in Edit tool writes spaces as-is, corrupting your indentation style.
- Encoding corruption: Editing EUC-KR, Shift-JIS, or GB18030 files silently converts them to UTF-8, breaking legacy projects.
- Too many separate tools: Making the agent find, install, and configure Redis CLI, MySQL client, SSH client, etc. is tedious and error-prone. agent-tool bundles 50 tools into a single binary -- one install, everything works.
- No reverse engineering support: Built-in tools can't disassemble binaries, inspect PE/ELF headers, find function boundaries, or search cross-references. agent-tool includes static binary analysis (disassembly, xref, function detection), a DAP debugger, and CheatEngine-style memory tools -- giving your agent full reverse engineering capabilities.
- Network censorship: In some countries, government-level web filtering breaks plain
curl/wgetrequests. agent-tool uses ECH (Encrypted Client Hello) and DoH (DNS over HTTPS) by default to work around these restrictions.
agent-tool solves these by providing drop-in replacement tools that respect your project's conventions.
Supported Agents
Claude Code, Codex CLI, Cursor, Windsurf, Cline, Gemini CLI, and any MCP-compatible agent.
Features
| Tool | Description | Status |
|---|---|---|
| Edit | String replacement with smart indentation and encoding preservation (supports dry_run) | ✅ |
| Read | Encoding-aware file reading with flexible offset (integer, "N-M" range, [N,M] array) |
✅ |
| Write | Encoding-aware file creation/overwrite | ✅ |
| Grep | Encoding-aware regex content search with output modes (content/files_with_matches/count) and context lines (-B/-A/-C) | ✅ |
| Glob | File pattern matching with ** recursive support |
✅ |
| ListDir | Directory listing (flat or tree) | ✅ |
| Diff | Compare two files with unified diff output (encoding-aware) | ✅ |
| Patch | Apply unified diff patch to a file (supports dry_run) | ✅ |
| Checksum | Compute file hash (md5, sha1, sha256) | ✅ |
| FileInfo | File metadata (size, encoding, line ending, indentation, line count) | ✅ |
| Compress | Create zip / tar.gz archives | ✅ |
| Decompress | Extract zip / tar.gz archives (Zip Slip/Bomb protection) | ✅ |
| Backup | Timestamped zip backup with exclude patterns. dry_run preview with directory stats, pattern match counts, and largest files | ✅ |
| ConvertEncoding | Convert file encoding (EUC-KR ↔ UTF-8, add/remove BOM, etc.) | ✅ |
| Delete | Safe single-file deletion (no directories, no symlinks, system path protection, dry_run) | ✅ |
| Rename | Atomic file/directory rename or move (dry_run) | ✅ |
| SysInfo | System information — OS, CPU, RAM, disk, uptime, CPU usage measurement | ✅ |
| FindTools | Discover installed dev tools — compilers, runtimes, build systems (Go, .NET, Node, Python, Java, Rust, C/C++, etc.). Searches PATH, env vars, and known locations (~/bin, snap, scoop, Homebrew, SDKMAN, nvm, fnm, pyenv) | ✅ |
| ProcList | List running processes — PID, name, command line, memory. Sensitive args auto-masked. Filter by name or port | ✅ |
| ProcKill | Kill, suspend, or resume processes by PID or port. Tree kill, signal selection (kill/term/hup/int/stop/cont), zombie handling (Linux), dry_run | ✅ |
| ProcExec | Execute commands as new processes. Foreground/background/suspended start (Windows: CREATE_SUSPENDED, Linux: SIGSTOP). Timeout, env vars | ✅ |
| EnvVar | Read environment variables. Sensitive values (passwords, tokens) auto-masked | ✅ |
| Firewall | Read firewall rules — iptables/nftables/firewalld (Linux), netsh (Windows). Read-only | ✅ |
| SSH | Execute commands on remote servers via SSH. Password & key auth (PEM, OpenSSH, PuTTY PPK), session pooling, host key verification (strict/tofu/none), ProxyJump, IPv6 | ✅ |
| SFTP | Transfer files and manage remote filesystems over SSH. Upload, download, ls, stat, mkdir, rm, chmod, rename. Reuses SSH session pool. Max 2 GB per transfer | ✅ |
| Bash | Persistent shell sessions with working directory and environment variable retention. Session pooling (max 5, idle timeout 30 min). Unix: bash/sh, Windows: PowerShell/git-bash/cmd (auto-detected, best available). PowerShell sessions include UTF-8 encoding and PATH enhancement | ✅ |
| WebFetch | Fetch web content as text/Markdown. ECH (Encrypted Client Hello) + DoH (DNS over HTTPS) by default. HTML→Markdown auto-conversion. SSRF protectio |
Tools (5)
EditString replacement with smart indentation and encoding preservation.ReadEncoding-aware file reading with flexible offset.GrepEncoding-aware regex content search with output modes and context lines.SSHExecute commands on remote servers via SSH with session pooling.ProcListList running processes with sensitive argument masking.Configuration
{"mcpServers": {"agent-tool": {"command": "npx", "args": ["-y", "@knewstimek/agent-tool"]}}}