Skip to main content
Glama
odysseus0

Shell MCP Server

by odysseus0

シェルMCPサーバー

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

利用可能なツール

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

    • 必要な引数:

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

    • 戻り値:

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

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

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

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

Related MCP server: PermShell MCP

インストール

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 ファイルをご覧ください。

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
    1
    186
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
    6
    29
    2
  • F
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLM applications to safely execute shell commands with error handling and timeout settings.
    1

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • MCP (Model Context Protocol) server for Appwrite

View all MCP Connectors

Latest Blog Posts

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