AI Peer Review MCP Server
Enables local LLMs to request peer review feedback from Google Gemini, providing real-time analysis of accuracy, completeness, clarity, and improvement suggestions for AI-generated responses.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Peer Review MCP ServerCan you review and improve my explanation about quantum entanglement?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Peer Review MCP Server
Enhance your local LLM responses with real-time peer review from Google Gemini
A Model Context Protocol (MCP) server that enables local language models to request peer review feedback from Google Gemini, dramatically improving response quality through AI collaboration.
๐ Features
Real-time peer review from Google Gemini for any local LLM response
Manual trigger system - user controls when to request peer review
Detailed feedback analysis - accuracy, completeness, clarity, and improvement suggestions
Comprehensive logging - see exactly what feedback Gemini provides
Privacy-conscious - only shares content when explicitly requested
Free to use - leverages Google Gemini's free tier
Easy integration - works with any MCP-compatible local LLM setup
Related MCP server: deep-thinking-engine
๐ฏ Use Cases
Fact-checking complex or technical responses
Quality improvement for educational content
Writing enhancement for creative tasks
Technical validation for coding explanations
Research assistance with multiple AI perspectives
๐ Prerequisites
Python 3.8+ installed on your system
LMStudio (or another MCP-compatible LLM client)
Google AI Studio account (free) for Gemini API access
Local LLM with tool calling support (e.g., Llama 3.1, Mistral, Qwen)
๐ Quick Start
1. Get Google Gemini API Key
Visit Google AI Studio
Sign in with your Google account
Click "Get API key" โ "Create API key in new project"
Copy your API key (starts with
AIza...)
2. Install the MCP Server
# Clone or create project directory
git clone https://github.com/your-repo/ai-peer-review-mcp # Replace with the actual repo URL
cd ai-peer-review-mcp
# Create a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
# Install dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Now, edit the .env file and add your API key:
# GEMINI_API_KEY=your_actual_api_key_here3. Review Server Files
requirements.txt:
requests
python-dotenvserver.py: (See full code in the repository)
4. Configure LMStudio or any other supported MCP Host (e.g Claude Desktop)
Add this configuration to your LMStudio MCP settings:
{
"mcpServers": {
"ai-peer-review": {
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/your/ai-peer-review-mcp",
"env": {
"GEMINI_API_KEY": "your_actual_api_key_here"
}
}
}
}Finding MCP Settings in LMStudio:
Look for: Settings โ MCP Servers
Or: Tools & Integrations โ MCP Configuration
Or: Program button โ Edit MCP JSON
5. Test the Setup
Restart LMStudio after adding the MCP configuration
Start a new chat in LMStudio
Ask any question: "What is quantum computing?"
Request peer review: "Use the ai_peer_review tool to check and improve your answer"
๐ Usage Examples
Basic Usage
User: What causes climate change?
LLM: [Provides initial response about greenhouse gases...]
User: Use AI Peer Review to verify and improve that answer
LLM: [Calls ai_peer_review tool, receives feedback, provides enhanced response]Technical Questions
User: Explain how neural networks work
LLM: [Initial technical explanation...]
User: Can you use ai_peer_review to make sure the explanation is accurate?
LLM: [Enhanced response with better technical details and examples]Creative Tasks
User: Write a short story about AI
LLM: [Initial creative writing...]
User: Use peer review to improve the story structure and clarity
LLM: [Improved story with better narrative flow and character development]๐ง Configuration Options
Environment Variables
GEMINI_API_KEY- Your Google Gemini API key (required)
Customization
You can modify the peer review prompt in server.py to focus on specific aspects:
review_prompt = f"""PEER REVIEW REQUEST:
# Customize this section for your specific needs
# Examples:
# - Focus on technical accuracy for coding questions
# - Emphasize creativity for writing tasks
# - Prioritize safety for medical/legal topics
...
"""๐ Monitoring and Logs
The server creates detailed logs in mcp-server.log:
# Watch logs in real-time
tail -f mcp-server.log
# View recent activity
cat mcp-server.log | tail -50Log Information Includes:
Tool calls from LMStudio
Requests sent to Gemini
Raw Gemini responses
Parsed feedback
Error details
๐ Troubleshooting
Common Issues
"Tool not available"
Verify MCP server configuration in LMStudio
Ensure your local model supports tool calling
Restart LMStudio after configuration changes
"GEMINI_API_KEY not found"
Check your
.envfile exists and has the correct keyVerify API key is valid in Google AI Studio
Ensure environment variable is properly set in LMStudio config
"Rate limit exceeded"
Google Gemini free tier has generous limits
Wait a moment and try again
Check Google AI Studio quota usage
"Model not found"
API model names change over time
Update
GEMINI_API_URLin server.js if neededCheck Google's latest API documentation
Debug Mode
Run the server manually to see detailed output. Make sure your virtual environment is active.
export GEMINI_API_KEY=your_api_key_here
python server.py๐ Privacy and Security
Data sharing only on request - content is only sent to Gemini when explicitly triggered
No persistent storage - conversations are not stored or logged beyond current session
API key security - keep your Gemini API key private and secure
Local processing - MCP runs entirely on your machine
๐ง Limitations
Requires tool-calling models - basic instruction-following models won't work
Internet connection required - needs access to Google Gemini API
Rate limits - subject to Google Gemini API quotas (free tier is generous)
Language support - optimized for English, other languages may work but aren't tested
๐ฃ๏ธ Roadmap
Multi-provider support - Add Groq, DeepSeek, and other AI APIs
Smart routing - Automatic provider selection based on question type
Confidence thresholds - Auto-trigger peer review for uncertain responses
Custom review templates - Domain-specific review criteria
Usage analytics - Track improvement metrics and API usage
Batch processing - Review multiple responses at once
๐ค Contributing
We welcome contributions! Here's how to help:
Development Setup
git clone https://github.com/your-repo/ai-peer-review-mcp # Replace with your repo URL
cd ai-peer-review-mcp
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up your environment
cp .env.example .env
# --> Add your GEMINI_API_KEY to the .env file
echo "Development environment ready. Run with 'python server.py'"Ways to Contribute
๐ Bug reports - Open issues for any problems you encounter
๐ก Feature requests - Suggest new capabilities or improvements
๐ Documentation - Improve setup guides, add examples
๐ง Code contributions - Submit pull requests for fixes or features
๐งช Testing - Try with different models and report compatibility
๐ Localization - Help support more languages
Contribution Guidelines
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes with clear, descriptive commits
Add tests if applicable
Update documentation for any new features
Submit a pull request with a clear description
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Anthropic - For creating the Model Context Protocol standard
Google - For providing the Gemini API
LMStudio - For excellent MCP integration
Community contributors - Everyone who helps improve this project
๐ Support
Issues: GitHub Issues
Discussions: GitHub Discussions
๐ Star History
If this project helps you, please consider giving it a star on GitHub! โญ
Made with โค๏ธ for the AI community
Available Tools
1 toolai_peer_reviewB
Get peer review feedback from Google Gemini on your response to help improve accuracy and completeness
| Name | Required | Description | Default |
|---|---|---|---|
| user_question | Yes | The original question asked by the user | |
| my_answer | Yes | Your initial response that needs peer review |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that feedback comes 'from Google Gemini' but does not describe key behavioral traits such as response format, latency, rate limits, authentication needs, or potential costs. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it operates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse. Every part of the sentence earns its place by contributing essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete for a tool that involves AI feedback. It does not explain what the output will look like (e.g., structured feedback, scores, or text), nor does it cover behavioral aspects like error handling or limitations. For a tool with this complexity, more contextual information is needed to ensure proper usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear documentation for both parameters ('user_question' and 'my_answer'). The description does not add any additional semantic context beyond what the schema provides, such as formatting examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get peer review feedback from Google Gemini on your response to help improve accuracy and completeness.' It specifies the verb ('Get peer review feedback'), resource ('from Google Gemini'), and goal ('improve accuracy and completeness'). However, with no sibling tools mentioned, there's no explicit differentiation from alternatives, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context ('on your response to help improve accuracy and completeness'), suggesting it should be used when seeking quality improvement for an answer. However, it lacks explicit guidance on when to use this tool versus other methods (e.g., self-review or other AI models) and does not specify any exclusions or prerequisites, leaving usage somewhat vague.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
ai_peer_review
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined and distinct by default.
A single tool inherently follows a consistent naming pattern. The tool name 'ai_peer_review' uses snake_case and clearly describes its function without any conflicting conventions.
A single tool is too few for a server named 'AI Peer Review MCP Server', which suggests a broader scope for peer review functionality. This minimal toolset limits the server's utility and feels incomplete for its apparent purpose.
The server is severely incomplete for peer review operations. It only provides feedback generation via one tool, lacking essential functions like managing reviews, listing past reviews, or handling different review types, which are expected in a peer review domain.
Maintenance
Related MCP Connectors
Task-first cross-agent collaboration for discussions, review, referrals, and reusable knowledge.
Shared semantic graph for AI reviews, classification and structured memory across AI assistants.
Versioned artifact review for people and AI agents, with contextual comments and human control.
Multi-LLM council: 25+ frontier models in parallel, consensus scoring, verdict-first code review.
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceEnables multi-agent code review with cross-verification of findings against source code, catching hallucinations and improving agent accuracy over time.75 npm41MIT- AlicenseNot gradedqualityDmaintenanceEnables deep reasoning and cognitive enhancement through multi-agent debate, bias detection, and structured thinking, with privacy-first local execution.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables two local LLMs (Qwen and Llama) to communicate via MCP, allowing one model to consult the other for second opinions or additional reasoning.1-

KogCat MCP Serverofficial
FlicenseNot gradedqualityDmaintenanceProvides AI-assisted judgment calibration by surfacing counterexamples, boundaries, and blind spots from a local knowledge base before acting on model answers.-