local-mcp-with-docker
Dockerを使用したローカル(stdio) MCPサーバー
このプロジェクトは、stdio上でrun_commandツールを公開する最小限のローカルMCPサーバーです。
セットアップ
cd ~path-to-directory/local-mcp-with-docker
uv sync以下のコマンドでスクリプトを起動します:
uv run main.py注意: MCP 2.0以降、サーバー起動後はコンソールに出力はありません。プロセスは生き続け、MCPクライアントからのstdioメッセージを待ちます。新しいターミナルセッションでデバッガを使用して確認できます。
インスペクターを起動:
npx -y @modelcontextprotocol/inspector次にインスペクターUIで:
トランスポート:
stdioコマンド:
uv引数:
run,python,main.py作業ディレクトリ:
~path-to-directory/local-mcp-with-docker
インスペクターには登録されたツールrun_commandが表示され、直接呼び出すことができます。
Related MCP server: mcp-stdio
Dockerイメージのビルド
docker build -t terminal_tool_docker .これにより、Claude Desktop MCP設定で使用されるローカルDockerイメージが作成されます。
Claude Desktopの設定
これをClaude DesktopのMCP設定ファイルに追加します:
{
"mcpServers": {
"local-mcp-with-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--init",
"-e",
"DOCKER_CONTAINER=true",
"-e",
"WORKSPACE_DIR=/root/mcp/workspace",
"-v",
"path-to-directory/local-mcp-with-docker:/root/mcp/workspace",
"terminal_tool_docker"
]
}
}
}これにより、ワークスペースがコンテナにマウントされ、サーバーがコンテナ内の正しい作業ディレクトリを指すようになります。
Claudeのスクリーンショット

Available Tools
1 toolrun_commandA
Run a terminal command inside the workspace directory. If a terminal command can accomplish a task, tell the user you'll use this tool to accomplish it, even though you cannot directly do it
Args: command: The shell command to run.
Returns: The command output or an error message.
Inputs: command (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion with other tools. The tool has a clear and singular purpose: running terminal commands.
With a single tool, consistency is not applicable, but a neutral score is given. The naming 'run_command' follows a simple verb_noun pattern which is acceptable.
A single tool for executing arbitrary commands is extremely thin for a server. It lacks any companion tools for file management, environment inspection, or other common development tasks, making it feel incomplete.
The server only provides command execution, missing obvious complementary capabilities like file reading/writing, directory listing, or process management that would be expected for a workspace-focused server. Agents are forced to rely on the single tool for all tasks, which is severely limited.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA basic MCP server implementation for testing purposes. Communicates via stdio and is designed to work with MCP-compliant clients.-
- AlicenseNot gradedqualityDmaintenanceA minimal, zero-dependency MCP server that enables defining and running tools over stdio transport, without extra features like HTTP or resources.18 npm1MIT
- FlicenseAqualityDmaintenanceA minimal MCP server that provides a single 'hello' tool returning 'Hello, world!'.2-
- AlicenseAqualityFmaintenanceA minimal MCP server that exposes a single bash tool to execute commands inside a devcontainer, returning real output and exit codes.1MIT