Skip to main content
Glama
Faucet94

Super Windows CLI MCP Server

by Faucet94

スーパー Windows CLI MCP サーバー

コマンドライン インターフェイス (MCP) を介して Windows 環境への無制限のシステム アクセスを提供する Windows CLI MCP サーバーの拡張フォークです。

SimonB97 によるwin-cli-mcp-server をベースにしています。


⚠️重大なセキュリティ警告⚠️

このサーバーは、Windows上でSYSTEMレベルの権限で実行されるように設計されています。これにより、すべてのファイル、プロセス、構成設定を含むオペレーティングシステム全体への完全かつ無制限のアクセスが許可されます。

  • システム レベルのアクセスを許可することの影響を完全に理解していない限り、このサーバーをインストールまたは実行しないでください。

  • このサーバーは、ネットワーク アクセスを完全に制御できる信頼性の高い環境でのみ使用してください。

  • **ネットワーク セキュリティが最も重要です:**アプリケーション レベルの制限は設計上最小限に抑えられているため、このサーバーを実行しているマシンを保護するには、ファイアウォール、ネットワーク セグメンテーション、および厳格なアクセス制御リスト (ACL) に大きく依存します。

  • 設定をよく確認してください: config.json内のallowedPaths 、 blockedCommands 、その他のセキュリティ設定に特に注意してください。設定ミスがあると、システムが簡単に危険にさらされる可能性があります。

このソフトウェアは自己責任でご使用ください。メンテナーは、本ソフトウェアの使用に起因する誤用やセキュリティ侵害について一切の責任を負いません。


Related MCP server: Windows CLI MCP Server

特徴

  • Windows シェル環境への完全なアクセス (PowerShell、CMD、Git Bash - 構成可能)。

  • 制限のないコマンド実行 ( config.jsonで構成可能)。

  • 完全なファイル システム アクセス ( config.json経由で構成可能)。

  • 永続性と自動回復のために NSSM を介したシステム レベルのサービスのインストール。

  • NSSM によって提供される自動サービス回復機能。

  • ネットワーク バインディング コントロール (意図されていますが、主にネットワーク/ファイアウォール レベルで管理されます)。

  • プライバシー強化のため PowerShell テレメトリを無効にしました。

  • パフォーマンス向上のためのプロセスの再利用 (シェルの場合)。

  • 長時間実行される操作のタイムアウトを延長します (構成可能)。

前提条件

始める前に、以下がインストールされていることを確認してください。

  1. Node.js **:**バージョン18.0.0以降。nodejs.orgからダウンロードしてください。(npmが含まれています)。

  2. **NSSM(Non-Sucking Service Manager):**信頼性の高いサービスのインストールに必要です。最新バージョンはnssm.ccからダウンロードしてください。

インストール(NSSM の使用 - 推奨)

この方法では、サーバーは SYSTEM 権限で実行され、自動的に起動する永続的な Windows サービスとしてインストールされます。

  1. クローンまたはダウンロード:

    • このリポジトリをクローンします: git clone <repository-url>

    • または、ソースコードの.zipファイルをダウンロードし、適切な場所(例: C:\Servers\SuperWinCLIServer )に解凍してください。ユーザープロファイルフォルダは避けてください。

  2. NSSMを配置する:

    • nssm.ccから NSSM をダウンロードします。

    • zip ファイルを解凍します。

    • 適切なアーキテクチャ フォルダー ( win32またはwin64 ) からnssm.exeファイルをこのプロジェクトのルート ディレクトリ( install-service.ps1と同じフォルダー) にコピーします。

  3. 依存関係のインストールとビルド:

    • プロジェクトのルート ディレクトリでターミナル (PowerShell または CMD) を開きます。

    • 実行: npm install

    • このコマンドは、必要な Node.js パッケージをインストールし、 npm run buildを自動的に実行して、TypeScript コードをdistフォルダーにコンパイルします。

  4. config.jsonを設定します:

    • コピー: config.sample.jsonのコピーを作成し、プロジェクトのルート ディレクトリにconfig.jsonという名前を付けます。

    • 編集: config.jsonを開き、設定を慎重に確認して変更します。

      • security.allowedPaths :**重要!**サンプルパスから、サーバーがアクセスする必要がある実際のディレクトリに変更してください。セキュリティのため、できるだけ具体的に指定してください。不明な場合は、プロジェクトディレクトリ自体から始めてください(例: "C:\\Servers\\SuperWinCLIServer" - 二重のバックスラッシュ\\を忘れないでください)。サービスはSYSTEMアカウントとして実行されるため、パスは該当アカウントに対して有効である必要があります。

      • security.blockedCommands / blockedArguments : デフォルトのリストを確認します。セキュリティポリシーに基づいてコマンド/引数を追加または削除します。

      • shells : シェル (PowerShell、CMD、Git Bash) を有効/無効にし、 commandパスを確認します (特に Git Bash の場合)。

      • ssh : SSH 実行機能を使用するかどうかを設定します (デフォルトでは無効)。

    • config.jsonファイルを保存します。

  5. インストール スクリプトを実行します:

    • PowerShell を管理者として開きます。

    • プロジェクトのルート ディレクトリ ( cd C:\Servers\SuperWinCLIServer ) に移動します。

    • インストール スクリプトを実行します: .\install-service.ps1

    • このスクリプトは NSSM を使用してMCPServerサービスをインストールおよび構成し、 node.exe dist/index.jsをLocalSystemとして実行して自動的に起動します。

  6. サービスステータスの確認:

    • 同じ管理PowerShellウィンドウで、 Get-Service MCPServer実行します。

    • ステータスはRunningになっているはずです。 Stoppedいる場合は、NSSMログまたはWindowsイベントビューアー(アプリケーションログとシステムログ)でエラーを確認してください。

