Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug for MCP&API]: Slashes in text break local output file saving

Open Beginner friendly
#106 0 comments 0 reactions 0 assignees View on GitHub

@LingYi-Liang is already working on this.

Since Oct 3, 2026.

  • #107 by @LingYi-Liang — open

Assessment

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

Research direction

Start in minimax_mcp/utils.py at build_output_file(), then inspect the local save path in minimax_mcp/server.py. Reproduce the issue with the provided TemporaryDirectory script and add a regression test covering text with date-style slashes. Done means both date formats produce files directly inside the requested output directory and the write succeeds.

Written by the indexing model from the issue text.

Description

Text starting with a date like 2026/10/03 breaks local output saving for
text_to_audio (MINIMAX_API_RESOURCE_MODE=local).

build_output_file() takes the first 10 characters and only replaces spaces.
The result is t2a_2026/10/03_<timestamp>.mp3. The slashes are treated as path
separators, but those directories don't exist. Changing the date to 2026-10-03
lets the file save normally.

Reproduction

Run this from the repository root with the Python dependencies installed. It
imports the unmodified utility and writes test bytes directly to a temporary
directory, without calling the API. Both inputs use the same absolute output
path, which also avoids the separate path-joining issue.

from pathlib import Path
from tempfile import TemporaryDirectory

from minimax_mcp.utils import build_output_file, build_output_path

records = []
with TemporaryDirectory() as directory:
    output_path = build_output_path(str(Path(directory) / "output"))
    for text in ("2026-10-03", "2026/10/03"):
        output_file = build_output_file("t2a", text, output_path, "mp3")
        output_path.parent.mkdir(parents=True, exist_ok=True)
        try:
            with open(output_path / output_file, "wb") as stream:
                stream.write(b"local write probe")
            result = "saved"
        except OSError as error:
            result = type(error).__name__
        parent_matches = output_file.parent == output_path
        print(text, "parent_matches:", parent_matches, "write:", result)
        records.append({"text": text, "parent_matches": parent_matches, "write": result})

Both runs gave this output:

2026-10-03 parent_matches: True write: saved
2026/10/03 parent_matches: False write: FileNotFoundError

Both inputs should save directly inside the requested directory.

Environment

Windows, Python 3.11.9, package version 0.0.19 at
0856b9aef8a9d676bb63bdd6b6426d7b640a3b7a.
Models used and Trace-ID: N/A (local reproduction, no request).

The relevant code is filename construction
and the local audio save path.

I've checked the Python/JS READMEs, MCP guide and existing issues. #73/#74 address
repeated path joining, and #92 covers nested-directory writability; none changes
how text becomes a filename.

Would you be open to a small fix that replaces path separators in the text,
keeps ordinary Unicode characters, and adds a file-write regression test?

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

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from MiniMax-AI/MiniMax-MCP

All issues in MiniMax-AI/MiniMax-MCP

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.