cmd-mcp-server

by PhialsBasement
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Allows the execution of command-line operations on Linux systems through a persistent shell session, providing access to Linux system commands and utilities.

CMD MCP 服务器

一个模型上下文协议 (MCP) 服务器实现,用于在 Windows 和 Linux 上执行 CMD 命令,并允许 SSH 连接。此服务器允许您将命令行操作与兼容 MCP 的应用程序集成。

特征

  • 通过MCP执行CMD命令
  • TypeScript 实现
  • 基于官方 MCP SDK 构建
  • 跨平台兼容性

安装

通过 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);

发展

设置开发环境:

  1. 克隆存储库:
git clone https://github.com/PhialsBasement/CMD-MCP-Server.git cd CMD-MCP-Server
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build

脚本

  • npm run build将 TypeScript 编译为 JavaScript
  • npm run prepare准备发布的包

依赖项

  • @modelcontextprotocol/sdk : ^1.0.1
  • glob :^10.3.10
  • zod-to-json-schema :^3.23.5

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

安全

请注意,执行命令行操作可能存在潜在危险。在生产环境中使用此服务器时,请务必实施适当的安全措施并进行输入验证。

支持

对于问题和功能请求,请使用GitHub 问题跟踪器

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP 服务器允许通过 CMD 执行任何和所有命令

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Prerequisites
      1. Usage
        1. Configuration
          1. Development
            1. Scripts
              1. Dependencies
                1. Contributing
                  1. License
                    1. Security
                      1. Support
                        ID: s83mqs6123