@wemake.cx/lstr-reasoning-framework
v0.1.0
Published
Unified MCP server bundling six cognitive capabilities for the LSTR reasoning model
Downloads
174
Maintainers
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:
- Invoke
lstrReasoningFrameworkwith the user's query - Receive the comprehensive reasoning trace
- Synthesize the phase results into its final response
- 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 stepsArchitecture Notes
Design Decisions
- Single Unified Tool: All phases orchestrated atomically to match LSTR's mandatory framework
- Inline Implementation: Lightweight phase implementations avoid inter-server dependencies
- Default-Enabled Phases: All six phases active by default with opt-out capability
- Confidence Aggregation: Overall confidence calculated as weighted average across phases
- 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 startTesting
# Run tests
bun test
# With coverage
bun test --coverageContributing
Contributions are welcome! Please ensure:
- All six phases remain functional
- TypeScript types are complete
- Output format matches LSTR expectations
- Tests pass and coverage remains high
References
- LSTR Model on HuggingFace
- WeMake Enterprise MCP Ecosystem
- Model Context Protocol Specification
- Clarity AI Platform
License
MIT License - see LICENSE file for details.
Support
- Issues: GitHub Issues
- Enterprise Support: [email protected]
- Security: [email protected]
Built with 💙 by WeMake for the LSTR Model
Part of the Clarity Cognitive Layer
