mishrabp commited on
Commit
b51c79c
·
verified ·
1 Parent(s): af6a0bb

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. src/mcp-github/Dockerfile +1 -1
  3. src/mcp_telemetry.py +6 -1
Dockerfile CHANGED
@@ -17,4 +17,4 @@ ENV PYTHONPATH=/app/src
17
 
18
  EXPOSE 7860
19
 
20
- CMD ["python", "src/mcp-github/server.py", "--transport", "sse", "--port", "7860", "--host", "0.0.0.0"]
 
17
 
18
  EXPOSE 7860
19
 
20
+ CMD ["mcp", "run", "src/mcp-github/server.py", "--transport", "sse"]
src/mcp-github/Dockerfile CHANGED
@@ -17,4 +17,4 @@ ENV PYTHONPATH=/app/src
17
 
18
  EXPOSE 7860
19
 
20
- CMD ["python", "src/mcp-github/server.py", "--transport", "sse", "--port", "7860", "--host", "0.0.0.0"]
 
17
 
18
  EXPOSE 7860
19
 
20
+ CMD ["mcp", "run", "src/mcp-github/server.py", "--transport", "sse"]
src/mcp_telemetry.py CHANGED
@@ -6,7 +6,12 @@ from datetime import datetime
6
  from pathlib import Path
7
 
8
  # Use a central log file for usages
9
- LOG_FILE = Path(__file__).parent.parent.parent / "mcp_usage_log.json"
 
 
 
 
 
10
 
11
  def log_usage(server_name: str, tool_name: str):
12
  """Logs a tool call with timestamp."""
 
6
  from pathlib import Path
7
 
8
  # Use a central log file for usages
9
+ # In Docker/HF, /tmp is writable. Locally, use the project root.
10
+ import sys
11
+ if os.path.exists("/app"):
12
+ LOG_FILE = Path("/tmp/mcp_usage_log.json")
13
+ else:
14
+ LOG_FILE = Path(__file__).parent.parent / "mcp_usage_log.json"
15
 
16
  def log_usage(server_name: str, tool_name: str):
17
  """Logs a tool call with timestamp."""