
MCP服务器用于执行CMD命令。可以连接到Claude以实现额外的代理。
概览
一个模型上下文协议(MCP)服务器实现,支持在Windows和Linux上执行CMD命令,并支持SSH连接。该服务器允许您将命令行操作集成到兼容MCP的应用程序中。 - 通过MCP执行CMD命令 - TypeScript实现 - 基于官方MCP SDK - 跨平台兼容性 通过 Smithery 自动安装 Claude Desktop 的 CMD 服务器: - Node.js(推荐v16或更高)- npm或纱线包管理器 服务器可以通过环境变量或配置对象进行配置: - npm run build - 将 TypeScript 编译为 JavaScript - npm run prepare - 准备发布包 - @modelcontextprotocol/SDK: ^1.0.1 - glob: ^10.3.10 - zod-to-json-schema: ^3.23.5 欢迎投稿!请随时提交拉取请求。
概述(AI 翻译)
一个模型上下文协议(MCP)服务器实现,支持在Windows和Linux上执行CMD命令,并支持SSH连接。该服务器允许您将命令行操作集成到兼容MCP的应用程序中。
特色
- 通过MCP执行CMD命令
- TypeScript 实现
- 基于官方MCP SDK 构建
- 跨平台兼容性
安装
通过Smithery安装
通过 Smithery 自动安装 Claude Desktop 的 CMD 服务器:
手动安装
先修条件
- Node.js(推荐v16或更高)
- NPM或纱线包管理器
用途
配置
服务器可以通过环境变量或配置对象进行配置:
发展
要建立开发环境:
-
克隆仓库:
-
安装依赖:
-
建设项目:
剧本
npm run build- 将 TypeScript 编译为 JavaScriptnpm run prepare- 准备发布包
依赖关系
@modelcontextprotocol/sdk: ^1.0.1glob: ^10.3.10zod-to-json-schema: ^3.23.5
贡献
欢迎投稿!请随时提交拉取请求。
许可证
本页由 AI 翻译,技术细节请以原文为准。
README
CMD MCP Server
A Model Context Protocol (MCP) server implementation for executing CMD commands on both Windows and Linux, as well as allowing SSH connections. This server allows you to integrate command-line operations with MCP-compatible applications.
Features
- Execute CMD commands through MCP
- TypeScript implementation
- Built on the official MCP SDK
- Cross-platform compatibility
Installation
Installing via Smithery
To install CMD Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install server-cmd --client claude
Manual Installation
npm install server-cmd
Prerequisites
- Node.js (v16 or higher recommended)
- npm or yarn package manager
Usage
import { MCPCmdServer } from 'server-cmd';
// Initialize the server
const server = new MCPCmdServer();
// Start the server
server.start();
Configuration
The server can be configured through environment variables or a configuration object:
const config = {
// Add your configuration options here
};
const server = new MCPCmdServer(config);
Development
To set up the development environment:
- Clone the repository:
git clone https://github.com/PhialsBasement/CMD-MCP-Server.git
cd CMD-MCP-Server
- Install dependencies:
npm install
- Build the project:
npm run build
Scripts
npm run build- Compile TypeScript to JavaScriptnpm run prepare- Prepare the package for publishing
Dependencies
@modelcontextprotocol/sdk: ^1.0.1glob: ^10.3.10zod-to-json-schema: ^3.23.5
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Security
Please note that executing command-line operations can be potentially dangerous. Make sure to implement proper security measures and input validation when using this server in production environments.
Support
For issues and feature requests, please use the GitHub issue tracker.
安装
npx -y @smithery/cli install server-cmd --client claude