
inercia/mcpshell
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
inercia/mcpshell は [https://github.com/inercia/mcpshell.] からインポートされた MCP サーバーの候補です
概要
inercia/mcpshell は [https://github.com/inercia/mcpshell.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
MCPShellはLMSがcommand-lineツールを安全に実行できるツールです Model Context Protocol (MCP) を通して。 LLMとオペレーティングシステムのコマンド間のセキュアなブリッジを提供します。
##特徴
- 柔軟なコマンド実行: MCP ツールとして任意のシェルコマンドを実行します。 テンプレートによるパラメーター置換
- 構成ベースのツール定義: パラメータで YAML のツールを定義します。 制約、および出力フォーマット。
- 制約によるセキュリティ: CEL式を用いたツールパラメータの検証 実行前、オプションのsanboxed環境 コマンドの実行 -MCPツールのクイックプロトタイピング: シェルコードを追加し、そのまま使用 LLM の MCP ツール
- 簡単な統合: MCPプロトコルに対応したLMLクライアントと連携 (つまり、カーサーター、VSCode、Witsy…)
クイックスタート
Cursor(またはその他のMCPクライアント)があなたの助けを借りて欲しいと想像してみてください ハードディスクの空き容量の問題。
- ツールを定義する設定ファイル[
/my/example.yaml]を作成します。
より洗練された、有用な例については、例のディレクトリをご覧ください。 多分あなたがLLMがあなたのKubernetesのクラスターについてあなたの知っていることを許可することを好む
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCPShell
The MCPShell is a tool that allows LLMs to safely execute command-line tools through the Model Context Protocol (MCP). It provides a secure bridge between LLMs and operating system commands.
Features
- Flexible command execution: Run any shell commands as MCP tools, with parameter substitution through templates.
- Configuration-based tool definitions: Define tools in YAML with parameters, constraints, and output formatting.
- Security through constraints: Validate tool parameters using CEL expressions before execution, as well as optional sanboxed environments for running commands.
- Quick proptotyping of MCP tools: just add some shell code and use it as a MCP tool in your LLM.
- Simple integration: Works with any LLM client supporting the MCP protocol (ie, Cursor, VSCode, Witsy…)
Quick Start
Imagine you want Cursor (or some other MCP client) help you with your space problems in your hard disk.
-
Create a configuration file
/my/example.yamldefining your tools:mcp: description: | Tool for analyzing disk usage to help identify what's consuming space. run: shell: bash tools: - name: "disk_usage" description: "Check disk usage for a directory" params: directory: type: string description: "Directory to analyze" required: true max_depth: type: number description: "Maximum depth to analyze (1-3)" default: 2 constraints: - "directory.startsWith('/')" # Must be absolute path - "!directory.contains('..')" # Prevent directory traversal - "max_depth >= 1 && max_depth <= 3" # Limit recursion depth - "directory.matches('^[\\w\\s./\\-_]+$')" # Only allow safe path characters, prevent command injection run: command: | du -h --max-depth={{ .max_depth }} {{ .directory }} | sort -hr | head -20 output: prefix: | Disk Usage Analysis (Top 20 largest directories):Take a look at the examples directory for more sophisticated and useful examples. Maybe you prefer to let the LLM know about your Kubernetes cluster with kubectl? Or let it run some AWS CLI commands?
-
Configure the MCP server in Cursor (or in any other LLM client with support for MCP)
For example, for Cursor, create
.cursor/mcp.json:{ // you need the "go" command available "mcpServers": { "mcp-cli-examples": { "command": "go", "args": [ "run", "github.com/inercia/[email protected]",
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
// you need the "go" command available
"mcpServers": {
"mcp-cli-examples": {
"command": "go",
"args": [
"run", "github.com/inercia/[email protected]",
"mcp", "--tools", "/my/example.yaml",
"--logfile", "/some/path/mcpshell/example.log"
]
}
}
}