cmd-mcp-server
- OS Automation
MCP server allowing any and all command execution over CMD
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
execute_command | 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. |
execute_ssh_command | 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. |
Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
No arguments |
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.
<a href="https://glama.ai/mcp/servers/s83mqs6123"><img width="380" height="200" src="https://glama.ai/mcp/servers/s83mqs6123/badge" alt="cmd-mcp-server MCP server" /></a>
Features
- Execute CMD commands through MCP
- TypeScript implementation
- Built on the official MCP SDK
- Cross-platform compatibility
Installation
Prerequisites
- Node.js (v16 or higher recommended)
- npm or yarn package manager
Usage
Configuration
The server can be configured through environment variables or a configuration object:
Development
To set up the development environment:
- Clone the repository:
- Install dependencies:
- Build the project:
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.
GitHub Badge
Glama performs regular codebase and documentation scans to:
- Confirm that the MCP server is working as expected.
- Confirm that there are no obvious security issues with dependencies of the server.
- Extract server characteristics such as tools, resources, prompts, and required parameters.
Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.
Copy the following code to your README.md file: