Skip to main content
Glama
praveen-radakirouchenane

local-mcp-with-docker

基于 Docker 的本地(stdio)MCP 服务器

本项目是一个最小的本地 MCP 服务器,通过 stdio 暴露 run_command 工具。

设置

cd ~path-to-directory/local-mcp-with-docker
uv sync

使用以下命令启动脚本:

uv run main.py

注意:从 MCP 2.0 开始,服务器启动后控制台将不再有任何输出。进程保持活动状态,并等待来自 MCP 客户端的 stdio 消息。您可以在新的终端会话中使用调试器进行检查。

启动检查器:

npx -y @modelcontextprotocol/inspector

然后在检查器界面中:

  • 传输方式: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 截图

替代文本

Install Server
F
license - not found
B
quality
C
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

  • F
    license
    -
    quality
    D
    maintenance
    A basic MCP server implementation for testing purposes. Communicates via stdio and is designed to work with MCP-compliant clients.
  • A
    license
    -
    quality
    C
    maintenance
    A minimal, zero-dependency MCP server that enables defining and running tools over stdio transport, without extra features like HTTP or resources.
    15
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A minimal MCP server that provides a single 'hello' tool returning 'Hello, world!'.
    2
    9
    MIT

View all related MCP servers

Related MCP Connectors

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

  • A basic MCP server to operate on the Postman API.

  • Scans MCP servers for tool poisoning, prompt injection and supply chain risks.

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/praveen-radakirouchenane/local-mcp-with-docker'

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