mikeholownych/mcp-server
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
Endpoint | Method | Auth | Description |
---|---|---|---|
/api/enhancement | POST | x-mcp-secret header | Queue a new code enhancement request |
/api/enhancement-log | GET | None | Return simulated agent log for enhancements |
/api/autogen-enhancements | POST | x-mcp-secret header | Scan codebase for suggested enhancements |
/api/enhancements | GET | x-mcp-secret header | List all queued enhancement requests |
/api/code-review | POST | x-mcp-secret header | Get OpenAI-powered code review (Python only) |
/api/trigger-enhancement-cycle | POST | x-mcp-secret header | Start background automation for enhancements |
/api/performance | GET | None | Aggregated content generation metrics |
/api/performance | POST | None | Record a content generation event |
/api/health | GET | None | Healthcheck 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 Documentation: http://localhost:5005/api/v1/docs
- Health Check: http://localhost:5005/health
- Metrics: http://localhost:5005/metrics
š 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 secretDATABASE_URL
: Database connection stringREDIS_URL
: Redis connection stringMCP_SERVER_PORT
: MCP server portA2A_ENABLED
: Enable A2A communicationSENTRY_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
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make changes with tests:
./scripts/test.sh
- Run quality checks:
make lint format
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- 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