mcp-server

mikeholownych/mcp-server

3.2

If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP Content Processor (MCP-Server) is a production-grade multimodal content processor designed for ideation, research, summarization, and content transformation.

šŸ¤– Ethical AI Insider

Production-grade FastAPI/MCP/A2A server for AI ethics analysis and monitoring.

✨ Features

  • šŸ” Comprehensive Ethical Analysis: Multi-dimensional ethical assessment of AI systems
  • šŸŽÆ Bias Detection: Advanced bias detection across multiple categories
  • āš–ļø Fairness Assessment: Evaluate fairness and equity in AI decisions
  • šŸ”’ Privacy Impact Analysis: Assess privacy implications of AI systems
  • šŸ”Œ MCP Integration: Model Context Protocol for tool orchestration
  • šŸ¤ A2A Communication: Agent-to-Agent communication capabilities
  • šŸ“Š Production Monitoring: Comprehensive logging, metrics, and observability
  • šŸ” Enterprise Security: JWT authentication, CORS, security headers
  • 🐳 Container Ready: Docker and Kubernetes deployment support

šŸš€ Quick Start

Development Setup

  • OpenAI-Powered Code Review: Automated review endpoint for any Python code, returning actionable insights and best practices.
  • Automated Enhancement Queue: API-driven suggestion and management of codebase improvements, including agent-simulated checks.
  • Multi-file PR Automation: Automatically create, update, and squash-merge PRs via the MCP API or utility module.
  • GitHub Integration: Native support for branch creation, multi-file commit, PR commenting, merging, and webhook-based triggers.
  • Batch Enhancement PRs: Groups multiple enhancements into a single pull request to minimize noise and comply with GitHub ToS.
  • Automated Documentation: README and Changelog auto-update on every release or major change.
  • Performance Tracking: Records content generation stats for continuous improvement.
# Clone the repository
git clone <repository-url>
cd ethical-ai-insider

# Run setup script
./scripts/setup.sh

# Start development server
make start
# or
./scripts/start-dev.sh
EndpointMethodAuthDescription
/api/enhancementPOSTx-mcp-secret headerQueue a new code enhancement request
/api/enhancement-logGETNoneReturn simulated agent log for enhancements
/api/autogen-enhancementsPOSTx-mcp-secret headerScan codebase for suggested enhancements
/api/enhancementsGETx-mcp-secret headerList all queued enhancement requests
/api/code-reviewPOSTx-mcp-secret headerGet OpenAI-powered code review (Python only)
/api/trigger-enhancement-cyclePOSTx-mcp-secret headerStart background automation for enhancements
/api/performanceGETNoneAggregated content generation metrics
/api/performancePOSTNoneRecord a content generation event
/api/healthGETNoneHealthcheck endpoint

Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

# For production
docker-compose -f docker-compose.prod.yml up -d

Access the Application

šŸ“š API Usage

Authentication

# Login to get access token
curl -X POST "http://localhost:5005/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "password"}'

Ethical Analysis

# Perform ethical analysis
curl -X POST "http://localhost:5005/api/v1/analysis/ethical" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "AI hiring system using historical data",
    "analysis_type": "comprehensive"
  }'

Bias Detection

# Detect bias in content
curl -X POST "http://localhost:5005/api/v1/analysis/bias" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "AI system description",
    "analysis_type": "bias_detection"
  }'

MCP Tool Execution

# Execute MCP tool
curl -X POST "http://localhost:5005/api/v1/mcp/execute" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tool_name": "ethical_analysis",
    "parameters": {"content": "content to analyze"}
  }'

šŸ› ļø Development

Available Commands

make setup          # Setup development environment
make start          # Start development server
make test           # Run tests
make test-cov       # Run tests with coverage
make lint           # Run code linting
make format         # Format code
make docker-build   # Build Docker image

Running Tests

# All tests
./scripts/test.sh

# Specific test categories
./scripts/test.sh unit         # Unit tests only
./scripts/test.sh integration  # Integration tests only
./scripts/test.sh e2e         # End-to-end tests only
./scripts/test.sh coverage   # Tests with coverage report

Code Quality

# Format code
black app/ mcp/ tests/
isort app/ mcp/ tests/

# Run linting
flake8 app/ mcp/ tests/
mypy app/ mcp/

# Pre-commit hooks (auto-installed)
pre-commit run --all-files

šŸ—ļø Architecture

ethical-ai-insider/
ā”œā”€ā”€ app/                    # FastAPI application
│   ā”œā”€ā”€ api/v1/            # API endpoints
│   ā”œā”€ā”€ core/              # Configuration & security
│   ā”œā”€ā”€ models/            # Database models
│   ā”œā”€ā”€ schemas/           # Pydantic schemas
│   ā”œā”€ā”€ services/          # Business logic
│   └── utils/             # Utilities
ā”œā”€ā”€ mcp/                   # MCP server & tools
│   ā”œā”€ā”€ tools/             # Analysis tools
│   ā”œā”€ā”€ protocols/         # MCP protocols
│   └── server.py          # MCP server
ā”œā”€ā”€ tests/                 # Comprehensive test suite
│   ā”œā”€ā”€ unit/              # Unit tests
│   ā”œā”€ā”€ integration/       # Integration tests
│   └── e2e/               # End-to-end tests
ā”œā”€ā”€ scripts/               # Development & deployment scripts
└── docker/                # Docker configurations

šŸ”§ Configuration

Environment Variables

Create .env file from .env.example:

cp .env.example .env
# Edit .env with your configuration

Key Configuration Options

  • SECRET_KEY: JWT token secret
  • DATABASE_URL: Database connection string
  • REDIS_URL: Redis connection string
  • MCP_SERVER_PORT: MCP server port
  • A2A_ENABLED: Enable A2A communication
  • SENTRY_DSN: Error tracking DSN

šŸš€ Deployment

Production Deployment

# Set environment variables
export DOCKER_REGISTRY=ghcr.io/your-username

# Deploy to production
./scripts/deploy-prod.sh

Kubernetes Deployment

# kubernetes/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ethical-ai-insider
spec:
  replicas: 3
  selector:
    matchLabels:
      app: ethical-ai-insider
  template:
    metadata:
      labels:
        app: ethical-ai-insider
    spec:
      containers:
      - name: app
        image: ghcr.io/your-username/ethical-ai-insider:latest
        ports:
        - containerPort: 8000
        env:
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: app-secrets
              key: database-url

Health Checks

The application provides multiple health check endpoints:

  • /health - Basic health check
  • /api/v1/health/detailed - Detailed health with dependency checks
  • /api/v1/health/readiness - Kubernetes readiness probe
  • /api/v1/health/liveness - Kubernetes liveness probe

šŸ“Š Monitoring

Metrics

Prometheus metrics available at /metrics:

  • HTTP request metrics
  • Application performance metrics
  • Custom business metrics

Logging

Structured logging with configurable levels:

  • JSON format for production
  • Pretty format for development
  • Integration with external log aggregators

Error Tracking

Optional Sentry integration for error tracking and performance monitoring.

šŸ”’ Security

  • JWT-based authentication
  • CORS protection
  • Security headers (XSS, CSRF protection)
  • Input validation and sanitization
  • Rate limiting (configurable)
  • HTTPS enforcement in production

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make changes with tests: ./scripts/test.sh
  4. Run quality checks: make lint format
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Submit pull request

šŸ“„ License

This project is licensed under the MIT License - see the file for details.

šŸ™ Acknowledgments

  • FastAPI for the excellent web framework
  • Model Context Protocol for AI tool orchestration
  • The open-source community for amazing tools and libraries

Built with ā¤ļø for Ethical AI