@gc-mcp/codeimpact
v1.0.4
Published
MCP Server for Code Impact Analysis - provides intelligent analysis of code changes and their impact across microservices architecture
Maintainers
Readme
Code Impact Analysis MCP Server
The Code Impact Analysis MCP Server automatically analyzes code changes and their impact across the microservices architecture, saving 30-60 minutes of manual dependency analysis per change. This server provides intelligent analysis of how code changes propagate through the system and suggests optimal testing and deployment strategies.
Features
- Intelligent Change Classification: Automatically classifies code changes by type and impact scope
- Dependency Analysis: Builds comprehensive dependency graphs across services
- Impact Calculation: Calculates the impact of changes on affected services
- Breaking Change Detection: Identifies potential breaking changes
- Test Strategy Recommendations: Suggests optimal testing strategies
- Deployment Order Optimization: Recommends optimal deployment sequences
Installation
npm install @gc-mcp/code-impact-analysisUsage
As MCP Server
# Start the MCP server
npx mcp-code-impact start
# Or use the runner script
./run-mcp-server.shAs CLI Tool
# Analyze specific files
npx mcp-code-impact analyze -f src/api/user.ts src/services/auth.ts
# Set analysis depth
npx mcp-code-impact analyze -f src/api/user.ts -d comprehensive
# Output in different format
npx mcp-code-impact analyze -f src/api/user.ts -o yamlConfiguration
Set the following environment variables:
# Analysis Configuration
IMPACT_ANALYSIS_DEPTH=deep
BREAKING_CHANGE_THRESHOLD=medium
TEST_RECOMMENDATION_CONFIDENCE=0.8
# Service Discovery
SERVICE_DISCOVERY_PATH=./platform
SHARED_LIBRARIES_PATH=./libs
# Caching
ENABLE_ANALYSIS_CACHE=true
CACHE_TTL_MINUTES=60
# Logging
LOG_LEVEL=infoMCP Tools
analyze_code_impact
Analyze the impact of code changes across the microservices architecture.
Parameters:
changed_files(required): List of changed file pathschange_context(optional): Context about the changes (branch, commit message, etc.)analysis_depth(optional): Depth of analysis (shallow, deep, comprehensive)include_dependencies(optional): Include indirect dependenciesfocus_areas(optional): Focus on specific areas (api, database, etc.)
find_affected_services
Find all services affected by specific code changes.
Parameters:
changes(required): Array of change objectsinclude_dependencies(optional): Include indirect dependenciesimpact_threshold(optional): Minimum impact level to include
suggest_test_strategy
Suggest optimal testing strategy based on code impact analysis.
Parameters:
impact_analysis(required): Result from analyze_code_impacttest_constraints(optional): Test execution constraintsteam_preferences(optional): Team-specific preferences
detect_breaking_changes
Detect potential breaking changes in code modifications.
Parameters:
changes(required): Array of change objectsapi_schemas(optional): Current API schemasdatabase_schemas(optional): Current database schemasinterface_contracts(optional): Service interface contracts
recommend_deployment_order
Recommend optimal deployment order based on service dependencies.
Parameters:
services(required): Services to be deployeddeployment_strategy(optional): Deployment strategy (rolling, blue_green, canary, recreate)risk_tolerance(optional): Risk tolerance levelrollback_requirements(optional): Consider rollback requirements
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lint
# Fix linting issues
npm run lint:fixDocker
# Build Docker image
npm run docker:build
# Run with Docker
npm run docker:run
# Stop Docker container
npm run docker:stop
# View Docker logs
npm run docker:logsLicense
MIT
