Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docker implementation for MCP protocol #4

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

pab1it0
Copy link
Owner

@pab1it0 pab1it0 commented Apr 3, 2025

Purpose

This PR fixes the issue reported in #2 where the Prometheus MCP server fails to work with Claude correctly. The root cause is related to how the server is being executed in Docker and how the stdin/stdout handling is managed for the MCP protocol.

Changes Made

The following changes have been implemented:

  1. Completely Rewrote the Dockerfile:

    • Changed to a multi-stage build pattern
    • Removed the docker-entrypoint.sh script in favor of direct command execution
    • Added proper user permissions with non-root user
    • Set environment variables to ensure proper stdout handling (PYTHONUNBUFFERED=1)
    • Added healthcheck for better container monitoring
  2. Added Documentation:

    • Updated README.md with information about the Docker implementation changes

Related Issues

This PR addresses the issue reported in #2 where users experience errors when using the MCP server with Claude.

@pab1it0 pab1it0 merged commit 6861e77 into main Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant