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/lstr-reasoning-framework

v0.1.0

Published

Unified MCP server bundling six cognitive capabilities for the LSTR reasoning model

Downloads

174

Readme

LSTR Reasoning Framework MCP Server

A unified Model Context Protocol (MCP) server that bundles six cognitive capabilities specifically designed for the LSTR (Logistics, Systems, and Technical Responder) model.

Overview

The LSTR Reasoning Framework orchestrates the mandatory six-phase reasoning process required by the LSTR model for complex technical, logistical, and systems-level problem solving. This server provides a single integrated tool that executes all phases sequentially, producing a comprehensive reasoning trace with calibrated confidence scores.

LSTR Model

LSTR is WeMake's specialized multi-step reasoning AI model with:

  • Base Architecture: DeepSeek V4 Pro (671B parameters, 37B activated MoE)
  • Context Length: 1M+ tokens
  • Reasoning Mode: Zero-shot chain-of-thought with effort: xhigh
  • Primary Use: Logistics, systems architecture, and technical response under high-stakes conditions

The Six Reasoning Phases

1. Metacognitive Assessment

Evaluates knowledge boundaries, classifies claims, and calibrates confidence levels.

Capabilities:

  • Domain knowledge level assessment (expert → none)
  • Claim classification (fact, inference, speculation, uncertain)
  • Confidence score calibration (0.0-1.0)
  • Uncertainty area identification
  • Training data cutoff awareness

Output Example:

{
  "confidenceScore": 0.78,
  "knowledgeLevel": "proficient",
  "uncertaintyAreas": ["Task contains open questions"],
  "claims": [
    {
      "claim": "System requires high availability",
      "status": "fact",
      "confidence": 0.85
    }
  ]
}

2. Problem Decomposition

Systematically breaks down complex tasks into discrete logical sub-tasks.

Approaches:

  • Analytical: Systematic, logical cause-and-effect breakdown
  • Creative: Exploratory divergent-convergent thinking
  • Diagnostic: Problem identification through elimination
  • Strategic: Long-term planning with decision points

Output Example:

{
  "thoughts": [
    {
      "thought": "Understand core requirements and constraints",
      "thoughtNumber": 1
    },
    {
      "thought": "Identify key components and dependencies",
      "thoughtNumber": 2
    }
  ],
  "totalSteps": 5,
  "approach": "analytical"
}

3. Multi-Perspective Analysis

Simulates diverse expert personas to identify blind spots and gather insights.

Persona Types:

  • Systems architects
  • Technical leads
  • Operations experts
  • Domain specialists

Output Example:

{
  "personas": [
    {
      "id": "systems-architect",
      "name": "Systems Architect",
      "expertise": ["architecture", "scalability", "infrastructure"]
    }
  ],
  "contributions": [
    {
      "personaId": "systems-architect",
      "content": "Consider distributed architecture for fault tolerance",
      "type": "insight"
    }
  ],
  "keyInsights": ["Ensure architectural scalability", "Plan for operational reliability"]
}

4. Evidence Validation

Performs hypothesis testing and validates logical premises.

Methods:

  • Scientific Method: Hypothesis formulation, evidence gathering, confidence assessment
  • Structured Argumentation: Thesis-antithesis-synthesis dialectical reasoning

Output Example:

{
  "scientificMethod": {
    "hypothesis": "The proposed solution addresses core requirements",
    "confidence": 0.82,
    "evidence": [
      "Task structure suggests systematic approach is feasible",
      "Domain expertise indicates established methodologies exist"
    ]
  },
  "argumentation": {
    "arguments": [
      {
        "claim": "Approach addresses core requirements",
        "type": "thesis",
        "confidence": 0.85
      }
    ]
  }
}

5. Solution Synthesis

Validates proposed solutions against mathematical and logical constraints.

Features:

  • Variable constraint satisfaction
  • Violation detection and reporting
  • Feasibility validation

