MiniMax-AI / MiniMax-AI/MiniMax-MCP
fix(server): missing timeout on all requests.get() calls — potential indefinite hang
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:
voice_clone()—requests.get(file)for URL download (line ~175)voice_clone()—requests.get(response_data.get("demo_audio")).content(line ~205)play_audio()—requests.get(input_file_path).content(line ~220)generate_video()—requests.get(download_url)for video download (line ~330)query_video_generation()—requests.get(download_url)(line ~365)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 explicittimeoutparameter - 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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