Enables automated generation of test suites based on AST analysis and execution of tests with detailed coverage reporting and performance metrics.
Provides comprehensive static analysis, security scanning, type checking, and automated PEP8 formatting for Python source code.
🧠 NeuroDev MCP Server
Intelligent Code Analysis, Test Generation & Execution
A powerful Model Context Protocol (MCP) server that supercharges your Python development workflow with AI-powered code review, intelligent test generation, and comprehensive test execution.
Features • Installation • Quick Start • Tools • Examples
✨ Features
🔍 Code Review
6 Powerful Analyzers
pylint- Code quality & PEP8flake8- Style enforcementmypy- Type checkingbandit- Security scanningradon- Complexity metricsAST- Custom inspections
Real-time issue detection
Security vulnerability scanning
Complexity & maintainability scores
🧪 Test Generation
Intelligent AST Analysis
Auto-generate pytest tests
Happy path coverage
Edge case handling
Exception testing
Type validation tests
Supports functions & classes
Type-hint aware
▶️ Test Execution
Comprehensive Testing
Isolated environment
Coverage reporting
Line-by-line analysis
Timeout protection
Detailed pass/fail results
Performance metrics
🎨 Code Formatting
Auto-formatting
black- Opinionated styleautopep8- PEP8 compliance
Configurable line length
Consistent code style
One-command formatting
📦 Installation
Quick Install
```bash
🚀 Quick Start
Step 1: Configure Your MCP Client
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
💡 Tip: Replace
/absolute/path/to/neurodev-mcpwith your actual path
Add to your MCP settings:
Run the server directly:
Step 2: Restart Your Client
Restart Claude Desktop or reload VSCode to load the server.
Step 3: Start Using! 🎉
Try these commands with your AI assistant:
"Review this Python code for issues"
"Generate unit tests for this function"
"Run these tests with coverage"
"Format this code to PEP8 standards"
🌐 Transport Options
NeuroDev MCP supports multiple transport protocols for different use cases:
STDIO (Default) - Local CLI
Perfect for local development with MCP clients like Claude Desktop or Cline:
Configuration (Claude Desktop):
SSE (Server-Sent Events) - Web Integration
For web-based integrations and HTTP streaming:
Endpoints:
SSE Stream:
http://localhost:8000/sseMessages:
http://localhost:8000/messages(POST)
Web Client Example:
Transport Comparison
Transport | Use Case | Best For |
STDIO | Local CLI clients | Claude Desktop, Cline, local development |
SSE | Web integrations | Browser apps, webhooks, remote clients |
🛠️ Available Tools
1.
🔍 Comprehensive code analysis with multiple static analysis tools
Input:
Output:
Detailed issue reports from each analyzer
Security vulnerabilities
Complexity metrics
Code quality scores
Line-by-line suggestions
2.
🧪 Intelligent pytest test generation using AST analysis
Input:
Output:
Complete pytest test suite
Multiple test cases (happy path, edge cases, exceptions)
Type validation tests
Ready-to-run test code
3.
▶️ Execute pytest tests with coverage reporting
Input:
Output:
Pass/fail status
Coverage percentage
Line coverage details
Execution time
Detailed stdout/stderr
4.
🎨 Auto-format Python code to PEP8 standards
Input:
Output:
Beautifully formatted code
PEP8 compliant
Consistent style
Change detection
💡 Usage Examples
Example 1: Complete Code Review Workflow
Example 2: Test Generation & Execution
Example 3: Code Formatting
📋 Requirements
Package | Version | Purpose |
| ≥0.9.0 | Model Context Protocol SDK |
| ≥3.0.0 | Code quality analysis |
| ≥7.0.0 | Style checking |
| ≥1.7.0 | Static type checking |
| ≥1.7.5 | Security scanning |
| ≥6.0.1 | Complexity metrics |
| ≥23.12.0 | Code formatting |
| ≥2.0.4 | PEP8 formatting |
| ≥7.4.3 | Testing framework |
| ≥4.1.0 | Coverage reporting |
| ≥2.2.0 | Test timeouts |
Python: 3.8 or higher
🧪 Development
Running Tests
Using as a Library
❓ Troubleshooting
✅ Check that the path in config is absolute
✅ Ensure the Python executable path is correct
✅ Restart Claude Desktop or VSCode completely
✅ Check server logs for errors
✅ Ensure Python 3.8+ is installed
✅ Activate virtual environment:
source .venv/bin/activate✅ Reinstall dependencies:
pip install -e .✅ Run:
python test_installation.pyto diagnose
Some analyzers (pylint, mypy) can be slow on large files
Use specific analyzers:
"analyzers": ["flake8", "ast"]Increase timeout for large test suites
Consider caching results (future feature)
🤝 Contributing
Contributions are welcome! Here's how:
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes
Run tests:
python test_installation.pyCommit:
git commit -m 'Add amazing feature'Push:
git push origin feature/amazing-featureOpen a Pull Request
Future Enhancements
Additional analyzers (pydocstyle, vulture)
Result caching for performance
Configuration file support
Web dashboard
Multi-language support
CI/CD pipeline
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Built with the Model Context Protocol
Testing with pytest
Formatting with black
📞 Support
📖 Documentation: You're reading it!
🐛 Issues: GitHub Issues
💬 Discussions: GitHub Discussions
📧 Email: team@neurodev.io
Ready to supercharge your Python development! 🚀
Made with ❤️ by the NeuroDev Team