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

metacog

v0.1.0

Published

MCP server for meta-cognitive reasoning strategies and problem resolution.

Readme

MetaCog MCP Server

Multi-strategy reasoning and problem-solving server implementing the Model Context Protocol. Provides structured cognitive processing with 20+ reasoning strategies, cognitive state management, and unified reasoning chains.

Overview

The MetaCognition MCP Server orchestrates multiple reasoning strategies for complex problem-solving and analysis. It manages reasoning chains, cognitive states, and provides tools for autonomous decision-making, debugging, research, and optimization.

Core Features

  • Multi-Strategy Reasoning: 20+ specialized strategies including Abductive, Bayesian, Causal, Sequential, Financial, and Ethical reasoning
  • Cognitive State Management: Parallel hypothesis exploration with superposition states and resolution mechanisms
  • Reasoning Chain Orchestration: Sequential strategy execution with convergence optimization
  • Thought Management: Dynamic branching, revision, and refinement of reasoning paths
  • MCP Protocol Compliance: Full WebSocket/stdio transport integration

Available Tools

| Tool | Function | |------|----------| | metacognition | Multi-strategy reasoning and cognitive state management | | autonomous | Decision engine with comprehensive strategy orchestration | | debugger | Code analysis and error resolution | | markdown_master | Markdown content creation and refactoring | | research_pro | Research synthesis with online search integration | | deep_analysis | Codebase and system analysis | | optimus_prime | Performance and resource optimization | | wildcard | Dynamic strategy selection |

Reasoning Strategies

Logical: Abductive, Deductive, Inductive, Analogical, ForwardChaining, BackwardChaining, Defeasible
Probabilistic: Bayesian, FuzzyLogic
Structural: PatternAnalysis, ConstraintSatisfaction
Causal: Causal, Counterfactual, Empirical
Specialized: Financial, Ethical, Sequential, CaseBased, HypothesisGeneration
Control: MetacognitiveControl

Installation

NPM

npm install @modelcontextprotocol/metacog
npm run build
npm start

Docker

docker build -t mcp/metacog
docker run --rm -i mcp/metacog

Configuration

Claude Desktop

{
  "mcpServers": {
    "metacognition": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/metacog"]
    }
  }
}

VS Code MCP

{
  "mcp": {
    "servers": {
      "metacognition": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/metacog"]
      }
    }
  }
}

Usage Examples

Basic Strategy Application

{
  "thought": "Analyzing market data for trend identification",
  "thoughtNumber": 1,
  "totalThoughts": 3,
  "nextThoughtNeeded": true,
  "strategy": "Bayesian",
  "strategy_input_data": {
    "prior": 0.6,
    "evidence_threshold": 0.8
  }
}

Cognitive Superposition

{
  "thought": "Exploring multiple causal hypotheses",
  "thoughtNumber": 1,
  "totalThoughts": 4,
  "nextThoughtNeeded": true,
  "cognitive_superposition_concepts": [
    "supply chain disruption",
    "demand fluctuation", 
    "competitive pressure",
    "regulatory changes"
  ]
}

Unified Reasoning Chain

{
  "thought": "Comprehensive problem analysis",
  "thoughtNumber": 1,
  "totalThoughts": 1,
  "nextThoughtNeeded": false,
  "unified_reasoning_chain": true,
  "strategies": ["Causal", "Bayesian", "Sequential"],
  "convergence_target": 0.95,
  "cognitive_enhancement": true
}

API Reference

Core Inputs

  • thought (string): Current reasoning step or analysis
  • thoughtNumber (integer): Current step number
  • totalThoughts (integer): Estimated total steps (adjustable)
  • nextThoughtNeeded (boolean): Whether additional steps are required

Advanced Features

  • cognitive_superposition_concepts (array): Create parallel hypothesis states
  • cognitive_resolve_state_id (string): Collapse superposition to single concept
  • strategy (enum): Select specific reasoning strategy
  • unified_reasoning_chain (boolean): Execute multi-strategy reasoning
  • convergence_target (number): Target confidence level (0.0-1.0)

Strategy Parameters

Different strategies accept specific input parameters via strategy_input_data:

  • Bayesian: { prior: number, evidence_threshold: number }
  • Causal: { cause: string, effect: string }
  • Counterfactual: { original_condition: string, altered_condition: string }
  • Financial: { market_data: object, risk_tolerance: number }
  • Sequential: { time_horizon: string, world_branches: boolean }

Environment Variables

  • DISABLE_THOUGHT_LOGGING: Disable console output of reasoning steps
  • COGNITIVE_ENHANCEMENT: Enable/disable cognitive superposition features
  • CONVERGENCE_TARGET: Default convergence threshold for reasoning chains

Development

Prerequisites

  • Node.js 18+
  • TypeScript 4.9+

Build

npm install
npm run build
npm test

Testing

npm run test:strategies    # Strategy validation
npm run test:cognitive     # Cognitive features
npm run benchmark          # Performance tests

License

MIT & Apache-2.0