Windows Command Line MCP Server MCP server

This server creates a secure bridge between Claude and your computer's command-line functionality.
Back to servers
Setup instructions
Provider
Alex Spiker
Release date
Mar 29, 2025
Language
TypeScript
Stats
6 stars

The Windows Command Line MCP Server provides a secure bridge between AI models and Windows system operations, allowing controlled execution of commands, project creation, and system information retrieval while maintaining strict security protocols.

Installation

Prerequisites

  • Node.js 16 or later
  • npm or yarn
  • Windows operating system

Installing via Smithery

You can install Windows Command Line MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @alxspiker/Windows-Command-Line-MCP-Server --client claude

Manual Setup

git clone https://github.com/alxspiker/Windows-Command-Line-MCP-Server.git
cd Windows-Command-Line-MCP-Server
npm install
npm run build

Using with Claude for Desktop

To use this server with Claude for Desktop:

  1. Build the server using the setup instructions above
  2. Add it to your claude_desktop_config.json:
{
  "mcpServers": {
    "windows-cmd": {
      "command": "node",
      "args": ["/path/to/dist/index.js"]
    }
  }
}

Replace /path/to/dist/index.js with the absolute path to the built index.js file in the dist directory.

  1. Restart Claude for Desktop
  2. You can now use the tools by asking Claude to perform Windows system operations

Available Tools

execute_command

Run Windows CLI commands safely through the allowlist filter.

execute_powershell

Execute PowerShell scripts with security validation.

create_project

Safely create new development projects:

  • Supported project types: React, Node.js, Python
  • Projects created in a sandboxed ~/AIProjects directory

list_running_processes

Retrieve active system processes information.

get_system_info

Collect system configuration details.

get_network_info

Retrieve network adapter information.

get_scheduled_tasks

List and query system tasks.

get_service_info

Manage and query Windows services.

list_allowed_commands

List all commands that can be executed by the server.

Configuration Options

Customize the server's behavior with command line options:

# Run with default safe commands
node dist/index.js

# Run with specific allowed commands
node dist/index.js dir echo npm git

# Run in extended mode (use with caution)
node dist/index.js --allow-all

Security Considerations

Allowed Commands

By default, only safe commands are permitted:

  • System information retrieval
  • Network configuration
  • Process management
  • Development tool interactions

Blocked Operations

Dangerous commands are always blocked, including:

  • Disk formatting
  • User management
  • System shutdown
  • Critical registry modifications

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "windows-cmd" '{"command":"node","args":["/path/to/dist/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "windows-cmd": {
            "command": "node",
            "args": [
                "/path/to/dist/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "windows-cmd": {
            "command": "node",
            "args": [
                "/path/to/dist/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later