設定( config.json )の詳細

  • security :

    • maxCommandLength : コマンド文字列で許可される最大文字数。

    • blockedCommands : ブロックするコマンド名 (拡張子なし) の配列 (大文字と小文字は区別されません)。

    • blockedArguments : ブロックする正確な引数の配列 (大文字と小文字は区別されません)。

    • allowedPaths :**重要な設定です。**絶対パスの配列です。restrictWorkingDirectory restrictWorkingDirectory true の場合、コマンドは作業ディレクトリがこれらのパスのいずれかで始まる場合にのみ実行されます。パスは正規化後、大文字と小文字を区別せずに比較されます。二重のバックスラッシュを使用してください(例: "C:\\Tools\\Scripts" )。

    • restrictWorkingDirectory : ブール値。true の場合、作業ディレクトリに対してallowedPathsチェックを強制します。true trueままにすることを強くお勧めします。

    • logCommands : ブール値。true の場合、実行されたコマンドとその出力(切り捨て)がメモリに保存されます(最大maxHistorySize )。

    • maxHistorySize : メモリ内履歴に保持するコマンドの最大数。

    • commandTimeout : 実行中のコマンドが自動的に終了されるまでの秒数。

    • enableInjectionProtection : ブール値。true の場合、コマンド内のシェル演算子 (シェルごとに定義された& 、 | 、 ;など) をブロックしようとします。

  • shells : 利用可能なローカル シェル (powershell、cmd、gitbash) を構成します。

    • enabled : ブール値。このシェルの使用を許可します。

    • command : シェル実行可能ファイルへのパス。

    • args : ユーザーのコマンドの前にシェルに渡されるデフォルトの引数の配列。

    • blockedOperators : この特定のシェルのコマンド内でブロックする文字列/文字の配列 ( enableInjectionProtectionが true の場合に使用されます)。

  • ssh : SSH 経由のリモート コマンド実行を構成します。

    • enabled : ブール値ssh_executeおよびssh_disconnectツールを有効にします。

    • connections : 名前付き接続構成 (ホスト、ポート、ユーザー名、パスワード/秘密キーパス) を含むオブジェクト。

  • 設定のマージ: config.jsonが読み込まれる際、 securityまたはshellsセクションが含まれている場合、そのセクション全体securityそのセクションのデフォルト設定を置き換えます。security またはshells内の個々のフィールドはマージされません。ssh セクションはより細かくマージされます。 sshセクションをカスタマイズする場合は、 config.jsonに必要なすべてのフィールドが含まれていることを確認してください。

サービス管理(NSSM)

install-service.ps1経由でインストールすると、プロジェクト ディレクトリ内の管理 PowerShell/CMDから標準の Windows ツールまたは NSSM コマンドを使用してサービスを管理できます。

  • 開始: Start-Service MCPServerまたは.\nssm.exe start MCPServer

  • 停止: Stop-Service MCPServerまたは.\nssm.exe stop MCPServer

  • 再起動: Restart-Service MCPServerまたは.\nssm.exe restart MCPServer

  • ステータス: Get-Service MCPServerまたは.\nssm.exe status MCPServer

  • 構成の編集(詳細): .\nssm.exe edit MCPServer (NSSM GUIエディタを開きます)

  • 構成の表示: .\nssm.exe dump MCPServer