Output Example:

{
  "constraintsSatisfied": true,
  "violations": [],
  "validatedVariables": {
    "throughput": 1000,
    "latency": 50
  }
}

6. Output Structuring

Organizes findings into laconic, precise, decision-ready format.

Styles:

  • Laconic: Direct, concise, technical (LSTR default)
  • Detailed: Comprehensive, explanatory
  • Comprehensive: Exhaustive, analytical

Output Example:

{
  "structuredOutput": "LSTR Reasoning Framework Analysis\n\nTask: Design fault-tolerant system\n\nMetacognitive Assessment: Knowledge level proficient (confidence: 0.78)\n...",
  "tone": "Direct, concise, technical",
  "format": "laconic"
}

API

Tool: lstrReasoningFramework

Executes the complete LSTR reasoning framework with all six phases.

Input Schema

{
  task: string;                    // Required: The task to analyze
  domain?: string;                 // Optional: Domain context
  
  // Phase configurations (all optional)
  metacognitive?: {
    knowledgeAssessment?: boolean;
    claimValidation?: boolean;
    confidenceCalibration?: boolean;
  };
  
  decomposition?: {
    approach?: "analytical" | "creative" | "diagnostic" | "strategic";
    maxSteps?: number;             // Default: 5
  };
  
  perspectives?: {
    personas?: Array<{
      expertise: string[];
      perspective: string;
    }>;
    minPersonas?: number;          // Default: 2
  };
  
  validation?: {
    hypothesis?: string;            // Auto-generated if not provided
    validationMethods?: ("scientific-method" | "argumentation" | "both")[];
  };
  
  synthesis?: {
    constraints?: {
      variables: Record<string, number>;
      constraints: string[];       // Boolean expressions
    };
  };
  
  outputFormat?: {
    style?: "laconic" | "detailed" | "comprehensive";
    includeConfidence?: boolean;   // Default: true
  };
  
  enabledPhases?: Array<          // Default: all phases
    "metacognitive" | "decomposition" | "perspectives" | 
    "validation" | "synthesis" | "structuring"
  >;
  
  sessionId?: string;              // Optional session tracking
}

Output Schema

{
  sessionId: string;
  task: string;
  phases: {
    metacognitive?: { /* Phase 1 results */ };
    decomposition?: { /* Phase 2 results */ };
    perspectives?: { /* Phase 3 results */ };
    validation?: { /* Phase 4 results */ };
    synthesis?: { /* Phase 5 results */ };
    structuring?: { /* Phase 6 results */ };
  };
  overallConfidence: number;       // Weighted average (0.0-1.0)
  nextStepsRecommended: string[];
  timestamp: string;               // ISO 8601
}

Setup

Using bunx (Recommended)

Add to your MCP configuration file:

{
  "mcpServers": {
    "LSTR Reasoning Framework": {
      "command": "bunx",
      "args": ["@wemake.cx/lstr-reasoning-framework@latest"]
    }
  }
}

Using Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "LSTR Reasoning Framework": {
      "command": "bunx",
      "args": ["@wemake.cx/lstr-reasoning-framework@latest"]
    }
  }
}

Using Raycast

Use Manage MCP Servers, press CMD + N and paste:

{
  "mcpServers": {
    "LSTR Reasoning Framework": {
      "command": "bunx",
      "args": ["@wemake.cx/lstr-reasoning-framework@latest"]
    }
  }
}

Usage Examples

Basic Usage

// Minimal invocation with all phases enabled by default
const result = await lstrReasoningFramework({
  task: "Design a fault-tolerant message queue system handling 10k messages/sec"
});

With Domain Context

const result = await lstrReasoningFramework({
  task: "Optimize database query performance for real-time analytics",
  domain: "systems",
  decomposition: {
    approach: "analytical",
    maxSteps: 7
  }
});

With Custom Personas

