npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@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:

  1. Scenario Definition: Clear description of the situation requiring ethical evaluation
  2. Action Specification: Precise statement of the proposed action or policy
  3. Framework Application: Systematic analysis through selected ethical lenses
  4. Comparative Assessment: Evaluation of how different frameworks align or conflict
  5. Confidence Calibration: Assessment of certainty in the ethical analysis
  6. 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 evaluation
      • action (string): Specific action or policy to evaluate
      • frameworks (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 required
      • suggestedNext (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:

  1. Non-Deterministic Guidance: The tool provides ethical perspectives and considerations, not definitive "right" or "wrong" answers.
  2. Context Sensitivity: The quality of the analysis depends heavily on the detail and nuance provided in the scenario description.
  3. No Moral Agency: The tool does not hold moral responsibility; it merely reflects established ethical frameworks onto the provided input.
  4. 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:

  1. Input Validation:
    • Validates presence of scenario and action.
    • Verifies selected frameworks are supported.
    • Checks confidence scores are within 0.0-1.0 range.
  2. 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.
  3. Result Aggregation:
    • Compiles all framework analyses into a structured result object.
    • Calculates metadata (request number, confidence pass-through).
  4. Output Generation:
    • Returns the structured EthicalAnalysisResult containing specific guidance for each framework.

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 interpretations

Example 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"]
}