-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Description
It seems that the Docker MCP gateway does not handle the MCP server dynamic tools change correctly and incorrectly handles the tools list changed notification. For instance this happens when using Apify MCP server with configured with apify-mcp-server.tools = "add-actor" - the tool add-actor dynamically changes tools list and adds the Apify Actor as a tool to the MCP session which normally works when using Apify MCP directly over stdio but fails when used throught Docker desktop MCP gateway.
Working scenario using Apify MCP stdio directly
MCP command: npx -y @apify/actors-mcp-server --tools add-actor
Initial tools: add-actor, get-actor-output
We add new Actor to the session using:
{
"method": "tools/call",
"params": {
"name": "add-actor",
"arguments": {
"actor": "apify/rag-web-browser"
},
"_meta": {
"progressToken": 0
}
}
}Which causes Apify MCP server to send tools list changed notification to the client:
{
"method": "notifications/tools/list_changed"
}And now when the client does tools/list request there is now also "apify-slash-rag-web-browser" tool with the original add-actor and get-actor-output.
Scenario where the tool list does not change even after the tools list changed notification
MCP command: docker mcp gateway run
Initial tools: add-actor, get-actor-output
We add new Actor tot the session using:
{
"method": "tools/call",
"params": {
"name": "add-actor",
"arguments": {
"actor": "apify/rag-web-browser"
},
"_meta": {
"progressToken": 0
}
}
}In this case for some reason three tools list changed notifications are send instaed of one and they have additional "params": {} (it may not be related).
{
"method": "notifications/tools/list_changed",
"params": {}
}When the client calls tools/list there is only the two original tools and the apify-slash-rag-web-browser is missing.
Reproduce
described in description
Expected behavior
after calling the add-actor and then doing tools/list the new tool apify-slash-rag-web-browser should be present
docker version
Version 4.47.0 (206054)
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
Linux ubuntu 6.14.0-1012-oem #12-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 5 13:02:48 UTC 2025 x86_64 x86_64 x86_64 GNU/Linuxdocker info
Client: Docker Engine - Community
Version: 28.4.0
Context: default
Debug Mode: false
Plugins:
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v1.9.11
Path: /home/mq/.docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.28.0-desktop.1
Path: /home/mq/.docker/cli-plugins/docker-buildx
cloud: Docker Cloud (Docker Inc.)
Version: v0.4.29
Path: /home/mq/.docker/cli-plugins/docker-cloud
compose: Docker Compose (Docker Inc.)
Version: v2.39.4-desktop.1
Path: /home/mq/.docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.42
Path: /home/mq/.docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Docker Inc.)
Version: v0.2.0
Path: /home/mq/.docker/cli-plugins/docker-desktop
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.31
Path: /home/mq/.docker/cli-plugins/docker-extension
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /home/mq/.docker/cli-plugins/docker-init
mcp: Docker MCP Plugin (Docker Inc.)
Version: v0.20.0
Path: /home/mq/.docker/cli-plugins/docker-mcp
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /home/mq/.docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.18.3
Path: /home/mq/.docker/cli-plugins/docker-scout
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 5
Server Version: 28.4.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: b98a3aace656320842a23f4a392a33f46af97866
runc version: v1.3.0-0-g4ca628d1
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.14.0-1012-oem
Operating System: Ubuntu 24.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 125.1GiB
Name: ubuntu
ID: c153192b-2676-405f-9de3-11c89488af9a
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: falseDiagnostics ID
67EE0540-B487-4C1C-BCA3-FE562038BF91/20250929121038
Additional Info
No response