@nbiish/cognitive-tools-mcp 8.5.1 → 8.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -12
- package/build/index.js +28 -177
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,21 +24,25 @@
|
|
|
24
24
|
|
|
25
25
|
## ᐴ GASHKITOONAN ᔔ [CAPABILITIES] ◈──◆──◇──◆──◈
|
|
26
26
|
|
|
27
|
-
Revolutionary **
|
|
27
|
+
Revolutionary **Enhanced Cognitive Processing MCP Server** - Automatically processes all 6 cognitive stages internally (Scientific Investigation, OOReD Analysis, Critical Thinking, Scientific Review, OOReD Review, Final Action) and returns comprehensive results. Integrates advanced prompting strategies for optimal cognitive enhancement.
|
|
28
28
|
|
|
29
|
-
### ⚡
|
|
29
|
+
### ⚡ INTERNAL 6-STAGE PROCESSING
|
|
30
30
|
|
|
31
|
-
**
|
|
31
|
+
**NEW v8.6.0**: The MCP server now automatically processes all stages internally in a single tool call:
|
|
32
32
|
|
|
33
|
-
**
|
|
34
|
-
1. **Stage 1**: Scientific Investigation (
|
|
35
|
-
2. **Stage 2**: Initial OOReD Analysis
|
|
33
|
+
**All Stages Processed Internally:**
|
|
34
|
+
1. **Stage 1**: Scientific Investigation (Chain-of-Thought + Role-Based)
|
|
35
|
+
2. **Stage 2**: Initial OOReD Analysis (Tree-of-Thoughts + Meta-Prompting)
|
|
36
|
+
3. **Stage 3**: Critical Thinking & Pre-Action Planning (Self-Consistency + Meta-Prompting)
|
|
37
|
+
4. **Stage 4**: Scientific Review & Validation (Chain-of-Thought + Self-Consistency)
|
|
38
|
+
5. **Stage 5**: OOReD Review & Refinement (Tree-of-Thoughts + Role-Based)
|
|
39
|
+
6. **Stage 6**: Final Action & Recommendations (All strategies integrated)
|
|
36
40
|
|
|
37
|
-
**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
**Benefits:**
|
|
42
|
+
- ✅ Single tool call processes all stages
|
|
43
|
+
- ✅ Comprehensive cognitive analysis
|
|
44
|
+
- ✅ Advanced prompting strategies integrated
|
|
45
|
+
- ✅ No manual phase progression required
|
|
42
46
|
|
|
43
47
|
<div align="center">
|
|
44
48
|
◈──◆──◇───────────────────────────◇──◆──◈
|
|
@@ -226,7 +230,7 @@ This project is licensed under the Comprehensive Restricted Use License for Indi
|
|
|
226
230
|
```bibtex
|
|
227
231
|
@misc{gikendaasowin-aabajichiganan-mcp2025,
|
|
228
232
|
author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians},
|
|
229
|
-
title/description = {
|
|
233
|
+
title/description = {Enhanced Cognitive Processing MCP Server - Automatically processes all 6 cognitive stages internally with advanced prompting strategies},
|
|
230
234
|
type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
|
|
231
235
|
year = {2025},
|
|
232
236
|
publisher/source/event = {GitHub repository under tribal sovereignty protections},
|
package/build/index.js
CHANGED
|
@@ -25,45 +25,10 @@ import { z } from "zod";
|
|
|
25
25
|
// --- Server Definition ---
|
|
26
26
|
const serverInfo = {
|
|
27
27
|
name: "gikendaasowin-aabajichiganan-mcp",
|
|
28
|
-
version: "8.
|
|
29
|
-
description: "
|
|
28
|
+
version: "8.6.0",
|
|
29
|
+
description: "Enhanced Cognitive Processing MCP Server - Automatically processes all 6 cognitive stages internally (Scientific Investigation, OOReD Analysis, Critical Thinking, Scientific Review, OOReD Review, Final Action) and returns comprehensive results. Integrates advanced prompting strategies for optimal cognitive enhancement."
|
|
30
30
|
};
|
|
31
31
|
const server = new McpServer(serverInfo);
|
|
32
|
-
const activeSessions = new Map();
|
|
33
|
-
// Generate session ID based on input hash
|
|
34
|
-
function generateSessionId(input) {
|
|
35
|
-
return Buffer.from(input).toString('base64').slice(0, 12);
|
|
36
|
-
}
|
|
37
|
-
// Validate and enforce mandatory two-phase progression
|
|
38
|
-
function validateMandatoryProgression(input, phase, previous_results) {
|
|
39
|
-
const sessionId = generateSessionId(input);
|
|
40
|
-
const phaseNum = parseInt(phase.replace('phase', ''));
|
|
41
|
-
if (phaseNum === 1) {
|
|
42
|
-
// Starting new session - always allowed
|
|
43
|
-
const session = {
|
|
44
|
-
sessionId,
|
|
45
|
-
currentPhase: 1,
|
|
46
|
-
originalInput: input,
|
|
47
|
-
phaseResults: [],
|
|
48
|
-
toolUsageCount: 0,
|
|
49
|
-
startTime: Date.now()
|
|
50
|
-
};
|
|
51
|
-
activeSessions.set(sessionId, session);
|
|
52
|
-
return { sessionId, isValid: true, currentPhase: 1 };
|
|
53
|
-
}
|
|
54
|
-
const existingSession = activeSessions.get(sessionId);
|
|
55
|
-
if (!existingSession) {
|
|
56
|
-
throw new Error(`MANDATORY PROGRESSION VIOLATION: Phase ${phase} attempted without starting from Phase 1. You must begin with phase1 for this input to receive full cognitive enhancement.`);
|
|
57
|
-
}
|
|
58
|
-
const expectedPhase = existingSession.currentPhase + 1;
|
|
59
|
-
if (phaseNum !== expectedPhase) {
|
|
60
|
-
throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected phase${expectedPhase}, but received ${phase}. Sequential progression required: phase1 → phase2`);
|
|
61
|
-
}
|
|
62
|
-
if (!previous_results) {
|
|
63
|
-
throw new Error(`Phase ${phase} requires previous_results parameter containing all accumulated results from phase 1.`);
|
|
64
|
-
}
|
|
65
|
-
return { sessionId, isValid: true, currentPhase: phaseNum };
|
|
66
|
-
}
|
|
67
32
|
// --- Logging Helpers (Internal - No changes needed as per user comments) ---
|
|
68
33
|
/**
|
|
69
34
|
* Logs an incoming tool call to stderr.
|
|
@@ -1337,17 +1302,17 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1337
1302
|
* - Quality Assurance: 94% validation success rate
|
|
1338
1303
|
*/
|
|
1339
1304
|
/**
|
|
1340
|
-
* Tool: deliberate (Enhanced 6-Stage Cognitive Processing Engine -
|
|
1305
|
+
* Tool: deliberate (Enhanced 6-Stage Cognitive Processing Engine - AUTOMATIC INTERNAL PROCESSING)
|
|
1341
1306
|
*
|
|
1342
|
-
*
|
|
1343
|
-
* -
|
|
1344
|
-
* -
|
|
1345
|
-
* -
|
|
1346
|
-
* -
|
|
1347
|
-
*
|
|
1348
|
-
*
|
|
1349
|
-
* -
|
|
1350
|
-
* -
|
|
1307
|
+
* AUTOMATIC INTERNAL PROCESSING:
|
|
1308
|
+
* - Internally processes all 6 stages automatically in a single call
|
|
1309
|
+
* - Stage 1: Scientific Investigation (Chain-of-Thought + Role-Based Prompting)
|
|
1310
|
+
* - Stage 2: Initial OOReD Analysis (Tree-of-Thoughts + Meta-Prompting)
|
|
1311
|
+
* - Stage 3: Critical Thinking & Pre-Action Planning (Self-Consistency + Meta-Prompting)
|
|
1312
|
+
* - Stage 4: Scientific Review & Validation (Chain-of-Thought + Self-Consistency)
|
|
1313
|
+
* - Stage 5: OOReD Review & Refinement (Tree-of-Thoughts + Role-Based)
|
|
1314
|
+
* - Stage 6: Final Action & Recommendations (All strategies integrated)
|
|
1315
|
+
* - Returns comprehensive final result with all cognitive enhancement completed
|
|
1351
1316
|
*
|
|
1352
1317
|
* Benefits:
|
|
1353
1318
|
* - 45-60% error reduction through multi-stage validation
|
|
@@ -1356,11 +1321,12 @@ function assessMethodologicalRigor(stage1Result) {
|
|
|
1356
1321
|
* - Comprehensive perspective integration with domain expertise
|
|
1357
1322
|
* - Cross-stage validation with consistency checking
|
|
1358
1323
|
* - Comprehensive action planning with risk mitigation
|
|
1324
|
+
* - Single call convenience - no manual phase management required
|
|
1359
1325
|
*/
|
|
1360
1326
|
server.tool("deliberate", {
|
|
1361
1327
|
input: z
|
|
1362
1328
|
.string()
|
|
1363
|
-
.describe("REQUIRED: The problem, question, decision, or situation requiring cognitive deliberation. Each unique input starts a new
|
|
1329
|
+
.describe("REQUIRED: The problem, question, decision, or situation requiring cognitive deliberation. Each unique input starts a new 6-stage progression session."),
|
|
1364
1330
|
mode: z
|
|
1365
1331
|
.enum(["analyze", "decide", "synthesize", "evaluate"])
|
|
1366
1332
|
.default("analyze")
|
|
@@ -1368,137 +1334,22 @@ server.tool("deliberate", {
|
|
|
1368
1334
|
context: z
|
|
1369
1335
|
.string()
|
|
1370
1336
|
.optional()
|
|
1371
|
-
.describe("Optional additional context, constraints, or background information")
|
|
1372
|
-
|
|
1373
|
-
.string()
|
|
1374
|
-
.optional()
|
|
1375
|
-
.describe("REQUIRED for Phase 2: Complete accumulated results from Phase 1. Include ONLY when continuing to Phase 2."),
|
|
1376
|
-
phase: z
|
|
1377
|
-
.enum(["phase1", "phase2"])
|
|
1378
|
-
.default("phase1")
|
|
1379
|
-
.describe("MANDATORY: Specify 'phase1' for stages 1-2 or 'phase2' for stages 3-6. Phase 1 must complete before Phase 2.")
|
|
1380
|
-
}, async ({ input, mode, context, previous_results, phase }) => {
|
|
1337
|
+
.describe("Optional additional context, constraints, or background information")
|
|
1338
|
+
}, async ({ input, mode, context }) => {
|
|
1381
1339
|
const toolName = 'deliberate';
|
|
1382
|
-
logToolCall(toolName, `
|
|
1340
|
+
logToolCall(toolName, `Mode: ${mode}, Context: ${context ? 'Yes' : 'No'}`);
|
|
1383
1341
|
try {
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
}
|
|
1396
|
-
currentPhase = 1;
|
|
1397
|
-
session = {
|
|
1398
|
-
sessionId,
|
|
1399
|
-
currentPhase: 1,
|
|
1400
|
-
originalInput: input,
|
|
1401
|
-
phaseResults: [],
|
|
1402
|
-
toolUsageCount: 0,
|
|
1403
|
-
startTime: Date.now()
|
|
1404
|
-
};
|
|
1405
|
-
activeSessions.set(sessionId, session);
|
|
1406
|
-
logToolCall(toolName, `New session started: ${sessionId}, Phase: 1`);
|
|
1407
|
-
// Process Phase 1: Stages 1-2
|
|
1408
|
-
const stage1Result = await performScientificInvestigation(input, mode, context);
|
|
1409
|
-
const stage2Result = await performInitialOOReD(input, mode, context, stage1Result);
|
|
1410
|
-
toolUsageCount = countToolsInStage(stage1Result) + countToolsInStage(stage2Result);
|
|
1411
|
-
phaseResult = `# PHASE 1 COMPLETE: STAGES 1-2 PROCESSED
|
|
1412
|
-
|
|
1413
|
-
## STAGE 1: SCIENTIFIC INVESTIGATION
|
|
1414
|
-
${stage1Result}
|
|
1415
|
-
|
|
1416
|
-
## STAGE 2: INITIAL OBSERVE-ORIENT-REASON-DECIDE
|
|
1417
|
-
${stage2Result}
|
|
1418
|
-
|
|
1419
|
-
**PHASE 1 SUMMARY:**
|
|
1420
|
-
- Scientific investigation completed with hypothesis formation
|
|
1421
|
-
- Initial OOReD analysis completed with strategic planning
|
|
1422
|
-
- Tool usage in Phase 1: ${toolUsageCount}
|
|
1423
|
-
|
|
1424
|
-
**⚠️ MANDATORY NEXT STEP:**
|
|
1425
|
-
Continue to **Phase 2** for complete cognitive enhancement (Stages 3-6).
|
|
1426
|
-
|
|
1427
|
-
**Required Phase 2 Call:**
|
|
1428
|
-
\`\`\`json
|
|
1429
|
-
{
|
|
1430
|
-
"name": "deliberate",
|
|
1431
|
-
"arguments": {
|
|
1432
|
-
"input": "${input}",
|
|
1433
|
-
"mode": "${mode}",
|
|
1434
|
-
"phase": "phase2",
|
|
1435
|
-
"previous_results": "[Copy this entire Phase 1 result as previous_results]"
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
\`\`\``;
|
|
1439
|
-
}
|
|
1440
|
-
else {
|
|
1441
|
-
// Continue to Phase 2
|
|
1442
|
-
if (phase !== "phase2") {
|
|
1443
|
-
throw new Error(`MANDATORY PROGRESSION VIOLATION: Expected phase2, but received ${phase}. Phase 1 must complete before Phase 2.`);
|
|
1444
|
-
}
|
|
1445
|
-
session = activeSessions.get(sessionId);
|
|
1446
|
-
if (!session) {
|
|
1447
|
-
throw new Error(`SESSION NOT FOUND: No active session for this input. Start with phase1 first.`);
|
|
1448
|
-
}
|
|
1449
|
-
currentPhase = 2;
|
|
1450
|
-
accumulatedResults = previous_results;
|
|
1451
|
-
contextualInput = `${input}\n\n[COGNITIVE PROGRESSION CONTEXT - Phase 1 Results]\n${accumulatedResults}`;
|
|
1452
|
-
logToolCall(toolName, `Continuing session: ${sessionId}, Processing Phase: 2`);
|
|
1453
|
-
// Process Phase 2: Stages 3-6
|
|
1454
|
-
const stage3Result = await performCriticalThinkingPreAct(contextualInput, mode, context, accumulatedResults, accumulatedResults);
|
|
1455
|
-
const stage4Result = await performScientificReview(contextualInput, mode, context, accumulatedResults, stage3Result);
|
|
1456
|
-
const stage5Result = await performOOReViewReview(contextualInput, mode, context, accumulatedResults, stage4Result);
|
|
1457
|
-
const stage6Result = await performFinalAct(contextualInput, mode, context, stage3Result, stage5Result);
|
|
1458
|
-
const phase2ToolUsage = countToolsInStage(stage3Result) + countToolsInStage(stage4Result) +
|
|
1459
|
-
countToolsInStage(stage5Result) + countToolsInStage(stage6Result);
|
|
1460
|
-
toolUsageCount = session.toolUsageCount + phase2ToolUsage;
|
|
1461
|
-
phaseResult = `# PHASE 2 COMPLETE: STAGES 3-6 PROCESSED
|
|
1462
|
-
|
|
1463
|
-
## STAGE 3: CRITICAL THINKING & PRE-ACTION PLANNING
|
|
1464
|
-
${stage3Result}
|
|
1465
|
-
|
|
1466
|
-
## STAGE 4: SCIENTIFIC REVIEW & VALIDATION
|
|
1467
|
-
${stage4Result}
|
|
1468
|
-
|
|
1469
|
-
## STAGE 5: OOReD REVIEW & REFINEMENT
|
|
1470
|
-
${stage5Result}
|
|
1471
|
-
|
|
1472
|
-
## STAGE 6: FACT-BASED ACTION & FINAL RECOMMENDATIONS
|
|
1473
|
-
${stage6Result}
|
|
1474
|
-
|
|
1475
|
-
**PHASE 2 SUMMARY:**
|
|
1476
|
-
- Critical thinking analysis completed with 10-step framework
|
|
1477
|
-
- Scientific review and validation completed
|
|
1478
|
-
- OOReD review and refinement completed
|
|
1479
|
-
- Final action planning with comprehensive recommendations
|
|
1480
|
-
- Tool usage in Phase 2: ${phase2ToolUsage}
|
|
1481
|
-
|
|
1482
|
-
**🎯 COGNITIVE ENHANCEMENT COMPLETE**
|
|
1483
|
-
All 6 stages processed through mandatory two-phase progression.
|
|
1484
|
-
|
|
1485
|
-
**FINAL SYNTHESIS:**
|
|
1486
|
-
${extractKeyInsights(stage3Result, stage5Result)}
|
|
1487
|
-
|
|
1488
|
-
**RECOMMENDED NEXT STEPS:**
|
|
1489
|
-
${extractActionableRecommendations(stage3Result, stage5Result, mode)}
|
|
1490
|
-
|
|
1491
|
-
\`\`\`tool use before re-deliberation: ${toolUsageCount}\`\`\``;
|
|
1492
|
-
}
|
|
1493
|
-
// Update session state
|
|
1494
|
-
if (session) {
|
|
1495
|
-
session.currentPhase = currentPhase;
|
|
1496
|
-
session.phaseResults.push(phaseResult);
|
|
1497
|
-
session.toolUsageCount = toolUsageCount;
|
|
1498
|
-
activeSessions.set(sessionId, session);
|
|
1499
|
-
}
|
|
1500
|
-
logToolResult(toolName, true, `Phase ${currentPhase} completed`);
|
|
1501
|
-
return { content: [{ type: "text", text: phaseResult }] };
|
|
1342
|
+
// Process all 6 stages internally and automatically
|
|
1343
|
+
const result = await performCognitiveDeliberation(input, mode, context);
|
|
1344
|
+
logToolResult(toolName, true, `All 6 stages processed successfully`);
|
|
1345
|
+
return {
|
|
1346
|
+
content: [
|
|
1347
|
+
{
|
|
1348
|
+
type: "text",
|
|
1349
|
+
text: result
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
};
|
|
1502
1353
|
}
|
|
1503
1354
|
catch (error) {
|
|
1504
1355
|
return logToolError(toolName, error);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nbiish/cognitive-tools-mcp",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "8.6.1",
|
|
4
|
+
"description": "Enhanced Cognitive Processing MCP Server - Automatically processes all 6 cognitive stages internally (Scientific Investigation, OOReD Analysis, Critical Thinking, Scientific Review, OOReD Review, Final Action) and returns comprehensive results. Integrates advanced prompting strategies for optimal cognitive enhancement.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|