cmd-mcp-server
CMD MCP 服务器
一个模型上下文协议 (MCP) 服务器实现,用于在 Windows 和 Linux 上执行 CMD 命令,并允许 SSH 连接。此服务器允许您将命令行操作与兼容 MCP 的应用程序集成。
特征
通过MCP执行CMD命令
TypeScript 实现
基于官方 MCP SDK 构建
跨平台兼容性
Related MCP server: Globalping
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 CMD 服务器:
npx -y @smithery/cli install server-cmd --client claude手动安装
npm install server-cmd先决条件
Node.js(建议使用 v16 或更高版本)
npm 或 yarn 包管理器
用法
import { MCPCmdServer } from 'server-cmd';
// Initialize the server
const server = new MCPCmdServer();
// Start the server
server.start();配置
可以通过环境变量或配置对象来配置服务器:
const config = {
// Add your configuration options here
};
const server = new MCPCmdServer(config);发展
设置开发环境:
克隆存储库:
git clone https://github.com/PhialsBasement/CMD-MCP-Server.git
cd CMD-MCP-Server安装依赖项:
npm install构建项目:
npm run build脚本
npm run build将 TypeScript 编译为 JavaScriptnpm run prepare准备发布的包
依赖项
@modelcontextprotocol/sdk: ^1.0.1glob:^10.3.10zod-to-json-schema:^3.23.5
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
安全
请注意,执行命令行操作可能存在潜在危险。在生产环境中使用此服务器时,请务必实施适当的安全措施并进行输入验证。
支持
对于问题和功能请求,请使用GitHub 问题跟踪器。
Available Tools
2 toolsexecute_commandA
Execute a command and return its output. Commands run in a persistent shell session by default. Use newSession: true to run in a new shell instance.
Inputs: command (required), newSession.
execute_ssh_commandC
Execute a command on a remote server via SSH. Commands run in a persistent SSH session by default. Use newSession: true to run in a new session.
Inputs: host (required), username (required), command (required), port, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: execute_command handles local shell commands, while execute_ssh_command handles remote SSH commands. There is no overlap or ambiguity between them, as each targets a different execution environment.
Both tools follow a consistent verb_noun pattern with 'execute_' as the prefix and descriptive suffixes ('command' and 'ssh_command'). The naming is perfectly uniform and predictable across the tool set.
With only 2 tools, the server feels thin for a command execution domain. It lacks essential operations like listing available commands, managing sessions, or handling file operations, which are common in such contexts. The count is too low for adequate coverage.
The tool set is severely incomplete for command execution. It covers basic local and remote command execution but misses critical functionalities such as session management tools, command history, file transfer, or environment configuration, leaving significant gaps for agent workflows.
Maintenance
Related MCP Connectors
A simple MCP server built with FastMCP and python
Related MCP Servers
- MIT

Globalpingofficial
FlicenseNot gradedqualityBmaintenanceRemote MCP server that gives LLMs access to run network commands66-- AlicenseNot gradedqualityDmaintenanceMCP server exposing pwntools 4.15.0 functionality for binary exploitation tasks.26 PyPI2MIT
- FlicenseNot gradedqualityDmaintenanceMCP server providing filesystem operations, shell execution, and web search capabilities.21 PyPI-