win-cli-mcp-tmyy

win-cli-mcp-tmyy

Enables AI clients to execute Windows commands, manage files, query system information, and perform code checks via MCP protocol.

Category
Visit Server

README

win-cli-mcp-tmyy

Windows 命令行 MCP 服务器 — 为 AI 客户端(如 Trae、Claude Desktop 等)提供 Windows 系统的命令行执行、文件系统操作、系统信息查询、代码检查等功能,通过 MCP(Model Context Protocol)协议进行通信。

功能特性

命令执行

  • cmd_exec — 执行 Windows CMD 命令,支持环境变量传递
  • powershell_exec — 执行 PowerShell 命令,长脚本自动写入临时文件执行,避免内联转义问题

文件系统操作

  • read_file — 读取文件内容,支持指定编码和行范围
  • write_file — 直接写入文件,支持 content 和 content_base64 两种方式
  • edit_file — 按行范围替换文件内容,支持 preserve_indent 自动缩进适配
  • list_directory — 列出目录内容,支持递归和深度限制
  • find_files — 基于 minimatch 模式匹配的文件搜索(原生 Node.js 实现,不依赖 PowerShell)
  • get_file_info — 获取文件/目录的详细元数据(大小、时间、类型、权限)
  • create_directory — 递归创建目录
  • delete_path — 删除文件或目录(非空目录需指定 recursive: true)
  • move_path — 移动或重命名文件/目录,支持跨驱动器(自动回退到复制+删除)

系统信息

  • list_drives — 列出所有可用驱动器及使用情况
  • get_env — 获取环境变量
  • get_system_info — 获取 OS 版本、CPU、内存、主机名等系统信息

代码检查

  • check_npm — npm 项目错误检查(npm install / npm run build)
  • check_python — Python 文件语法检查(py_compile)
  • check_go — Go 项目编译检查(go build)
  • check_rust — Rust 项目错误检查(cargo check)
  • check_java — Java 文件/项目编译检查(javac)

高级工具

  • bom_manage — 检测、添加、移除文件 BOM(Byte Order Mark),支持 UTF-8/UTF-16/UTF-32
  • base64_manage — Base64 编解码,支持文本和文件,辅助 edit_file 避免 JSON 转义问题
  • deep_thinking — 结构化深度思考工具,模拟 Sequential Thinking 模式,支持逐步推理、修订、多分支探索
  • mcp_proxy — MCP 穿透工具,调用其他 MCP 服务器的工具,支持任意 stdio 模式的 MCP 服务器

智能处理

  • 自动 Unicode 转义 — 自动将 \uXXXX 字面字符串转换为实际 Unicode 字符(如 \u00a7 → §),解决 JSON 多层转义导致的中文乱码问题
  • 换行符归一化 — 自动将 CRLF/CR 统一为 LF
  • BOM 自动处理 — 读取文件时自动剥离 BOM,避免解析异常
  • 跨驱动器移动 — 检测 EXDEV 错误,自动回退到复制+删除方案

技术栈

  • 运行时: Node.js(ES Modules)
  • 核心依赖:
    • @modelcontextprotocol/sdk — MCP 协议官方 SDK
    • minimatch — 文件搜索模式匹配
  • 协议: MCP(Model Context Protocol)via stdio JSON-RPC 2.0

项目结构

win-cli-mcp-tmyy/
├── index.js          # 主入口文件,包含所有工具实现和 MCP 服务器逻辑
├── package.json      # 项目配置、依赖管理
├── install.bat       # 本地安装脚本(npm link + npm install)
├── .gitignore        # Git 忽略规则
├── LICENSE           # 协议文件
├── README.md         # 本说明文件
└── project.md        # 详细项目说明书(供 AI 读取)

安装

npm install -g win-cli-mcp-tmyy

配置

在 AI 客户端(如 Trae)的 MCP 配置中添加:

{
  "mcpServers": {
    "win-cli-mcp-tmyy": {
      "command": "npx",
      "args": ["win-cli-mcp-tmyy"]
    }
  }
}

协议

Business Source License 1.1

  • ✅ 开源可查看 — 任何人都可以查看、复制、修改、非商业使用
  • ⚠️ 商业需授权 — 商业使用(包括但不限于销售、嵌入商业产品、作为商业服务提供)需联系作者获取商业许可
  • 🔄 到期自动转 Apache 2.0 — 2030-08-05 后协议自动转为 Apache License 2.0,届时完全开源

本协议由 MariaDB 创建,被 CockroachDB、Sentry 等知名项目采用,是广泛认可的"源代码可用、商业需授权"协议方案。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured