dshills/second-opinion
If you are the rightful owner of second-opinion and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Second Opinion is an MCP server designed to enhance code review processes by leveraging multiple LLMs for intelligent analysis.
Second Opinion is a Model Context Protocol (MCP) server that integrates with Claude Code to provide advanced code review capabilities. It utilizes leading language models from OpenAI, Google Gemini, Ollama, and Mistral to perform comprehensive git diff analysis, code quality reviews, commit assessments, and uncommitted work evaluations. The server is optimized for performance with features like dynamic token allocation, task-specific temperature tuning, and memory-aware chunking. It ensures security through input validation, secure path handling, and API key protection. Second Opinion is designed to be flexible, supporting multiple configuration methods and offering provider-specific optimizations to deliver precise and efficient code analysis.
Features
- Git Diff Analysis: Uses LLMs to understand and summarize code changes.
- Code Review: Evaluates code for quality, security, and best practices.
- Commit Analysis: Assesses git commits for adherence to best practices.
- Uncommitted Work Analysis: Reviews uncommitted changes to prepare for commits.
- Multiple LLM Support: Compatible with OpenAI, Google Gemini, Ollama, and Mistral.
Usages
usage with Claude Code JSON Configuration
{ "mcpServers": { "second-opinion": { "command": "/path/to/second-opinion/bin/second-opinion" } } }
usage with Claude Code Environment Variables
{ "mcpServers": { "second-opinion": { "command": "/path/to/second-opinion/bin/second-opinion", "env": { "DEFAULT_PROVIDER": "openai", "OPENAI_API_KEY": "your-openai-api-key", "OPENAI_MODEL": "gpt-4o-mini", "LLM_TEMPERATURE": "0.3", "LLM_MAX_TOKENS": "4096" } } } }
Tools
analyze_git_diff
Analyzes git diff output to understand code changes using the configured LLM.
review_code
Reviews code for quality, security, and best practices using the configured LLM.
analyze_commit
Analyzes a git commit for quality and adherence to best practices.
analyze_uncommitted_work
Analyzes uncommitted changes in a git repository to help prepare for commits.
get_repo_info
Gets information about a git repository.