Skip to main content
Glama

Shell MCP Server

by odysseus0

シェルMCPサーバー

シェルコマンド実行機能を提供するモデルコンテキストプロトコルサーバー。このサーバーにより、LLMはシェルコマンドを実行し、その出力を制御された方法で受け取ることができます。

利用可能なツール

  • execute_command - シェルコマンドを実行し、その出力を返す

    • 必要な引数:

      • command (文字列): 実行するシェルコマンド

    • 戻り値:

      • コマンド結果には以下が含まれます:

        • command : 実行されたコマンド

        • output : stdoutとstderrの出力を組み合わせたもの

        • return_code : コマンド実行の戻りコード

インストール

uvの使用(推奨)

uvを使用する場合、特別なインストールは必要ありません。uvx uvx使用してmcp-server-shellを直接実行します。

PIPの使用

あるいは、pip 経由でmcp-server-shellをインストールすることもできます。

pip install mcp-server-shell

インストール後、次のコマンドを使用してスクリプトとして実行できます。

python -m mcp_server_shell

構成

Claude.app 用に設定する

Claude 設定に追加:

"mcpServers": { "shell": { "command": "uvx", "args": ["mcp-server-shell"] } }
"mcpServers": { "shell": { "command": "python", "args": ["-m", "mcp_server_shell"] } }

Zed用の設定

Zed のsettings.jsonに追加します:

"context_servers": { "mcp-server-shell": { "command": "uvx", "args": ["mcp-server-shell"] } },
"context_servers": { "mcp-server-shell": { "command": "python", "args": ["-m", "mcp_server_shell"] } },

やり取りの例

シェルコマンドを実行します。

{ "name": "execute_command", "arguments": { "command": "ls -la" } }

応答:

{ "command": "ls -la", "output": "total 24\ndrwxr-xr-x 5 user group 160 Jan 1 12:00 .\ndrwxr-xr-x 3 user group 96 Jan 1 12:00 ..", "return_code": 0 }

デバッグ

MCPインスペクタを使用してサーバーをデバッグできます。UVXインストールの場合:

npx @modelcontextprotocol/inspector uvx mcp-server-shell

または、パッケージを特定のディレクトリにインストールした場合や、そのディレクトリで開発している場合は、次のようにします。

cd path/to/servers/src/shell npx @modelcontextprotocol/inspector uv run mcp-server-shell

クロードへの質問例

  1. 「現在のディレクトリにはどんなファイルがありますか?」

  2. 「README.mdファイルの内容を見せてください」

  3. 「現在のシステム日付は何ですか?」

  4. 「Pythonがインストールされているかどうかを確認し、そのバージョンを表示します」

セキュリティに関する考慮事項

⚠️警告:このサーバーはシステム上で直接シェルコマンドを実行します。不正なコマンドや危険なコマンドの実行を防ぐため、慎重に使用し、適切なセキュリティ対策を実施してください。

貢献

mcp-server-shell の拡張と改善のための貢献を歓迎します。新機能の追加、セキュリティ強化、ドキュメントの改善など、皆様からのご意見は大変貴重です。

他の MCP サーバーと実装パターンの例については、https: //github.com/modelcontextprotocol/serversを参照してください。

プルリクエストを歓迎します。mcp-server-shell をさらに強力で便利なものにするために、新しいアイデア、バグ修正、機能強化などをお気軽にご提供ください。

ライセンス

mcp-server-shell は MIT ライセンスに基づきライセンスされています。つまり、MIT ライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布できます。詳細については、プロジェクトリポジトリの LICENSE ファイルをご覧ください。

-
security - not tested
F
license - not found
-
quality - not tested

Related MCP Servers

  • A
    security
    F
    license
    A
    quality
    A Model Context Protocol server that allows LLMs to interact with Python environments, execute code, and manage files within a specified working directory.
    Last updated -
    9
    78
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that allows LLMs to execute shell commands with explicit user permission through desktop notifications.
    Last updated -
    2
    20
    1
    MIT License
  • A
    security
    F
    license
    A
    quality
    A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
    Last updated -
    6
    1
    2
    • Linux
  • A
    security
    -
    license
    A
    quality
    A Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.
    Last updated -
    9

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/odysseus0/mcp-server-shell'

If you have feedback or need assistance with the MCP directory API, please join our Discord server