アンインストール (NSSM)

  1. PowerShell を管理者として開きます。

  2. プロジェクトのルート ディレクトリに移動します。

  3. アンインストール スクリプトを実行します: .\uninstall-service.ps1

  4. これは NSSM を使用してMCPServerサービスを停止および削除します。

代替実行(手動/デバッグ)

テストやデバッグの目的で、サーバーをサービスとしてインストールせずに直接実行することができます。

  1. npm installが実行されていることを確認してください。

  2. config.jsonが存在し、構成されていることを確認します。

  3. プロジェクト ルートで通常のターミナル (PowerShell/CMD) を開きます。

  4. 実行: npm run start

  5. サーバーはフォアグラウンドで実行されます。停止するにはCtrl + Cを押してください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

Available Tools

4 tools
execute_commandB

Execute a command in the specified shell (powershell, cmd, or gitbash)

Example usage (PowerShell):

{
  "shell": "powershell",
  "command": "Get-Process | Select-Object -First 5",
  "workingDir": "C:\Users\username"
}

Example usage (CMD):

{
  "shell": "cmd",
  "command": "dir /b",
  "workingDir": "C:\Projects"
}

Example usage (Git Bash):

{
  "shell": "gitbash",
  "command": "ls -la",
  "workingDir": "/c/Users/username"
}
ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute
shellYesShell to use for command execution
workingDirNoWorking directory for command execution (optional)

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing behavior. It gives examples but does not mention return values, exit codes, error handling, side effects, environment specifics, or security implications. For a command execution tool, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening one-sentence description is concise and front-loaded. The three examples are redundant in structure but serve to illustrate cross-shell syntax. Each sentence earns its place, though the examples could be trimmed to one or two without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that executes arbitrary system commands, there is no mention of output format, timeouts, working directory defaults, or safety considerations. The presence of sibling ssh_execute suggests a need to clarify local vs remote execution, which is absent. The examples help but do not fill all gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of parameters, but the description adds value through concrete examples showing valid shell values, command syntax, and workingDir formatting (e.g., Windows paths vs Git Bash paths). This enhances understanding beyond the schema's terse descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes a command in a specified shell (powershell, cmd, or gitbash), which is a specific verb+resource. It is distinguishable from siblings like get_command_history and ssh_execute, though it does not explicitly call out these differences. The mention of the shell options adds specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives such as ssh_execute (remote execution) or get_command_history. The examples imply usage but do not provide context, prerequisites, or exclusions. This is a clear gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_command_historyA

Get the history of executed commands

Example usage:

{
  "limit": 5
}

Example response:

[
  {
    "command": "Get-Process",
    "output": "...",
    "timestamp": "2024-03-20T10:30:00Z",
    "exitCode": 0
  }
]
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of history entries to return (default: 10, max: 1000)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It adds transparency by showing a detailed example response with fields (command, output, timestamp, exitCode), which clarifies the return format. However, it does not explicitly state whether history is session-scoped, how results are ordered, or that it has no side effects. Given the absence of annotations, there are notable but not critical gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: a single opening sentence plus two compact JSON examples. The purpose is front-loaded, and every element adds value—the example usage demonstrates the parameter, and the example response shows the expected output structure. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter, no-output-schema tool, the description is quite complete: it states the purpose, shows how to invoke it, and provides a representative response. Minor omissions like ordering or session scope are not critical for a list-history tool. The example response effectively substitutes for an output schema, making the tool actionable for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully documents the 'limit' parameter with default (10) and max (1000) values, providing 100% coverage. The description's example usage (limit: 5) reinforces the parameter but adds no new semantic meaning beyond the schema. Baseline 3 is appropriate because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb+resource statement: 'Get the history of executed commands'. It distinguishes itself from sibling tools like execute_command (execution) and ssh_execute (remote execution) by focusing specifically on retrieval of prior commands. The example response reinforces the purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage context: to retrieve previously executed commands, with an example showing the optional limit parameter. It does not explicitly state when not to use it, but the purpose is self-evident and no competing history tools exist among siblings. No explicit exclusions are given, but this is clearly a read-only counterpart to the execution siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ssh_disconnectA

