mcp-sage
4
The `mcp-sage` project is an MCP server offering tools for interacting with AI models to perform tasks like code reviews and creating implementation plans. It decides which model to use from OpenAI or Google's offerings based on the context's token size, enhancing development workflows with robust AI-driven insights.
mcp-sage
An MCP server providing tools to send prompts to OpenAI's O3 model or Google's Gemini 2.5 Pro based on token count, for applications like code reviews or second opinions. The project consists of three main tools:
sage-opinion
- Takes a prompt and file paths, packs them into XML, decides model based on token count, and returns model's response.
sage-review
- Accepts code change instructions and file paths, packs them into XML, selects appropriate model, and returns edit suggestions in SEARCH/REPLACE format.
sage-plan
- Generates implementation plans through multi-model or self-debate workflows, critiques and refines plans through rounds, and returns the best plan.
Features
- Model selection based on token count.
- API key and network fallback mechanisms.
- Tools for enhancing code reviews and development processes.
- Detailed monitoring through MCP logging.
Prerequisites
- Node.js v18 or later
- OpenAI and Google Gemini API keys
Installation and Usage
- Clone the repo, install dependencies, and build with npm.
- Configure environment variables for API keys before running.