mcp-codesentry
v1.0.0
Published
CodeSentry MCP - AI-powered code review assistant with 5 specialized review tools for security, best practices, and comprehensive code analysis
Maintainers
Readme
CodeSentry MCP 🛡️
AI-powered code review assistant for LLM development workflows
CodeSentry is a Model Context Protocol (MCP) server that provides comprehensive code review capabilities through 5 specialized review tools. Built for Cursor, Claude Code, and other MCP-compatible AI assistants.
✨ Features
🔍 Plan Review - Validates implementation plans against codebase context
📊 Implementation Review - Compares completed work vs. original plans
🏗️ Code Review - General codebase analysis with focus areas
🔒 Security Review - Vulnerability assessment and security analysis
📐 Best Practices Review - Code quality and maintainability analysis
🚀 Quick Start
For Cursor
Install & Build:
git clone https://github.com/crazyrabbitLTC/mcp-codesentry.git cd mcp-codesentry npm install && npm run buildAdd to Cursor Settings (
Cmd/Ctrl + ,→ Extensions → MCP):{ "mcpServers": { "codesentry": { "command": "node", "args": ["/path/to/mcp-codesentry/dist/index.js"], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }Get API Key: Google AI Studio
Use in Chat:
@codesentry Please review this codebase for security issues
For Claude Code
Complete steps 1-3 above
Add to MCP Settings (
~/.claude/mcp_servers.json):{ "codesentry": { "command": "node", "args": ["/path/to/mcp-codesentry/dist/index.js"], "env": { "GEMINI_API_KEY": "your-api-key-here" } } }
🔧 Available Tools
security_review
// Comprehensive security vulnerability assessment
{
"codebasePath": "./src",
"securityFocus": "authentication" // optional
}best_practices_review
// Code quality and maintainability analysis
{
"codebasePath": "./src",
"practicesFocus": "testing", // optional
"language": "TypeScript" // optional
}code_review
// General codebase analysis
{
"codebasePath": "./src",
"reviewFocus": "performance" // optional
}review_plan
// Pre-task planning validation
{
"taskId": "feature-123",
"taskDescription": "Add user authentication",
"implementationPlan": "Use JWT with refresh tokens...",
"codebasePath": "./src"
}review_implementation
// Post-task implementation review
{
"taskId": "feature-123",
"taskDescription": "Add user authentication",
"originalPlan": "Use JWT with refresh tokens...",
"implementationSummary": "Implemented JWT auth with Redis...",
"beforePath": "./before",
"afterPath": "./after"
}🏗️ How It Works
AI Assistant → MCP Tool → Repomix Analysis → Gemini Review → Structured FeedbackBenefits:
- ✅ Handles large codebases without context window limits
- ✅ Leverages Gemini's 2M+ token context for full analysis
- ✅ Returns concise, actionable feedback
- ✅ Maintains context between planning and implementation
🛡️ Security & Privacy
- 🔐 Local Processing - Your code stays on your machine
- 🔑 API Key Security - Environment variables only
- 🗑️ Auto Cleanup - Temporary files automatically deleted
- 📝 Audit Logging - Comprehensive operation logs
🧪 Development
npm run dev # Development mode
npm test # Run test suite (32 tests)
npm run build # TypeScript build
npm run lint # Code linting📋 Requirements
- Node.js 18+
- Google Gemini API Key (Get one free)
- MCP-compatible AI Assistant (Cursor, Claude Code, etc.)
🤝 Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
👨💻 Authors
Dennison Bertram - Creator & Maintainer
GitHub: @crazyrabbitLTC
Email: [email protected]
Claude (Anthropic) - AI Development Partner
Assisted with architecture, implementation, and testing
📄 License
MIT License - see LICENSE file for details.
⭐ Star this repo if CodeSentry helps improve your code quality!
