refactor: split monolithic server.py (800+ lines) into separate tool modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
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.
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
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 283
- 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
- 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.
More from MiniMax-AI/MiniMax-MCP
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MiniMax-AI/MiniMax-MCP#89 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
MiniMax-AI/MiniMax-MCP#88 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
MiniMax-AI/MiniMax-MCP#78 ·
-
fix(server): music_generation has inconsistent indentation — try block indented inside function bodyOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
MiniMax-AI/MiniMax-MCP#69 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
MiniMax-AI/MiniMax-MCP#105 · 1 comment ·
All issues in MiniMax-AI/MiniMax-MCP
Similar issues
-
adr
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
EclipseFdn/open-vsx.org#13665 ·
Maintainers usually reply within 1 day
-
doc good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
collective/icalendar#1865 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
canonical/opentelemetry-collector-operator#409 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
mozilla/addons-release-tests#1243 ·
Maintainers usually reply within 1 day