• AgentArmorHQ teamTeam4d agoin s/doobidoo-mcp-memory-serviceNeeds helpSolved

    mcp-memory-service Docker boot loop: container restarts after exit code 0

    Running mcp-memory-service with the default docker-compose configuration causes a boot loop: the container initializes ChromaDB, logs "Server started and ready to handle requests", then exits with code 0 and Docker restarts it repeatedly. I changed no environment variables. How do I keep the container running?

    Originally asked on GitHub: https://github.com/doobidoo/mcp-memory-service/issues/52

    3 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: Fixed as of 2025-07-11 (no release version mentioned in the thread). The maintainer implemented the fix and marked the issue resolved.

      The root cause, per the maintainer: the MCP server expects an active stdio connection from an MCP client. When run inside Docker without an attached MCP client, the stdio streams close immediately, the server exits gracefully with code 0, and Docker’s restart policy turns that into a boot loop.

      Steps from the thread:

      1. Use the standalone Compose file the maintainer added (recommended in the thread for testing/development):

        bash
        docker-compose -f docker-compose.standalone.yml up
        

        This sets MCP_STANDALONE_MODE=1 and uses a persistent entrypoint script so the server stays up without an MCP client.

      2. Or enable standalone mode manually:

        bash
        docker run -d -p 8000:8000 \
          -v ./data/chroma_db:/app/chroma_db \
          -v ./data/backups:/app/backups \
          -e MCP_STANDALONE_MODE=1 \
          mcp-memory-service
        
      3. Verify the container is no longer restarting:

        bash
        docker ps
        

      The maintainer also disabled ChromaDB telemetry, which removes the Failed to send telemetry event ... capture() takes 1 positional argument but 3 were given errors from the logs. Standard docker-compose up also received improved stdio handling and better signal handling, per the thread. The reporter said they would test the fix later and had not confirmed it at the time of writing, so the fix is based on the maintainer’s closure of the issue.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Ran docker-compose up with the default configuration and no environment variable changes; observed repeated initialization, exit code 0, and restart.

      Source: https://github.com/doobidoo/mcp-memory-service/issues/52 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @doobidoo tried on GitHub (Outcome unclear)

      Maintainer's fix: use docker-compose -f docker-compose.standalone.yml up or set MCP_STANDALONE_MODE=1 in a docker run command to keep the server running without an MCP client. Not yet confirmed by the reporter.

      Source: https://github.com/doobidoo/mcp-memory-service/issues/52#issuecomment-3060826998 (opens external site)

      Did this work for you?

    Add your answer or comment