@wemake.cx/ethical-reasoning
v0.4.6
Published
MCP server for structured ethical reasoning across multiple frameworks
Readme
Ethical Reasoning MCP Server
A specialized tool for evaluating proposed actions using multiple ethical frameworks. This server helps models analyze moral dimensions of decisions through systematic application of established ethical theories.
Core Concepts
Ethical Frameworks
The server supports five major ethical frameworks for comprehensive moral analysis:
- Utilitarianism: Evaluates actions based on their consequences and overall utility
- Deontology: Focuses on duties, rights, and the inherent rightness of actions
- Virtue Ethics: Considers character traits and what a virtuous person would do
- Care Ethics: Emphasizes relationships, care, and contextual moral reasoning
- Social Contract: Analyzes actions through the lens of social agreements and fairness
Ethical Analysis Process
Ethical reasoning follows a structured approach:
- Scenario Definition: Clear description of the situation requiring ethical evaluation
- Action Specification: Precise statement of the proposed action or policy
- Framework Application: Systematic analysis through selected ethical lenses
- Comparative Assessment: Evaluation of how different frameworks align or conflict
- Confidence Calibration: Assessment of certainty in the ethical analysis
- Recommendation Synthesis: Integration of insights across frameworks
Multi-Framework Analysis
The server encourages analysis through multiple ethical frameworks to:
- Identify potential blind spots in moral reasoning
- Reveal tensions between different ethical approaches
- Provide more comprehensive ethical assessment
- Support nuanced decision-making in complex moral situations
API
Tools
- ethicalReasoning
- Evaluate proposed actions using multiple ethical frameworks
- Input: Ethical analysis request data
scenario(string): Description of the situation requiring ethical evaluationaction(string): Specific action or policy to evaluateframeworks(string[]): Ethical frameworks to apply- Available options: ["utilitarianism","deontology","virtue","care","social-contract"]
- Minimum 1 framework required
confidence(number): Confidence in the information provided (0.0-1.0)nextStepNeeded(boolean): Whether further analysis is requiredsuggestedNext(string[]): Suggested frameworks for follow-up analysis (optional)
- Returns comprehensive ethical analysis with framework-specific evaluations
- Supports iterative refinement through multiple analysis rounds
Limitations & Operational Workflow
Limitations
This tool is designed as a decision-support aid, not an automated moral decision-maker. It has the following limitations:
- Non-Deterministic Guidance: The tool provides ethical perspectives and considerations, not definitive "right" or "wrong" answers.
- Context Sensitivity: The quality of the analysis depends heavily on the detail and nuance provided in the
scenariodescription. - No Moral Agency: The tool does not hold moral responsibility; it merely reflects established ethical frameworks onto the provided input.
- Framework Bias: Each framework has inherent biases (e.g., Utilitarianism favors the majority, Deontology favors rules). The tool does not reconcile these differences but presents them for human synthesis.
Operational Workflow
The tool operates through a strict, linear workflow to ensure consistent analysis:
- Input Validation:
- Validates presence of
scenarioandaction. - Verifies selected
frameworksare supported. - Checks confidence scores are within 0.0-1.0 range.
- Validates presence of
- Framework Analysis (Parallel):
- The tool processes the input against each selected framework independently.
- Generates framework-specific guidance based on the unique principles of that theory.
- Result Aggregation:
- Compiles all framework analyses into a structured result object.
- Calculates metadata (request number, confidence pass-through).
- Output Generation:
- Returns the structured
EthicalAnalysisResultcontaining specific guidance for each framework.
- Returns the structured
TypeScript API (Code Mode)
The server exposes a strongly-typed TypeScript API for programmatic usage:
import { EthicalReasoningAPI } from "@wemake.cx/ethical-reasoning";
const api = new EthicalReasoningAPI();
const result = await api.analyze({
scenario: "Company decision on layoffs",
action: "Proceed with layoffs",
frameworks: ["utilitarianism", "deontology"],
confidence: 0.8,
nextStepNeeded: false
});
console.log(result.guidance.utilitarianism);
// Output: "Consider total expected benefits..."Framework-Specific Analysis
Each framework provides distinct analytical perspectives:
Utilitarianism Analysis
- Consequence evaluation and utility maximization
- Stakeholder impact assessment
- Cost-benefit analysis from moral perspective
- Greatest good for greatest number principle
Deontological Analysis
- Duty-based evaluation and categorical imperatives
- Rights and obligations assessment
- Universal moral law application
- Inherent rightness independent of consequences
Virtue Ethics Analysis
- Character trait evaluation
- Role model behavior assessment
- Moral excellence and human flourishing
- Contextual virtue application
Care Ethics Analysis
- Relationship impact evaluation
- Contextual moral reasoning
- Care and responsibility assessment
- Attention to vulnerability and interdependence
Social Contract Analysis
- Fairness and justice evaluation
- Social agreement compliance
- Institutional legitimacy assessment
- Collective benefit and individual rights balance
Setup
bunx
{
"mcpServers": {
"Ethical Reasoning": {
"command": "bunx",
"args": ["@wemake.cx/ethical-reasoning@latest"]
}
}
}bunx with custom settings
The server can be configured using the following environment variables:
{
"mcpServers": {
"Ethical Reasoning": {
"command": "bunx",
"args": ["@wemake.cx/ethical-reasoning@latest"],
"env": {
"ETHICS_MIN_FRAMEWORKS": "2",
"ETHICS_MAX_FRAMEWORKS": "5",
"ETHICS_MIN_CONFIDENCE": "0.3"
}
}
}
}ETHICS_MIN_FRAMEWORKS: Minimum number of frameworks required for analysis (default: 1)ETHICS_MAX_FRAMEWORKS: Maximum number of frameworks per analysis (default: 5)ETHICS_MIN_CONFIDENCE: Minimum confidence threshold for analysis (default: 0.0)
System Prompt
The prompt for utilizing ethical reasoning should encourage systematic moral analysis:
Follow these steps for comprehensive ethical analysis:
1. Scenario Understanding:
- Clearly identify the moral dimensions of the situation
- Recognize all stakeholders and their interests
- Understand the context and background factors
- Identify potential conflicts and tensions
2. Action Specification:
- Define the proposed action or policy precisely
- Consider alternative formulations of the action
- Identify key assumptions and implications
- Clarify the scope and limitations
3. Framework Selection:
- Choose appropriate ethical frameworks for analysis
- Consider using multiple frameworks for comprehensive assessment
- Select frameworks that address different moral dimensions
- Balance breadth with depth of analysis
4. Systematic Analysis:
- Apply each framework rigorously and consistently
- Consider framework-specific principles and methods
- Evaluate both positive and negative moral implications
- Document reasoning and key considerations
5. Comparative Assessment:
- Identify areas of agreement across frameworks
- Recognize points of tension or disagreement
- Evaluate the strength of different moral arguments
- Consider the relative importance of different moral values
6. Synthesis and Recommendation:
- Integrate insights from multiple frameworks
- Provide balanced assessment of moral considerations
- Offer clear recommendations with ethical justification
- Acknowledge limitations and areas of uncertainty
7. Continuous Reflection:
- Consider whether additional frameworks would be helpful
- Reflect on potential biases in the analysis
- Evaluate the adequacy of the moral reasoning
- Remain open to alternative perspectives and interpretationsExample Usage
Basic Ethical Analysis
{
"scenario": "A company is considering implementing AI-powered employee monitoring to improve productivity",
"action": "Deploy comprehensive workplace surveillance system with real-time performance tracking",
"frameworks": ["utilitarianism", "deontology", "care"],
"confidence": 0.8,
"nextStepNeeded": false
}Multi-Stage Analysis
{
"scenario": "Healthcare resource allocation during pandemic with limited ICU beds",
"action": "Prioritize younger patients over elderly patients for ICU admission",
"frameworks": ["utilitarianism", "social-contract"],
"confidence": 0.7,
"nextStepNeeded": true,
"suggestedNext": ["care", "virtue"]
}