win-shell-mcp
Provides tools for managing Git repositories, including checking status, viewing commit history, managing branches, showing diffs, staging changes, and making commits.
Allows running package scripts via the pkg_run tool, with automatic package manager detection (npm/pnpm/yarn).
Supported as one of the package managers that can be detected by the pkg_detect tool and used with the pkg_run tool for running package scripts.
Supported as one of the package managers that can be detected by the pkg_detect tool and used with the pkg_run tool for running package scripts.
Click on "Install 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., "@win-shell-mcplist the files in my project directory with sizes and types"
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.
win-shell-mcp
AI-native cross-platform command abstraction layer — provides 40 deterministic tools as an MCP Server, replacing bare shell calls with unified minimal JSON output, handling Windows path/encoding/quoting differences.
Why
Letting AI call shell commands is dangerous and unreliable:
Cross-platform inconsistency: Windows path separators, encoding (GBK), quoting, and command names (
delvsrm) differ greatly from UnixOutput hard to parse: Shell command output formats are arbitrary, making it difficult for AI to reliably extract information
Security risk: Bare shell allows pipes, redirection, and command injection
win-shell-mcp replaces common shell commands with 40 deterministic tools, each of which:
Accepts structured JSON parameters and returns unified
{ ok: true, ...data }or{ ok: false, error: { code, message } }Behaves consistently across platforms (same configuration for Windows/macOS/Linux)
Provides minimal output (default only includes the minimum fields needed for AI decision-making), with a
verboseswitch for full dataUses standard error codes (
ENOENT/EISDIR/ENOTDIR/EACCES/EINVAL/ETIMEOUT/EEXEC/EUNKNOWN/INVALID_URL/NET_TIMEOUT/NET_FAIL/PROC_NOT_FOUND/PROC_KILL_FAIL/EXEC_FAIL/EXEC_TIMEOUT/GIT_FAIL)
Related MCP server: Pare
Installation
# 全局安装
npm install -g win-shell-mcp
# 或一次性运行
npx win-shell-mcpRequires Node.js ≥ 18.
Client Configuration
Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"win-shell-mcp": {
"command": "win-shell-mcp"
}
}
}If not installed globally, use npx:
{
"mcpServers": {
"win-shell-mcp": {
"command": "npx",
"args": ["win-shell-mcp"]
}
}
}Generic MCP Client
Any client compatible with the Model Context Protocol can connect via stdio:
{
"mcpServers": {
"win-shell-mcp": {
"command": "win-shell-mcp",
"transport": "stdio"
}
}
}After startup, the client communicates with the server via stdio and automatically discovers all 40 tools.
Tool List (40)
Grouped by domain. Each tool returns a unified output contract: success { ok: true, ...data }, failure { ok: false, error: { code, message } }.
system (4)
Tool | Description |
| System information (os, arch, platform, hostname, cwd, node); |
| Disk usage (total/free/used, in bytes) |
| Memory information (total/free); |
| List of PATH environment variable entries; |
fs_read (3)
Tool | Description |
| List directory; |
| Read file; supports line range, automatic encoding detection (GBK/UTF-8), truncation |
| File/directory information (type, size, mtime, birthtime) |
fs_write (6)
Tool | Description |
| Write file (supports utf-8/gbk encoding, can append) |
| Create directory ( |
| Delete file/directory ( |
| Copy file/directory (directory requires |
| Move/rename (fails if dest exists, does not overwrite) |
| Create empty file or update mtime |
text (6)
Tool | Description |
| Regex search text |
| Get first N lines |
| Get last N lines |
| Count lines/words/characters |
| Difference between two texts |
| Regex replace text |
search (3)
Tool | Description |
| Match file paths with glob patterns |
| Search content within files |
| Find executable file path (similar to |
process (2)
Tool | Description |
| List processes |
| Terminate process (by PID) |
shell_exec (1)
Tool | Description |
| Execute shell command (with timeout and encoding handling) |
env (3)
Tool | Description |
| Read environment variable |
| Set environment variable |
| Delete environment variable |
net (4)
Tool | Description |
| HTTP GET request |
| HTTP POST request |
| DNS resolution |
| TCP connection probe |
pkg (2)
Tool | Description |
| Detect package manager (npm/pnpm/yarn) |
| Run package script |
git (6)
Tool | Description |
| Working tree status |
| Commit history |
| Branch list and switch |
| Diff |
| Stage |
| Commit |
⚠️ Security Note
No sandbox, full permissions.
This server performs all operations with the full permissions of the running user, equivalent to a bare shell.
fs_rmcan delete any accessible file,shell_execcan execute any command,process_killcan terminate any accessible process, andfs_writecan overwrite any accessible file.Only use in trusted environments:
Only connect to AI clients you trust
Do not expose in shared/multi-tenant environments
Manually confirm operations on sensitive directories (system directories, user home directories)
In production, it is recommended to use OS-level permission isolation (dedicated low-privilege accounts, containers, chroot, etc.)
This project does not provide any sandbox, permission isolation, command blacklist, or path restrictions. All access control relies on OS permissions.
Development
# 安装依赖
npm install
# 类型检查
npm run typecheck
# 测试
npm test
# 测试(watch 模式)
npm run test:watch
# 覆盖率(阈值:lines/functions/statements ≥ 85%,branches ≥ 70%)
npm run coverage
# 构建
npm run build
# 开发模式(watch 构建)
npm run devThe build output is dist/index.js (bundled with tsup, ESM).
Project Structure
src/
index.ts # 入口:启动 stdio server
server.ts # MCP Server 创建与工具分发
registry.ts # 工具注册表(注册全部 40 个工具)
contract/ # 输出契约与错误码
encoding/ # 编码检测(GBK/UTF-8)
tools/ # 40 个工具实现,按域分文件
tests/
server.test.ts # server 单元测试
integration/ # 集成测试(Client + InMemoryTransport)
tools/ # 各工具单元测试
contract/ # 契约测试
encoding/ # 编码测试License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceA unified MCP server with composable tools for GitHub operations, file management, shell execution, kanban boards, Discord messaging, and package management. Features role-based security, HTTP/stdio transports, and a web-based development UI.
- Alicense-qualityAmaintenanceProvides MCP servers that wrap common developer tools (git, npm, docker, etc.) returning structured JSON output, enabling AI agents to reliably interact with these tools without parsing fragile terminal text.1136MIT
- Alicense-qualityCmaintenanceRemote execution layer for agentic systems exposing 64 production tools via MCP for file, network, system, text, git, crypto, and monitoring operations.MIT
- FlicenseCqualityCmaintenanceA security-first MCP server that provides LLMs with structured tools for filesystem, process, search, build/test/lint, IDE integration, and more.402
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1072636071/win-shell-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server