MiniMax-AI / MiniMax-AI/MiniMax-MCP

fix(server): missing timeout on all requests.get() calls — potential indefinite hang

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.6k
Forks
284
PR merge metrics
No merged PRs in 30d

Description

Problem

Multiple requests.get() calls throughout server.py have no timeout parameter, which can cause the server to hang indefinitely if the remote server is unresponsive.

Exact locations

All in minimax_mcp/server.py:

  1. voice_clone()requests.get(file) for URL download (line ~175)
  2. voice_clone()requests.get(response_data.get("demo_audio")).content (line ~205)
  3. play_audio()requests.get(input_file_path).content (line ~220)
  4. generate_video()requests.get(download_url) for video download (line ~330)
  5. query_video_generation()requests.get(download_url) (line ~365)
  6. text_to_image()requests.get(image_url) for image download (line ~410)

Impact

  • MCP server can hang indefinitely waiting for a response
  • No way to recover without killing the process
  • Blocks the entire MCP tool pipeline

Proposed solution

Add a module-level constant and apply to all requests.get() calls:

# At module level
DOWNLOAD_TIMEOUT = 120  # seconds

# Apply everywhere:
requests.get(url, timeout=DOWNLOAD_TIMEOUT)

Also consider adding stream=True for large downloads (video) to avoid loading entire file into memory.

Acceptance criteria

  • Every requests.get() call has an explicit timeout parameter
  • Large file downloads use streaming where appropriate
  • Timeout errors are caught and reported to the user

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in minimax_mcp/server.py and inspect the six requests.get() call sites listed in voice_clone(), play_audio(), generate_video(), query_video_generation(), and text_to_image(). Use the acceptance criteria as the checklist: every call has an explicit timeout, large downloads stream where appropriate, and timeout errors are caught and reported to the user.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.