MiniMax-AI / MiniMax-AI/MiniMax-MCP
refactor: split monolithic server.py (800+ lines) into separate tool modules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Description
Problem
minimax_mcp/server.py is a single 800+ line file containing all tool definitions, configuration, and the MCP server setup. This makes it hard to navigate, test, and maintain.
Current structure
minimax_mcp/
├── __init__.py # 2 lines
├── __main__.py # config generator
├── client.py # API client (good, already separated)
├── const.py # constants (good, already separated)
├── exceptions.py # exceptions (good, already separated)
├── server.py # 800+ lines — ALL tools + config + server setup
└── utils.py # utilities (good, already separated)
Proposed structure
minimax_mcp/
├── __init__.py
├── __main__.py
├── client.py
├── const.py
├── exceptions.py
├── server.py # ~50 lines — MCP setup, config, imports tools
├── utils.py
└── tools/
├── __init__.py # exports all tool functions
├── audio.py # text_to_audio, play_audio, list_voices
├── video.py # generate_video, query_video_generation
├── image.py # text_to_image
├── music.py # music_generation
└── voice.py # voice_clone, voice_design
Benefits
- Each tool module is independently testable
- Easier to add new tools without touching a massive file
- Clear separation of concerns
- Reduces merge conflicts when multiple contributors work on different tools
Implementation notes
- Each tool module receives
mcp,api_client,base_path,resource_modeas module-level or injected dependencies server.pyimports and registers all tools- No behavior change — purely structural refactor
Acceptance criteria
server.pyreduced to <100 lines- Each tool in its own module
- All existing tests pass
uvx minimax-mcpworks identically
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 by reading minimax_mcp/server.py and the existing project tests to map the current tool definitions, configuration, and MCP setup. Separate the tools into the proposed modules under minimax_mcp/tools/ while preserving behavior, then run all existing tests and verify that uvx minimax-mcp works identically; done means server.py is under 100 lines and every tool has its own module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100