Disconnect from an SSH server

Example usage:

{
  "connectionId": "raspberry-pi"
}

Use this to cleanly close SSH connections when they're no longer needed.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionIdYesID of the SSH connection to disconnect

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden. It mentions 'cleanly close' but doesn't disclose side effects like what happens to associated sessions, idempotency, or error behavior. It's minimally adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and includes a practical JSON example, which helps the agent. It repeats the concept slightly ('Disconnect' and 'close SSH connections'), but overall it's well-structured and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description is adequate. It provides an example and clear use case. It doesn't cover errors or edge cases, but given the low complexity, this is not a significant gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with the parameter described as 'ID of the SSH connection to disconnect'. The example usage adds an illustrative value (raspberry-pi) but doesn't add semantic meaning beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Disconnect' and the resource 'SSH connection/server', which distinguishes it from siblings like ssh_execute and execute_command. The example usage reinforces the exact action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It says 'when they're no longer needed', providing clear context for when to use this tool. It doesn't explicitly mention alternatives or when not to use, but the sibling tool names imply the distinction, so a slight deduction is warranted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ssh_executeA

Execute a command on a remote host via SSH

Example usage:

{
  "connectionId": "raspberry-pi",
  "command": "uname -a"
}

Configuration required in config.json:

{
  "ssh": {
    "enabled": true,
    "connections": {
      "raspberry-pi": {
        "host": "raspberrypi.local",
        "port": 22,
        "username": "pi",
        "password": "raspberry"
      }
    }
  }
}
ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute
connectionIdYesID of the SSH connection to use

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions that SSH must be enabled in config.json and gives an example connection, which is useful. However, it does not disclose the command execution behavior (e.g., output format, error handling, potential destructive side-effects) or that it uses the specified password for authentication.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured and efficient, with a one-sentence purpose followed by illustrative JSON examples. The config block is large but necessary to show the setup requirements. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should explain what the tool returns or what 'execute' entails. It does neither, though it does provide configuration context. For a command execution tool, the lack of mention of output or error behavior leaves a moderate gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema descriptions are minimal ('Command to execute', 'ID of the SSH connection to use'). The description adds meaningful value by showing an example usage and the config structure, clarifying that connectionId refers to a key in the 'connections' object and command is a shell string.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute a command on a remote host via SSH', using a specific verb and resource. It distinguishes itself from sibling tools like ssh_disconnect (manage connection) and get_command_history (retrieve history).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a concrete example and configuration requirement, implying when to use the tool (when you have a configured SSH connection and need to run a command). However, it does not explicitly state when to use it over alternatives like execute_command, nor does it provide exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedexecute_command
    • First observedget_command_history
    • First observedssh_disconnect
    • First observedssh_execute

TDQS

B3.1/5.0

Scored across 4 tools

Disambiguation3/5

The tools have some overlap in purpose that could cause confusion. Both execute_command and ssh_execute run commands, differing only in local vs. remote execution, which might lead to misselection if the agent doesn't carefully note the distinction. However, get_command_history and ssh_disconnect are clearly distinct, and the descriptions help clarify the differences.

Naming Consistency4/5

The naming follows a consistent verb_noun pattern throughout (e.g., execute_command, get_command_history, ssh_disconnect, ssh_execute), which is predictable and readable. There are minor deviations, such as the use of 'disconnect' versus 'execute' in the SSH tools, but overall, the pattern is maintained.

Tool Count3/5

With 4 tools, the count is borderline for the server's purpose as a 'Super Windows CLI MCP Server'. It feels thin, lacking coverage for common CLI operations like file management, process control, or network utilities, which might be expected in such a domain. However, it's not severely under-scoped.

Completeness2/5

There are significant gaps in the tool surface for a Windows CLI server. It lacks basic operations like listing files, managing processes, or handling network configurations, and the SSH tools seem like an add-on rather than core functionality. This incompleteness will likely cause agent failures when trying to perform common CLI tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    A Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.
    9
    1,570 npm
    267
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables secure command-line interactions on Windows systems with support for PowerShell, CMD, Git Bash, and WSL shells, providing controlled file access, command execution, and configurable security restrictions.
    6
    14 npm
    4
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables secure command-line interactions on Windows systems through PowerShell, CMD, and Git Bash, with support for SSH remote connections, SFTP file transfers, system monitoring, and configurable security controls including command blocking and path restrictions.
    34
    2
    MIT