const result = await lstrReasoningFramework({
  task: "Evaluate microservices architecture trade-offs",
  perspectives: {
    personas: [
      {
        expertise: ["distributed-systems", "scalability"],
        perspective: "Focus on horizontal scaling and service boundaries"
      },
      {
        expertise: ["operations", "monitoring"],
        perspective: "Emphasize observability and operational complexity"
      }
    ],
    minPersonas: 2
  }
});

With Constraint Validation

const result = await lstrReasoningFramework({
  task: "Design API rate limiting strategy",
  synthesis: {
    constraints: {
      variables: {
        requestsPerSecond: 1000,
        burstCapacity: 1500,
        averageLatency: 50
      },
      constraints: [
        "requestsPerSecond <= burstCapacity",
        "averageLatency < 100",
        "burstCapacity > 0"
      ]
    }
  }
});

Selective Phase Execution

const result = await lstrReasoningFramework({
  task: "Review existing system architecture",
  enabledPhases: ["metacognitive", "perspectives", "structuring"],
  outputFormat: {
    style: "detailed",
    includeConfidence: true
  }
});

Integration with LSTR Model

This server is designed to be used with the LSTR model's xhigh reasoning effort mode:

from transformers import pipeline

pipe = pipeline("text-generation", model="WeMake/LSTR", trust_remote_code=True)

# LSTR will automatically invoke lstrReasoningFramework for complex queries
messages = [
  {
    "role": "user",
    "content": "Design a fault-tolerant ingestion pipeline for 50k events/sec"
  }
]

result = pipe(messages, reasoning_effort="xhigh")

Expected LSTR Output Structure

When LSTR uses this tool, it will:

  1. Invoke lstrReasoningFramework with the user's query
  2. Receive the comprehensive reasoning trace
  3. Synthesize the phase results into its final response
  4. Include confidence scores and transparency about which phases were executed

System Prompt Guidance

When using LSTR with this server, include the following guidance:

For complex technical, logistical, or systems-level tasks:

1. Invoke the lstrReasoningFramework tool with the task description
2. Review all phase outputs systematically
3. Pay special attention to:
   - Metacognitive confidence scores (< 0.70 requires caution)
   - Uncertainty areas identified in Phase 1
   - Constraint violations in Phase 5
4. Synthesize findings into laconic, precise recommendations
5. Include overall confidence score in your response
6. Follow recommended next steps

Architecture Notes

Design Decisions

  1. Single Unified Tool: All phases orchestrated atomically to match LSTR's mandatory framework
  2. Inline Implementation: Lightweight phase implementations avoid inter-server dependencies
  3. Default-Enabled Phases: All six phases active by default with opt-out capability
  4. Confidence Aggregation: Overall confidence calculated as weighted average across phases
  5. Stateless Operation: All state contained in input/output; no persistent storage

Performance Characteristics

  • Typical Latency: 200-500ms for all six phases
  • Context Efficiency: Optimized for LSTR's 1M+ token context window
  • Memory Footprint: < 50MB resident memory
  • Concurrency: Stateless design supports parallel invocations

Limitations

  • Phase implementations are lightweight; full-featured individual servers provide more depth
  • Constraint evaluation limited to JavaScript-compatible expressions
  • Persona simulation is template-based, not LLM-powered
  • No persistent session storage across server restarts

Development

Build from Source

# Clone repository
git clone https://github.com/WeMake-AI/mcp.git
cd mcp/src/lstr-reasoning-framework

# Install dependencies
bun install

# Build
bun run build

# Run locally
bun run start

Testing

# Run tests
bun test

# With coverage
bun test --coverage

Contributing

Contributions are welcome! Please ensure:

  1. All six phases remain functional
  2. TypeScript types are complete
  3. Output format matches LSTR expectations
  4. Tests pass and coverage remains high

References

License

MIT License - see LICENSE file for details.

Support


Built with 💙 by WeMake for the LSTR Model
Part of the Clarity Cognitive Layer