MCP Code Analysis & Quality Server
Provides comprehensive code analysis through three MCP servers: static analysis for code quality and security, dependency analysis for package management and vulnerabilities, and complexity analysis for maintainability assessment across multiple programming languages.
README
MCP Code Analysis & Quality Server
Note: This project was recently completed and has not undergone extensive testing. Use with caution and report any issues you encounter.
Developed by: Chris Bunting
A suite of MCP (Model Context Protocol) servers providing code analysis, dependency management, complexity analysis, and intelligent prioritization capabilities.
Overview
This project provides three MCP servers and one intelligent prioritization library that deliver comprehensive code quality analysis:
- Static Analysis Server: Code quality and security analysis
- Dependency Analysis Server: Dependency management and analysis
- Complexity Analyzer Server: Code complexity assessment
- Intelligent Prioritizer: AI-powered prioritization library (used by other servers)
Features
Static Analysis Server
- Code quality analysis
- Security vulnerability detection
- Best practices validation
- Multi-language support (JavaScript, TypeScript, Python, Java, C++, Go, Rust)
Dependency Analysis Server
- Dependency analysis and management
- Package compatibility checking
- Security vulnerability scanning
- Version resolution and conflict detection
Complexity Analyzer Server
- Code complexity measurement
- Maintainability assessment
- Code structure analysis
- AST-based processing
Intelligent Prioritizer
- AI-powered prioritization library
- Context-aware analysis engine
- Learning-based recommendations
- Impact assessment and scoring (used internally by other servers)
Quick Start
Prerequisites
- Node.js 18.0 or higher
- npm 8.0 or higher
- Git
Development Installation
Clone the repository and install dependencies:
# Clone the repository
git clone <repository-url>
cd mcp-code-analysis-server
# Install all dependencies
npm install
# Build all packages
npm run build
MCP Configuration
After building, add the following to your MCP client's configuration file (usually mcp.json or similar):
{
"mcpServers": {
"static-analysis-server": {
"command": "node",
"args": ["/path/to/mcp-code-analysis-server/packages/static-analysis-server/dist/index.js"],
"env": {
"NODE_ENV": "development"
}
},
"dependency-analysis-server": {
"command": "node",
"args": ["/path/to/mcp-code-analysis-server/packages/dependency-analysis-server/dist/index.js"],
"env": {
"NODE_ENV": "development"
}
},
"complexity-analyzer-server": {
"command": "node",
"args": ["/path/to/mcp-code-analysis-server/packages/complexity-analyzer-server/dist/index.js"],
"env": {
"NODE_ENV": "development"
}
}
}
}
Note: Replace /path/to/mcp-code-analysis-server with the actual path to your cloned repository.
Development Workflow
For development and testing:
# Run tests
npm test
# Run linting
npm run lint
# Run type checking
npm run type-check
# Start individual servers for testing
cd packages/static-analysis-server
npm start
cd ../dependency-analysis-server
npm start
cd ../complexity-analyzer-server
npm start
Usage
Once configured, the MCP servers will be automatically available in your MCP client. Each server provides specific tools:
- Static Analysis Server: Code quality analysis, security checks, best practices validation
- Dependency Analysis Server: Package dependency analysis, compatibility checking, security scanning
- Complexity Analyzer Server: Code complexity measurement, maintainability assessment
- Intelligent Prioritizer: AI-powered prioritization library (integrated into other servers)
Development
Available Scripts
# Build all packages
npm run build
# Build shared packages first, then servers
npm run build:shared
npm run build:servers
# Run tests across all packages
npm test
# Run linting
npm run lint
# Run type checking
npm run type-check
# Clean all packages
npm run clean
Project Structure
mcp-code-analysis-server/
├── packages/
│ ├── static-analysis-server/ # Static code analysis MCP server
│ │ ├── src/
│ │ ├── dist/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── dependency-analysis-server/ # Dependency analysis MCP server
│ │ ├── src/
│ │ ├── dist/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── complexity-analyzer-server/ # Complexity analysis MCP server
│ │ ├── src/
│ │ ├── dist/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── intelligent-prioritizer/ # AI prioritization library
│ │ ├── src/
│ │ ├── dist/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── combined-reporting/ # Combined analysis reporting
│ │ └── src/
│ ├── context-aware-analysis/ # Context-aware analysis engine
│ │ └── src/
│ ├── knowledge-base/ # Knowledge base service
│ │ └── src/
│ ├── progressive-disclosure/ # Progressive disclosure service
│ │ └── src/
│ ├── quality-dashboard/ # Quality dashboard service
│ │ └── src/
│ ├── team-preference-learning/ # Team preference learning
│ │ └── src/
│ ├── shared-cache/ # Shared caching utilities
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── shared-communication/ # Shared communication utilities
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── shared-config/ # Shared configuration utilities
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── shared-logger/ # Shared logging utilities
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── shared-plugins/ # Shared plugin system
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ └── shared-types/ # Shared type definitions
│ ├── src/
│ ├── package.json
│ └── tsconfig.json
├── docker/ # Docker configurations
│ ├── complexity-analyzer.Dockerfile
│ ├── dependency-analysis.Dockerfile
│ └── static-analysis.Dockerfile
├── docker-compose.yml
├── jest.config.js # Test configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Workspace configuration
├── mcp.json # MCP configuration
├── README.md
├── LICENSE
├── CHANGELOG.md
└── mcp_instructions.md
Architecture
The project uses a monorepo structure with shared packages:
- Shared Packages: Common utilities, types, and configurations
- Server Packages: Individual MCP servers with specific functionality
- Library Packages: Reusable libraries (e.g., intelligent-prioritizer)
- Analysis Packages: Specialized analysis components
## Development
### Available Scripts
```bash
# Build all packages
npm run build
# Run all tests
npm run test
# Run linting
npm run lint
# Type checking
npm run type-check
# Development mode
npm run dev
# Clean build artifacts
npm run clean
Testing
Run all tests:
npm test
Code Quality
This project uses several tools to maintain code quality:
- ESLint: JavaScript/TypeScript linting
- Prettier: Code formatting
- Jest: Unit testing
- TypeScript: Type checking
Docker
Build and run with Docker:
# Build images
docker build -t mcp-code-analysis/static-analysis-server -f docker/static-analysis.Dockerfile .
docker build -t mcp-code-analysis/dependency-analysis-server -f docker/dependency-analysis.Dockerfile .
docker build -t mcp-code-analysis/complexity-analyzer-server -f docker/complexity-analyzer.Dockerfile .
docker build -t mcp-code-analysis/intelligent-prioritizer -f docker/intelligent-prioritizer.Dockerfile .
# Run containers
docker run mcp-code-analysis/static-analysis-server
docker run mcp-code-analysis/dependency-analysis-server
docker run mcp-code-analysis/complexity-analyzer-server
docker run mcp-code-analysis/intelligent-prioritizer
Or use docker-compose:
docker-compose up
Release Notes
Version 1.0.1 (2025-09-10)
🎉 Initial Production Release
This is the first production-ready release of the MCP Code Analysis & Quality Server, providing comprehensive code analysis capabilities through three integrated MCP servers.
What's New
- Static Analysis Server: Multi-language code quality and security analysis
- Dependency Analysis Server: Complete dependency management and security scanning
- Complexity Analyzer Server: Advanced code complexity assessment
- Intelligent Prioritizer: Smart issue prioritization with team learning
- Shared Infrastructure: Robust caching, communication, and configuration systems
Key Features
- ✅ Full TypeScript implementation with strict typing
- ✅ Multi-language support (JavaScript, TypeScript, Python, Java, C++, Go, Rust)
- ✅ Docker containerization for all servers
- ✅ MCP Protocol compliance
- ✅ Comprehensive testing framework setup
- ✅ ESLint configuration with auto-fix capabilities
Known Items
- Some ESLint warnings remain (to be addressed in future patches)
- Test coverage to be expanded in upcoming releases
- Documentation examples to be enhanced
Development Setup
git clone <repository-url>
cd mcp-code-analysis-server
npm install
npm run build
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Model Context Protocol for the underlying protocol
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。