Skip to content

Add Resource Limits for MCP Instances to Prevent CPU/Memory Exhaustion (WSL2 - Workaround) #2075

@aiob3

Description

@aiob3

MCP Resource Limits Configuration Proposal

Description:

Problem Statement

Docker MCP Gateway / cagent currently has no built-in mechanism to limit:

  • Maximum concurrent MCP instances running in parallel
  • Memory per instance
  • Total memory consumption
  • CPU allocation per tool
  • Instance lifecycle (timeout, cleanup)

This leads to resource exhaustion on local development machines (especially WSL 2), causing:

  • 90%+ CPU usage from uncontrolled docker-mcp.exe spawning
  • Memory bloat
  • System lockups
  • Daemon crashes

Issue

Example of Current Issue - Suggest Improve

Affected Users:

  • Local development with multiple MCP tools
  • WSL 2 environments with limited resources
  • Docker Desktop users

Workaround (Current):
Manual task killing: taskkill /F /IM docker-mcp.exe

Expected Behavior:
MCP should respect configurable per-tool and global resource limits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions