Model Context Protocol 対応の .NET9 ベース MCP サーバー。exec で任意のコマンドを実行し、stdout と stderr を区別して返す。 クロスプラットフォーム対応。
{
"mcpServers": {
"commandexecmcpserver": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
システムコマンドを実行するための MCP(Model Context Protocol)サーバーです。
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Last commit 88 days ago.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for CommandExecMcpServer and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
システムコマンドを実行するための MCP(Model Context Protocol)サーバーです。
CommandExecMcpServer は、Model Context Protocol に対応した .NET ベースのサーバーで、exec ツールを提供します。このツールは、指定されたシステムコマンドを実行し、標準出力(stdout)と標準エラー出力(stderr)を返します。
システムコマンドを実行して、その結果を取得できます。
パラメータ:
command (必須): 実行するコマンド名(例:ls、cmd.exe、powershell)args (オプション): コマンドの引数戻り値:
[stderr] ラベル付きで返す[stdout] と [stderr] ラベル付きで返す# プロジェクトをクローン
git clone <repository-url>
cd CommandExecMcpServer
# 依存関係をインストール
dotnet restore
dotnet publish CommandExecMcpServer.csproj -r win-x64 -o .\publish\win
dotnet publish CommandExecMcpServer.csproj -r linux-x64 -o .\publish\linux
dotnet run
サーバーは stdio トランスポートで起動し、MCP クライアントからの接続を待機します。
Program.cs - MCP サーバーの初期化とツールの登録CommandExecTools.cs - コマンド実行ツール(exec)の実装MCP クライアントから以下のように exec ツールを呼び出せます:
{"jsonrpc":"2.0","method":"initialize","id":"1","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"example-client","version":"0.0.1"},"capabilities":{}}}
{"jsonrpc": "2.0", "id": "2", "method": "tools/list"}
{"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"exec","arguments":{"command":"Get-ChildItem", "args": "."}}}
{"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"exec","arguments":{"command":"ls", "args": "-alh"}}}
以下のファイルがダウンロード可能です。
ダウンロード手順は以下のドキュメントを参照してください。