Labsco
ravikant1918 logo

NeuroDev MCP Server

from ravikant1918

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.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

๐Ÿง  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 & PEP8
    • flake8 - Style enforcement
    • mypy - Type checking
    • bandit - Security scanning
    • radon - Complexity metrics
    • AST - 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 style
    • autopep8 - PEP8 compliance
  • Configurable line length
  • Consistent code style
  • One-command formatting

๐ŸŒ 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:

# Default STDIO transport
neurodev-mcp

# Or explicitly specify STDIO
neurodev-mcp --transport stdio

Configuration (Claude Desktop):

{
  "mcpServers": {
    "neurodev-mcp": {
      "command": "neurodev-mcp",
      "args": ["--transport", "stdio"]
    }
  }
}

SSE (Server-Sent Events) - Web Integration

For web-based integrations and HTTP streaming:

# Run with SSE on default port (8000)
neurodev-mcp --transport sse

# Custom host and port
neurodev-mcp --transport sse --host 0.0.0.0 --port 3000

Endpoints:

  • SSE Stream: http://localhost:8000/sse
  • Messages: http://localhost:8000/messages (POST)

Web Client Example:

const sse = new EventSource('http://localhost:8000/sse');

sse.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Received:', data);
};

// Send message
fetch('http://localhost:8000/messages', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    method: 'tools/call',
    params: {
      name: 'code_review',
      arguments: { code: 'def test(): pass', analyzers: ['pylint'] }
    }
  })
});

Transport Comparison

TransportUse CaseBest For
STDIOLocal CLI clientsClaude Desktop, Cline, local development
SSEWeb integrationsBrowser apps, webhooks, remote clients

๐Ÿ› ๏ธ Available Tools

1. code_review

๐Ÿ” Comprehensive code analysis with multiple static analysis tools

Input:

{
  "code": "def calculate(x):\n    return x * 2",
  "analyzers": ["pylint", "flake8", "mypy", "bandit", "radon", "ast"]
}

Output:

  • Detailed issue reports from each analyzer
  • Security vulnerabilities
  • Complexity metrics
  • Code quality scores
  • Line-by-line suggestions

2. generate_tests

๐Ÿงช Intelligent pytest test generation using AST analysis

Input:

{
  "code": "def add(a: int, b: int) -> int:\n    return a + b",
  "module_name": "calculator",
  "save": false
}

Output:

  • Complete pytest test suite
  • Multiple test cases (happy path, edge cases, exceptions)
  • Type validation tests
  • Ready-to-run test code

3. run_tests

โ–ถ๏ธ Execute pytest tests with coverage reporting

Input:

{
  "test_code": "def test_add():\n    assert add(1, 2) == 3",
  "source_code": "def add(a, b):\n    return a + b",
  "timeout": 30
}

Output:

  • Pass/fail status
  • Coverage percentage
  • Line coverage details
  • Execution time
  • Detailed stdout/stderr

4. format_code

๐ŸŽจ Auto-format Python code to PEP8 standards

Input:

{
  "code": "def   messy(  x,y  ):\n        return x+y",
  "line_length": 88
}

Output:

  • Beautifully formatted code
  • PEP8 compliant
  • Consistent style
  • Change detection

๐Ÿงช Development

Running Tests

# Run installation tests
python test_installation.py

# Run examples
python examples.py

# Run pytest (if you add tests)
pytest

Using as a Library

from neurodev_mcp import CodeAnalyzer, TestGenerator, TestExecutor
import asyncio

# Analyze code
code = "def hello(): print('world')"
result = asyncio.run(CodeAnalyzer.analyze_ast(code))

# Generate tests
tests = TestGenerator.generate_tests(code, "mymodule")

# Run tests
output = TestExecutor.run_tests(test_code, source_code)

๐Ÿค Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: python test_installation.py
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open 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


๐Ÿ“ž Support


Ready to supercharge your Python development! ๐Ÿš€

Made with โค๏ธ by the NeuroDev Team

โญ Star on GitHub โ€ข ๐Ÿ› Report Bug โ€ข โœจ Request Feature