MiniMax MCP extension for pi coding agent - provides web_search and understand_image tools with built-in skills
npx skills add https://github.com/imsus/pi-extension-minimax-coding-plan-mcp --skill minimax-image-understandingقم بتثبيت هذه المهارة باستخدام واجهة سطر الأوامر (CLI) وابدأ في استخدام سير عمل SKILL.md في مساحة عملك.
MiniMax MCP (Model Context Protocol) extension for pi coding agent that provides AI-powered web search and image understanding capabilities.
Since pi doesn't natively support MCP, this extension bridges that gap by implementing the MiniMax MCP API directly as pi tools.
The MiniMax Coding Plan provides powerful MCP tools for web search and image understanding. However, pi doesn't natively support MCP protocol.
This extension implements those same capabilities as native pi tools, so you get:
This extension was reverse-engineered from the official MiniMax Coding Plan MCP Python package. The original package provides MCP protocol tools that work with MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.
By analyzing the Python implementation, this extension recreates the same functionality directly as pi native tools, providing:
Use the pi install command to install packages from npm, git, or HTTPS URLs.
pi install npm:@imsus/pi-extension-minimax-coding-plan-mcp
pi install git:https://github.com/imsus/pi-extension-minimax-coding-plan-mcp
Or with a version tag:
pi install git:https://github.com/imsus/[email protected]
pi install https://github.com/imsus/pi-extension-minimax-coding-plan-mcp
Add -l flag to install to project settings (.pi/settings.json):
pi install -l npm:@imsus/pi-extension-minimax-coding-plan-mcp
Project settings can be shared with your team, and pi will auto-install missing packages on startup.
Use --extension or -e to try the package without installing:
pi -e npm:@imsus/pi-extension-minimax-coding-plan-mcp
pi -e git:https://github.com/imsus/pi-extension-minimax-coding-plan-mcp
pi list # show installed packages
pi update # update all non-pinned packages
pi remove npm:@imsus/pi-extension-minimax-coding-plan-mcp # remove a package
The extension checks for the API key in this order:
Environment variable (recommended for per-session config)
export MINIMAX_API_KEY="your-api-key-here"
export MINIMAX_API_HOST="https://api.minimax.io" # optional, default
Auth file (~/.pi/agent/auth.json) - persistent across sessions
{
"minimax": {
"type": "api_key",
"key": "your-api-key-here"
}
}
Note: Use
/minimax-configurecommand to set up your API key interactively.
Set or update your API key:
pi
/minimax-configure --key your-api-key-here
This saves to ~/.pi/agent/auth.json for permanent storage.
# Show help
/minimax-configure --help
# Show current status
/minimax-configure --show
# Set API key directly
/minimax-configure --key your-api-key-here
# Clear configuration
/minimax-configure --clear
/minimax-status
Shows current configuration status and available tools.
Search for current information:
Search the web for TypeScript best practices 2026
web_search({
query: "latest React 19 features announcement"
})
Returns search results with titles, URLs, snippets, and suggestions.
When to use:
Analyze images with AI:
Understand this screenshot
understand_image({
prompt: "What error is shown in this screenshot?",
image_url: "https://example.com/error.png"
})
// Describe image content
understand_image({
prompt: "Describe what's in this image in detail",
image_url: "https://example.com/photo.jpg"
})
// Extract text (OCR)
understand_image({
prompt: "Extract all text from this image",
image_url: "./screenshots/document.png"
})
// Analyze UI/UX
understand_image({
prompt: "Analyze this UI design and suggest improvements",
image_url: "https://example.com/mockup.png"
})
// Code from screenshot
understand_image({
prompt: "What code is shown in this screenshot? Transcribe it exactly.",
image_url: "./error-screenshot.jpg"
})
// Debug errors
understand_image({
prompt: "What is the error message and stack trace in this screenshot?",
image_url: "./bug-screenshot.png"
})
When to use:
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | ✓ | Search query (2-500 characters) |
Example:
web_search({
query: "Pi coding agent extensions guide"
})
Returns: List of search results with titles, URLs, snippets, and follow-up suggestions.
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | ✓ | Question or analysis request (1-1000 characters) |
| image_url | string | ✓ | Image URL or local file path |
Example:
understand_image({
prompt: "What is in this image?",
image_url: "https://example.com/screenshot.png"
})
Returns: AI analysis of the image content based on your prompt.
| Command | Description |
|---|---|
/minimax-configure |
Configure API key |
/minimax-status |
Show configuration status |
/reload |
Hot reload extension (built-in) |
This extension includes built-in skills to help the LLM understand when and how to use each tool:
/skill:minimax-web-search - Guidance on effective web search queries/skill:minimax-image-understanding - Tips for image analysis promptsSkills are automatically included in the system prompt when relevant.
pi-extension-minimax-coding-plan-mcp/
├── extensions/ # TypeScript extension (loaded directly by pi)
│ └── index.ts # Source code
├── skills/ # Skills directory (auto-discovered by pi)
│ ├── minimax-web-search/
│ │ └── SKILL.md # Web search skill
│ └── minimax-image-understanding/
│ └── SKILL.md # Image understanding skill
├── package.json # npm package config
├── REVERSE_ENGINEERING.md # Reverse engineering documentation
└── README.md # This file
# Install dependencies
npm install
# Start pi - it loads TypeScript directly
pi
No build step needed! pi loads .ts files directly from the extensions/ directory.
### Publishing
```bash
# Login to npm
npm login
# Publish
npm publish
# Publish with tag
npm publish --tag beta
~/.pi/settings.json/minimax-status for configurationTrace-Id in error messagesUse absolute paths or paths relative to current directory:
understand_image({
prompt: "Analyze this file",
image_url: "/Users/username/screenshots/error.png"
// or
image_url: "./screenshots/error.png"
})
Make sure the ~/.pi/agent/auth.json file has the correct format:
{
"minimax": {
"type": "api_key",
"key": "your-api-key-here"
}
}
Use /minimax-configure --show to check if your key is configured correctly.
If changes don't appear after updating, clear the cached version:
# Remove the cached git repository
rm -rf ~/.pi/agent/git/github.com/imsus/pi-extension-minimax-coding-plan-mcp
# Restart pi to re-clone the latest version
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature')MIT License - see LICENSE file for details.
npm Package: @imsus/pi-extension-minimax-coding-plan-mcp