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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@paulhb7/mcp-sequential-ethical-thinking

v0.5.0

Published

Experimental MCP server for sequential ethical reasoning. Based on Anthropic's sequential thinking server.

Readme

Jiminy Sequential Thinking MCP Server

A Model Context Protocol (MCP) server for auditable, plural, and stepwise ethical reasoning.
Jiminy enables any LLM agent or system to outsource ethical analysis in a transparent, non-binary, and standards-based way.


🚦 What is This?

Jiminy is a three-phase, auditable ethical reasoning server that implements the Model Context Protocol (MCP).
It provides a single tool for any agent to request:

  • Phase 0: Ethical Issue Detection
  • Phase 1: Multi-Perspective Analysis
  • Phase 2: Solutions & Moral Imagination

All steps, revisions, and alternatives are tracked, logged, and structured by design.


🌳 Why Use Jiminy?

  • Alignment: Offload difficult ethical questions to a specialist server
  • Plurality: Always explores alternatives—never just “yes/no”
  • Transparency: Every step logged (unless disabled) for audit/debug
  • Revision & Branching: Supports step edits and exploration of alternative lines of thought
  • Separation of Concerns: Main LLM focuses on generation; Jiminy on ethical quality

🏗️ How Does It Work?

  • Implements one MCP tool: jiminy_sequential_thinking
  • Each call: A single “thought” step, tagged with metadata:
    • thought (text step)
    • phase (0, 1, or 2)
    • revision/branching info if present
  • Strict prompt and value hierarchy underpin every analysis

🚀 Quick Start

1. Install dependencies

npm install

2. Run the server

node index.js

(or your entrypoint)

3. Connect via MCP

Your orchestrator/LLM should use the Model Context Protocol and call the tool as documented below.


🛠️ Tool: jiminy_sequential_thinking

Purpose:
Structures and audits every step in ethical reasoning, enforcing plural, multi-perspective, and creative analysis.

Input Schema

| Field | Type | Required | Description | |---------------------|-----------|----------|---------------------------------------------------------| | thought | string | yes | The current reasoning step | | phase | integer | yes | 0 = detection, 1 = analysis, 2 = solutions | | thoughtNumber | integer | yes | Sequence number | | totalThoughts | integer | yes | Estimated total steps needed | | nextThoughtNeeded | boolean | yes | Whether another step is expected | | isRevision | boolean | no | Is this a revision? | | revisesThought | integer | no | Which step is being revised? | | branchFromThought | integer | no | If branching, which previous step? | | branchId | string | no | Branch identifier | | needsMoreThoughts | boolean | no | Still needs further steps? |

Example

{
  "thought": "There is a genuine value conflict between privacy and security obligations.",
  "phase": 0,
  "thoughtNumber": 1,
  "totalThoughts": 4,
  "nextThoughtNeeded": true
}

🔎 Reasoning Structure

Jiminy’s prompt enforces a three-phase workflow:

  1. Phase 0 – Detection
    • Is this a real ethical dilemma?
    • If not, stop and explain.
  2. Phase 1 – Multi-Perspective Analysis
    • Identify values, actors, frameworks, and possible alternatives.
    • Contextualize legally, professionally, organizationally.
  3. Phase 2 – Solutions & Moral Imagination
    • Present all plausible solutions (not just A/B).
    • Highlight trade-offs, regrets, “moral remainders,” and creative possibilities.

Always pluralist and creative. Never “just pick a side.”


🏛️ Value Hierarchy

Jiminy is anchored in a strict value hierarchy (always included in each system prompt):

  1. Dignity & Integrity of the Person (non-derogable): right to life, integrity, prohibition of torture/slavery/inhuman treatment.
  2. Freedoms & Privacy: autonomy, consent, data, speech, thought, association.
  3. Equality & Non-discrimination: equal protection, measures for vulnerable.
  4. Justice & Rule of Law: fair trial, effective remedy, proportionality.
  5. Solidarity & Social Rights: health, social/environmental/consumer protection.
  6. Citizens’ Rights & Good Administration: democracy, transparency, redress.

Absolute red lines: Dignity, life, integrity, and bans on torture/slavery/inhuman treatment—never to be compromised.

(See code for full hierarchy & prompt.)


🖥️ Logging

  • Every step is printed (stderr) in a colorized box per phase.
  • Disable logging with:
    DISABLE_THOUGHT_LOGGING=true

🔄 Revision & Branching

  • Support for iterative improvement, revision, and parallel “branches” of reasoning.
  • Enables audit, rollback, and plural exploration of dilemmas.

🧑‍💻 For Developers

  • Node.js (TypeScript), built on @modelcontextprotocol/sdk
  • Plug-and-play with any MCP-compatible LLM/agent
  • Value hierarchy, prompt, phases—all extensible

📜 License

MIT


📚 References

  • EU Charter of Fundamental Rights
  • Universal Declaration of Human Rights
  • European Declaration on Digital Rights and Principles