Describe the bug
docker-mcp crashes on startup with:
AttributeError: 'Server' object has no attribute 'list_prompts'
Root cause
The pyproject.toml declares mcp>=1.0.0 without an upper bound. The MCP Python SDK removed the @server.list_prompts() and @server.get_prompt() decorators in recent versions — list_prompts is no longer a method on the Server class.
The affected code is in src/docker_mcp/server.py:
@server.list_prompts()
async def handle_list_prompts() -> List[types.Prompt]:
...
@server.get_prompt()
async def handle_get_prompt(name: str, ...) -> types.GetPromptResult:
...
Suggested fix (either one)
Option A — pin the SDK version in pyproject.toml:
dependencies = [
...
"mcp>=1.0.0,<1.10",
...
]
Option B — remove the prompt decorators since prompts are optional per the MCP spec and the tools (create-container, deploy-compose, get-logs, list-containers) work fine without them.
Workaround for users until fix is released
{
"mcpServers": {
"docker-mcp": {
"command": "uvx",
"args": ["--from", "docker-mcp", "--with", "mcp<1.10", "docker-mcp"]
}
}
}
Describe the bug
docker-mcpcrashes on startup with:Root cause
The
pyproject.tomldeclaresmcp>=1.0.0without an upper bound. The MCP Python SDK removed the@server.list_prompts()and@server.get_prompt()decorators in recent versions —list_promptsis no longer a method on theServerclass.The affected code is in
src/docker_mcp/server.py:Suggested fix (either one)
Option A — pin the SDK version in
pyproject.toml:Option B — remove the prompt decorators since prompts are optional per the MCP spec and the tools (
create-container,deploy-compose,get-logs,list-containers) work fine without them.Workaround for users until fix is released
{ "mcpServers": { "docker-mcp": { "command": "uvx", "args": ["--from", "docker-mcp", "--with", "mcp<1.10", "docker-mcp"] } } }