AX Local Operations MCP Server
AX Local Operations MCP Server gives LLM/MCP clients secure, cross-platform local file, command, and task-management capabilities.
Read/write/list/create/delete files and directories, resolving relative paths against a working directory.
Perform line-level file edits (insert, delete, replace, append) with automatic backups.
Search file contents with regex, file-type filters, depth limits, timeouts, and ignore patterns.
Compare files, compute MD5/SHA1/SHA256/SHA512 hashes, and manage Unix/Windows file permissions.
Compress/extract ZIP, TAR, GZ, and TAR.GZ archives.
Watch files/directories for create/delete/modify events.
Execute shell commands with timeouts, output limits, policy checks, confirmation, and sudo support.
Manage tasks with priorities, due dates, subtasks, and progress tracking.
Query/format time across time zones and formats.
Store/read persistent environment memory in a .env file.
Manage default/working directories and return structured machine-readable outputs.
Configure Linux passwordless sudo via sudoers generation/install/test/removal with dry-run support.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AX Local Operations MCP Server search for 'TODO' in the /src directory and show the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AX本地操作 MCP 服务器
版本 2.8.0 · Node.js ≥ 18 · Windows / macOS / Linux
为大模型应用提供安全的本地操作能力:文件读写、行级编辑、搜索、比较、哈希、权限、压缩、监控、命令执行和任务管理。
快速开始
npx(推荐,无需安装)
{
"mcpServers": {
"ax_local_operations": {
"command": "npx",
"args": ["-y", "ax-local-operations-mcp"]
}
}
}本地安装
npm install -g ax-local-operations-mcp{
"mcpServers": {
"ax_local_operations": {
"command": "ax-local-operations-mcp"
}
}
}安装脚本会自动创建默认工作目录 ~/axlocalop/workspace(非交互,不会阻塞安装)。
如需自行选择目录,运行 npm run setup:workspace 启动交互式向导;
也可在单次调用中通过 working_directory 参数指定,或用 workspace_manager 工具切换。
Related MCP server: MCP Shell Server
工具列表
工具名 | 说明 | 平台 |
| 文件读写、列出、创建目录、删除 | 全平台 |
| 行级编辑(插入、删除、替换、追加) | 全平台 |
| 正则/关键词内容搜索 | 全平台 |
| 文件差异对比 | 全平台 |
| MD5/SHA256 等哈希计算 | 全平台 |
| 权限读写(chmod / attrib / icacls) | 全平台 |
| 压缩/解压(zip/tar/gzip) | 全平台¹ |
| 文件/目录变更监控 | 全平台 |
| 执行系统命令(pwsh / bash) | 全平台 |
| 任务创建与跟踪 | 全平台 |
| 时间查询与格式化 | 全平台 |
| 持久化环境信息存储 | 全平台 |
| 工作目录管理 | 全平台 |
| sudo 无密码配置助手 | Linux 专用 |
¹ Windows 需要
zip/unzip/tar/gzip在 PATH 中(Git Bash、WSL 或手动安装)。
安全策略
路径安全:
securityValidator.resolveAndAssert()阻止相对路径逃逸出工作目录;拒绝路径中的隐藏目录组件(如../.hidden/file),但允许.env等点文件。命令安全:仅拦截不可恢复的极危险命令(如
format C:、rm -rf /);Agent 全控授权模式下无警告摩擦。所有外部命令(sudo、icacls、attrib、tar等)统一用参数数组调用,不拼接 shell 字符串;sudoers 配置名、用户名、命令列表与 ACL 用户名/权限串均有白名单校验。工作目录注入:分发层会在未显式传入时自动注入
working_directory,作为相对路径的解析基准;显式绝对路径不受该目录限制(仍受隐藏目录规则约束)。输出合规:所有工具只返回 MCP 合法的
text内容块;JSON 以文本承载,机器可读数据放在structuredContent。声明了outputSchema的工具在成功时必定返回structuredContent。
工作目录管理
通过 workspace_manager 工具切换(参数中的任意文本都不会被当作指令解析):
{ "name": "workspace_manager", "arguments": { "operation": "set_temp", "workspace_path": "/path/to/project" } }
{ "name": "workspace_manager", "arguments": { "operation": "status" } }也可对单次调用传 working_directory,或用 --default-dir /path/to/project 设置默认工作目录。
详见 WORKSPACE_MANAGEMENT.md。
开发
npm install # 安装依赖
npm start # 启动 MCP 服务器(stdio)
npm test # e2e + 集成 + 真实 stdio 冒烟测试
npm run test:e2e # 仅端到端行为测试
npm run test:stdio # 仅真实 MCP 客户端握手测试
node test/runTests.js # 完整测试套件(报告写入 test/reports/)
npm run setup:workspace # 交互式选择默认工作目录
npm run release # 本地手动跑 semantic-release(需有效 npm 凭据 + Conventional Commits)CI 自动发布目前默认关闭:仓库未设置
ENABLE_NPM_RELEASE=true,push 到main只会产生跳过的 run,不会发布。现有NPM_TOKEN已失效(npm whoami返回 401),恢复发版需先更新 npm 凭据或改用 OIDC trusted publishing,再在仓库 Variables 中设置该开关;详见.github/workflows/release.yml。
添加新工具
创建
tools/newTool.js,导出带constructor(securityValidator)和async handle(args)的类。在
tools/registry.js中导入、实例化、添加描述符。详见
tools/tools_dev_guide.md。
平台兼容性
平台 | 支持状态 |
Windows 10/11 | ✅ 完全支持(PowerShell 7 / pwsh) |
macOS | ✅ 完全支持 |
Linux | ✅ 完全支持(含 sudo_config) |
许可证
MIT
Available Tools
13 toolsenvironment_memoryADestructive
环境记忆:读取、更新和获取环境变量。环境变量存储在 ~/.local_file_operations/.env 文件中。
示例:读取全部 { "operation": "read", "output_format": "json" } 示例:设置变量 { "operation": "update", "key": "PROJECT_PATH", "value": "/project" }
Inputs: operation (required), key, value, output_format. Returns: key, value, operation
execute_commandADestructive
命令执行:在系统中执行shell命令。支持管道、重定向,集成命令策略评估和sudo配置。
示例:列出文件 { "command": "ls -la", "output_format": "json" } 示例:带工作目录执行 { "command": "npm test", "working_directory": "/project", "timeout_ms": 120000 }
Inputs: command (required), working_directory, confirm, timeout_ms, +3 more. Returns: cwd, status, stderr, stdout, +4 more
file_archiveADestructive
文件压缩/解压:支持ZIP、TAR、GZ、TAR.GZ格式。使用spawn安全参数,防止命令注入。
示例:压缩目录 { "operation": "compress", "source": "project", "destination": "backup.zip", "format": "zip" } 示例:解压文件 { "operation": "extract", "source": "archive.tar.gz", "destination": "./extracted" }
Inputs: operation (required), source (required), destination, format, +1 more. Returns: format, source, operation, destination
file_compareARead-onlyIdempotent
文件差异比较:比较两个文件的差异,以文本或JSON格式输出差异统计和详细对比。
示例:比较两个文件 { "file1": "a.js", "file2": "b.js", "output_format": "json" }
Inputs: file1 (required), file2 (required), output_format. Returns: file1, file2, identical, diff_stats
file_editADestructive
文件行级编辑:在指定位置删除、插入、替换或追加内容。操作前自动备份原文件。
示例:删除第 3-5 行 { "operation": "delete_lines", "path": "test.js", "start_line": 3, "end_line": 5 } 示例:插入内容到第 2 行后 { "operation": "insert_lines", "path": "test.js", "start_line": 2, "content": "new line" }
Inputs: operation (required), path (required), start_line, end_line, +2 more.
file_hashARead-onlyIdempotent
文件哈希计算:使用MD5、SHA1、SHA256或SHA512算法计算文件哈希值,用于完整性验证。
示例:计算 SHA256 { "path": "package.json", "algorithm": "sha256", "output_format": "json" }
Inputs: path (required), algorithm, output_format. Returns: hash, path, algorithm
file_operationBDestructive
文件操作:读取、写入、列出目录、创建目录、删除文件或目录。支持工作目录解析和相对路径。
示例:读取文件 { "operation": "read", "path": "src/index.js", "output_format": "json" } 示例:写入文件 { "operation": "write", "path": "test.txt", "content": "Hello", "output_format": "text" }
Inputs: operation (required), path, working_directory, content, +2 more. Returns: path, size, action, content, +3 more
file_permissionsADestructiveIdempotent
跨平台文件权限管理:Unix系统使用chmod,Windows系统使用icacls。支持递归设置。
示例:设置文件权限 { "path": "script.sh", "mode": "755" } 示例:递归设置目录权限 { "path": "project", "mode": "644", "recursive": true, "max_depth": 3 }
Inputs: path (required), mode, permissions, recursive, +2 more. Returns: mode, path, changed, recursive
file_searchARead-onlyIdempotent
文件内容搜索:在目录中搜索匹配正则表达式的内容。支持文件类型过滤、深度限制、超时控制和忽略模式。
示例:搜索 JS 文件中的函数定义 { "search_path": "src", "pattern": "function\s+\w+", "file_types": "js,ts" } 示例:忽略 node_modules 搜索 { "search_path": ".", "pattern": "TODO", "ignore": ["node_modules", "*.log"] }
Inputs: search_path (required), pattern (required), file_types, case_sensitive, +5 more. Returns: matches, results, timed_out, truncated
file_watchARead-only
文件监控:监控文件或目录的创建、删除、修改事件。支持递归监控和深度限制。
示例:监控目录变化 { "path": "src", "events": "create,delete,modify", "duration": 60 } 示例:递归监控 { "path": "project", "events": "modify", "recursive": true, "max_depth": 3 }
Inputs: path (required), events, duration, recursive, +2 more.
sudo_configADestructive
Linux Sudo无密码配置管理:生成、安装、测试和管理sudoers配置。支持dry-run演练模式。
示例:检查sudo状态 { "action": "status" } 示例:生成配置 { "action": "generate", "username": "user", "scope": "limited", "dry_run": true }
Inputs: action (required), username, scope, commands, +3 more.
task_managerBDestructive
任务管理:创建、更新、完成、列出和清空任务。支持优先级、截止日期、子任务和进度跟踪。
示例:创建任务 { "operation": "create", "model_name": "claude", "title": "完成文档", "priority": "high" } 示例:更新进度 { "operation": "update", "model_name": "claude", "task_id": "xxx", "progress": 50 }
Inputs: operation (required), model_name (required), task_id, title, +6 more. Returns: tasks, operation, created_task_id
time_toolARead-onlyIdempotent
时间工具:获取当前时间,支持多种格式输出(ISO、UNIX、RFC3339、本地格式)。
示例:获取 ISO 格式 { "format": "iso", "output_format": "json" } 示例:获取指定时区 { "format": "locale", "time_zone": "Asia/Shanghai", "output_format": "text" }
Inputs: format, include_milliseconds, time_zone, output_format. Returns: format, time_zone, timestamp
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have distinct purposes with clear boundaries, such as file_edit for line-level editing versus file_operation for basic file operations. However, there is some overlap between file_operation and file_edit, as both handle file modifications, which could cause minor confusion. Overall, the descriptions help differentiate them effectively.
All tool names follow a consistent snake_case pattern with a clear verb_noun structure, such as execute_command, file_compare, and task_manager. There are no deviations or mixed conventions, making the naming predictable and easy to understand across the entire set.
With 13 tools, the count is reasonable for a local operations server covering file management, system commands, and task tracking. It is slightly on the higher side but well-scoped, as each tool addresses a specific operational need without obvious redundancy, though it could be streamlined.
The tool set provides comprehensive coverage for local operations, including file handling, command execution, environment management, and task tracking. Minor gaps exist, such as no direct tool for network operations or process management, but core workflows are well-supported, allowing agents to perform most common tasks effectively.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that enables file operations, mathematical calculations with unit conversions, and system information retrieval. Provides secure access to local file system, calculator functions with statistics, and system monitoring capabilities.8 npmISC
- AlicenseBqualityCmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13158 npm6MIT
- AlicenseAqualityDmaintenanceA production-ready MCP server that enables AI assistants to execute shell commands, manage files, monitor system resources, and automate complex workflows with advanced features like stock tracking and web automation.717 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server enabling AI assistants to securely operate remote servers via persistent SSH sessions, with tools for command execution, file transfer, directory listing, and system monitoring.4MIT