lotus-wisdom-mcp 0.2.1 → 0.3.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 +71 -24
- package/dist/bundle.js +105 -85
- package/dist/index.js +108 -87
- package/dist/server.js +107 -85
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
<img src="assets/lotus-flower.png" alt="Lotus Flower" width="400"/>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
+
[](https://smithery.ai/server/@linxule/lotus-wisdom-mcp)
|
|
8
|
+
|
|
7
9
|
An MCP server implementation that provides a tool for problem-solving using the Lotus Sutra's wisdom framework, combining analytical thinking with intuitive wisdom.
|
|
8
10
|
|
|
9
11
|
## Features
|
|
@@ -27,7 +29,10 @@ The server implements a structured thinking process using wisdom domains inspire
|
|
|
27
29
|
|
|
28
30
|
### Wisdom Domains and Tags
|
|
29
31
|
|
|
30
|
-
The server organizes thoughts using
|
|
32
|
+
The server organizes thoughts using wisdom domains (all valid values for the `tag` input parameter):
|
|
33
|
+
|
|
34
|
+
* **Entry** (🚪): `begin`
|
|
35
|
+
- Begin your journey here - receives the full framework before contemplation starts
|
|
31
36
|
|
|
32
37
|
* **Skillful Means** (🔆): `upaya`, `expedient`, `direct`, `gradual`, `sudden`
|
|
33
38
|
- Different approaches to truth - sometimes direct pointing, sometimes gradual unfolding
|
|
@@ -59,12 +64,13 @@ Note: The visualization appears in the server console output, helping developers
|
|
|
59
64
|
### Process Flow
|
|
60
65
|
|
|
61
66
|
1. The user submits a problem to solve
|
|
62
|
-
2. The model
|
|
63
|
-
3.
|
|
64
|
-
4.
|
|
65
|
-
5.
|
|
66
|
-
6.
|
|
67
|
-
7.
|
|
67
|
+
2. The model begins with `tag='begin'` to receive the full framework
|
|
68
|
+
3. The model continues with contemplation tags (open, examine, integrate, etc.)
|
|
69
|
+
4. Each thought builds on previous ones and may revise understanding
|
|
70
|
+
5. The tool tracks both the tag journey and wisdom domain movements
|
|
71
|
+
6. Meditation pauses can be included for clarity
|
|
72
|
+
7. When status='WISDOM_READY' is returned, the tool's work is complete
|
|
73
|
+
8. The model then expresses the final wisdom naturally in its own voice
|
|
68
74
|
|
|
69
75
|
## Available Tools
|
|
70
76
|
|
|
@@ -72,6 +78,8 @@ Note: The visualization appears in the server console output, helping developers
|
|
|
72
78
|
|
|
73
79
|
A tool for problem-solving using the Lotus Sutra's wisdom framework, with various approaches to understanding.
|
|
74
80
|
|
|
81
|
+
**Begin your journey with `tag='begin'`** - this returns the full framework (philosophy, domains, guidance) to ground your contemplation. Then continue with the other tags.
|
|
82
|
+
|
|
75
83
|
**Inputs:**
|
|
76
84
|
|
|
77
85
|
* `tag` (string, required): The current processing technique (must be one of the tags listed above)
|
|
@@ -115,60 +123,72 @@ Here's how a conversation with Claude might flow when using the Lotus Wisdom MCP
|
|
|
115
123
|
|
|
116
124
|
**User**: "Help me understand the relationship between freedom and responsibility."
|
|
117
125
|
|
|
118
|
-
**Claude** would
|
|
126
|
+
**Claude** would begin the journey with `tag='begin'` to receive the framework, then continue:
|
|
127
|
+
|
|
128
|
+
1. First, enter the contemplative space:
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"tag": "begin",
|
|
132
|
+
"content": "Entering contemplation on freedom and responsibility.",
|
|
133
|
+
"stepNumber": 1,
|
|
134
|
+
"totalSteps": 6,
|
|
135
|
+
"nextStepNeeded": true
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
→ Returns `FRAMEWORK_RECEIVED` with full framework
|
|
119
139
|
|
|
120
|
-
|
|
140
|
+
2. Then, establish an opening thought:
|
|
121
141
|
```json
|
|
122
142
|
{
|
|
123
143
|
"tag": "open",
|
|
124
144
|
"content": "The question explores the relationship between freedom and responsibility, which contain an apparent tension but also deep connection.",
|
|
125
|
-
"stepNumber":
|
|
126
|
-
"totalSteps":
|
|
145
|
+
"stepNumber": 2,
|
|
146
|
+
"totalSteps": 6,
|
|
127
147
|
"nextStepNeeded": true
|
|
128
148
|
}
|
|
129
149
|
```
|
|
130
150
|
|
|
131
|
-
|
|
151
|
+
3. Engage with different perspectives:
|
|
132
152
|
```json
|
|
133
153
|
{
|
|
134
154
|
"tag": "direct",
|
|
135
155
|
"content": "Freedom and responsibility are two sides of the same coin. True freedom isn't absence of constraints but the capacity to choose our response within constraints.",
|
|
136
|
-
"stepNumber":
|
|
137
|
-
"totalSteps":
|
|
156
|
+
"stepNumber": 3,
|
|
157
|
+
"totalSteps": 6,
|
|
138
158
|
"nextStepNeeded": true
|
|
139
159
|
}
|
|
140
160
|
```
|
|
141
161
|
|
|
142
|
-
|
|
162
|
+
4. Perhaps take a meditation pause:
|
|
143
163
|
```json
|
|
144
164
|
{
|
|
145
165
|
"tag": "meditate",
|
|
146
166
|
"content": "Contemplating how freedom without responsibility becomes chaos, and responsibility without freedom becomes oppression.",
|
|
147
|
-
"stepNumber":
|
|
148
|
-
"totalSteps":
|
|
167
|
+
"stepNumber": 4,
|
|
168
|
+
"totalSteps": 6,
|
|
149
169
|
"nextStepNeeded": true,
|
|
150
170
|
"isMeditation": true
|
|
151
171
|
}
|
|
152
172
|
```
|
|
153
173
|
|
|
154
|
-
|
|
174
|
+
5. Integrate the understanding:
|
|
155
175
|
```json
|
|
156
176
|
{
|
|
157
177
|
"tag": "integrate",
|
|
158
178
|
"content": "Freedom and responsibility mutually enable each other. Our freedom to choose gives rise to our responsibility for what we choose, and our willingness to take responsibility expands our freedom.",
|
|
159
|
-
"stepNumber":
|
|
160
|
-
"totalSteps":
|
|
179
|
+
"stepNumber": 5,
|
|
180
|
+
"totalSteps": 6,
|
|
161
181
|
"nextStepNeeded": true
|
|
162
182
|
}
|
|
163
183
|
```
|
|
164
184
|
|
|
165
|
-
|
|
185
|
+
6. Express the final understanding:
|
|
166
186
|
```json
|
|
167
187
|
{
|
|
168
188
|
"tag": "express",
|
|
169
189
|
"content": "The paradox resolves when we see that authentic freedom includes responsibility as its natural expression.",
|
|
170
|
-
"stepNumber":
|
|
171
|
-
"totalSteps":
|
|
190
|
+
"stepNumber": 6,
|
|
191
|
+
"totalSteps": 6,
|
|
172
192
|
"nextStepNeeded": false
|
|
173
193
|
}
|
|
174
194
|
```
|
|
@@ -293,6 +313,21 @@ The Lotus Wisdom framework recognizes that wisdom often emerges not through line
|
|
|
293
313
|
|
|
294
314
|
5. **Natural Expression**: The tool handles the contemplative process, but the final wisdom is always expressed naturally by the AI, not as formatted output.
|
|
295
315
|
|
|
316
|
+
### Token Optimization Design
|
|
317
|
+
|
|
318
|
+
MCP tool descriptions stay in the AI's context window constantly when the server is connected. To minimize this overhead while preserving the full teaching content:
|
|
319
|
+
|
|
320
|
+
- **Constant context (~150 tokens)**: The `lotuswisdom` tool description is kept minimal—just enough for the AI to know when and how to use it
|
|
321
|
+
- **On-demand learning (~1,200 tokens)**: The complete framework is delivered when calling with `tag='begin'`, including:
|
|
322
|
+
- Philosophy and domain spirits
|
|
323
|
+
- Parameter explanations (tag, content, stepNumber, etc.)
|
|
324
|
+
- Response format details (wisdomDomain, journey, domainJourney)
|
|
325
|
+
- Meditation handling (MEDITATION_COMPLETE status)
|
|
326
|
+
- When to use guidance
|
|
327
|
+
- **Learn first, practice second**: The `begin` tag ensures models receive complete understanding before contemplating
|
|
328
|
+
|
|
329
|
+
This approach reduces constant context overhead by ~85% when the tool is idle. When actually used, the full framework is delivered on first step—nothing is lost.
|
|
330
|
+
|
|
296
331
|
## License
|
|
297
332
|
|
|
298
333
|
This MCP server is licensed under the MIT License. For more details, please see the LICENSE file in the project repository.
|
|
@@ -303,7 +338,19 @@ Contributions are welcome! Please feel free to submit issues or pull requests on
|
|
|
303
338
|
|
|
304
339
|
## Version
|
|
305
340
|
|
|
306
|
-
Current version: 0.
|
|
341
|
+
Current version: 0.3.1
|
|
342
|
+
|
|
343
|
+
### What's New in 0.3.1
|
|
344
|
+
|
|
345
|
+
- 📚 **Complete Framework Learning**: `begin` tag now returns full parameter explanations, response format details, and meditation handling
|
|
346
|
+
- 🔢 **Accurate Token Counts**: Updated documentation with actual token measurements (~150 constant, ~1,200 on-demand)
|
|
347
|
+
|
|
348
|
+
### What's New in 0.3.0
|
|
349
|
+
|
|
350
|
+
- 🚪 **Begin Tag**: New `tag='begin'` opens the journey—returns full framework before contemplation starts
|
|
351
|
+
- ⚡ **Optimized Token Footprint**: Reduced constant context overhead from ~1400 to ~200 tokens while preserving full teaching content
|
|
352
|
+
- 🧘 **Learn First, Practice Second**: The `begin` tag ensures models receive complete understanding before contemplating
|
|
353
|
+
- 📦 **Updated SDK**: Upgraded to @modelcontextprotocol/sdk 1.23.0
|
|
307
354
|
|
|
308
355
|
### What's New in 0.2.1
|
|
309
356
|
|
package/dist/bundle.js
CHANGED
|
@@ -12437,6 +12437,8 @@ var source_default = chalk;
|
|
|
12437
12437
|
|
|
12438
12438
|
// index.ts
|
|
12439
12439
|
var WISDOM_DOMAINS = {
|
|
12440
|
+
"entry": ["begin"],
|
|
12441
|
+
// Always call first to receive framework
|
|
12440
12442
|
"skillful_means": ["upaya", "expedient", "direct", "gradual", "sudden"],
|
|
12441
12443
|
"non_dual_recognition": ["recognize", "transform", "integrate", "transcend", "embody"],
|
|
12442
12444
|
"meta_cognitive": ["examine", "reflect", "verify", "refine", "complete"],
|
|
@@ -12484,7 +12486,7 @@ var LotusWisdomServer = class {
|
|
|
12484
12486
|
if (typeof data.nextStepNeeded !== "boolean") {
|
|
12485
12487
|
throw new Error("Invalid nextStepNeeded: must be a boolean");
|
|
12486
12488
|
}
|
|
12487
|
-
if (data.stepNumber === 1
|
|
12489
|
+
if (data.stepNumber === 1) {
|
|
12488
12490
|
this.resetProcess();
|
|
12489
12491
|
}
|
|
12490
12492
|
return {
|
|
@@ -12556,6 +12558,90 @@ var LotusWisdomServer = class {
|
|
|
12556
12558
|
}
|
|
12557
12559
|
this.thoughtProcess.push(validatedInput);
|
|
12558
12560
|
this.log(this.formatThought(validatedInput));
|
|
12561
|
+
if (validatedInput.tag === "begin") {
|
|
12562
|
+
return {
|
|
12563
|
+
content: [{
|
|
12564
|
+
type: "text",
|
|
12565
|
+
text: JSON.stringify({
|
|
12566
|
+
status: "FRAMEWORK_RECEIVED",
|
|
12567
|
+
welcome: "Welcome to the Lotus Wisdom framework. Read this before continuing your contemplative journey.",
|
|
12568
|
+
philosophy: {
|
|
12569
|
+
core: "The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags are not rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs.",
|
|
12570
|
+
essence: "The wisdom channels itself through your choices. Each step contains all others\u2014when you truly recognize, you are already transforming. The tool simply mirrors your journey without judgment.",
|
|
12571
|
+
trust: "Trust what each moment calls for. The path reveals itself in the walking."
|
|
12572
|
+
},
|
|
12573
|
+
domains: {
|
|
12574
|
+
process_flow: {
|
|
12575
|
+
tags: ["open", "engage", "express"],
|
|
12576
|
+
spirit: "The natural arc of inquiry. Opening creates space for what wants to emerge. Engagement explores with curiosity and presence. Expression shares what arose\u2014not as conclusion, but as offering.",
|
|
12577
|
+
role: "A container that can hold any of the other approaches within it."
|
|
12578
|
+
},
|
|
12579
|
+
skillful_means: {
|
|
12580
|
+
tags: ["upaya", "expedient", "direct", "gradual", "sudden"],
|
|
12581
|
+
spirit: "Many ways lead to understanding. Sometimes direct pointing cuts through confusion instantly. Sometimes patient, gradual unfolding is what serves. Upaya is the art of meeting each situation with what it actually needs.",
|
|
12582
|
+
role: "Different approaches to truth\u2014the medicine that fits the illness."
|
|
12583
|
+
},
|
|
12584
|
+
non_dual_recognition: {
|
|
12585
|
+
tags: ["recognize", "transform", "integrate", "transcend", "embody"],
|
|
12586
|
+
spirit: "Awakening to what is already present. Recognition and transformation are not separate\u2014to truly see IS already to change. Integration weaves apparent opposites. Transcendence sees beyond the frame. Embodiment lives the understanding.",
|
|
12587
|
+
role: "The alchemical heart of the journey\u2014where seeing becomes being."
|
|
12588
|
+
},
|
|
12589
|
+
meta_cognitive: {
|
|
12590
|
+
tags: ["examine", "reflect", "verify", "refine", "complete"],
|
|
12591
|
+
spirit: "The mind watching its own understanding unfold. Gentle examination, not harsh judgment. Reflection that deepens rather than distances. Verification that grounds insight in reality. Refinement that polishes without force.",
|
|
12592
|
+
role: "The witness consciousness that ensures clarity and completeness."
|
|
12593
|
+
},
|
|
12594
|
+
meditation: {
|
|
12595
|
+
tags: ["meditate"],
|
|
12596
|
+
spirit: "Pause. Let thoughts settle like silt in still water. Insight often emerges from stillness, not effort. The gap between thoughts holds wisdom that activity cannot reach.",
|
|
12597
|
+
role: "Sacred pause\u2014creating space for what cannot be grasped to be received."
|
|
12598
|
+
}
|
|
12599
|
+
},
|
|
12600
|
+
patterns: {
|
|
12601
|
+
note: "Common flows (not rules\u2014let the inquiry guide you):",
|
|
12602
|
+
suggestions: [
|
|
12603
|
+
"Opening often involves open, recognize, or examine\u2014creating space and initial contact",
|
|
12604
|
+
"Engagement might use direct, gradual, or upaya approaches\u2014working with what arose",
|
|
12605
|
+
"Integration can happen through integrate, transcend, or sudden insight\u2014weaving understanding",
|
|
12606
|
+
"Completion often flows through express, embody, or complete\u2014bringing forth and grounding"
|
|
12607
|
+
],
|
|
12608
|
+
flexibility: "These patterns are descriptive, not prescriptive. Some inquiries need only two steps. Others spiral through many. Trust what wants to happen."
|
|
12609
|
+
},
|
|
12610
|
+
guidance: {
|
|
12611
|
+
interpenetration: "These domains interpenetrate\u2014each step contains echoes of all others. A moment of recognition may also be transformation. An examination may suddenly become meditation.",
|
|
12612
|
+
uncertainty: "When uncertain, sit with the uncertainty. The fog is not an obstacle; it is part of the journey. Not-knowing is its own form of wisdom.",
|
|
12613
|
+
workflow: "Call lotuswisdom iteratively with different tags. The tool processes your contemplation internally\u2014do NOT output wisdom until you receive status=WISDOM_READY. Then speak naturally in your own voice.",
|
|
12614
|
+
next: 'Proceed with stepNumber: 2 using any tag that feels right (often "open" or "examine" to start).'
|
|
12615
|
+
},
|
|
12616
|
+
parameters: {
|
|
12617
|
+
tag: "The current processing technique\u2014choose from any wisdom domain",
|
|
12618
|
+
content: "Your contemplation for this step\u2014what you are thinking, seeing, or understanding",
|
|
12619
|
+
stepNumber: "Current step in your journey (this begin step is 1)",
|
|
12620
|
+
totalSteps: "Your estimate of total steps needed (can adjust as you go)",
|
|
12621
|
+
nextStepNeeded: "Set true to continue, false when ready to complete",
|
|
12622
|
+
isMeditation: "Set true when using the meditate tag for a contemplative pause",
|
|
12623
|
+
meditationDuration: "Optional seconds (1-10) for meditation pauses"
|
|
12624
|
+
},
|
|
12625
|
+
responses: {
|
|
12626
|
+
processing: "Normal steps return status=processing with journey tracking",
|
|
12627
|
+
wisdomDomain: "Which domain your current tag belongs to",
|
|
12628
|
+
journey: 'Your complete tag path so far (e.g., "open \u2192 examine \u2192 direct \u2192 integrate")',
|
|
12629
|
+
domainJourney: 'Movement between wisdom domains (e.g., "process_flow \u2192 meta_cognitive \u2192 skillful_means")',
|
|
12630
|
+
meditation: "The meditate tag returns status=MEDITATION_COMPLETE with a prompt asking what emerged from stillness",
|
|
12631
|
+
completion: "When nextStepNeeded=false, you receive status=WISDOM_READY\u2014then speak the final wisdom naturally in your own voice"
|
|
12632
|
+
},
|
|
12633
|
+
whenToUse: [
|
|
12634
|
+
"Breaking down complex problems requiring multi-faceted understanding",
|
|
12635
|
+
"Questions that benefit from both direct and gradual approaches",
|
|
12636
|
+
"Problems where apparent contradictions need integration",
|
|
12637
|
+
"Situations requiring both analytical and intuitive understanding",
|
|
12638
|
+
"Tasks that benefit from meditative pauses to allow insight",
|
|
12639
|
+
"Questions containing their own inherent wisdom"
|
|
12640
|
+
]
|
|
12641
|
+
}, null, 2)
|
|
12642
|
+
}]
|
|
12643
|
+
};
|
|
12644
|
+
}
|
|
12559
12645
|
if (validatedInput.tag === "meditate") {
|
|
12560
12646
|
const journeyResonance2 = this.thoughtProcess.map((step) => step.tag).join(" \u2192 ");
|
|
12561
12647
|
return {
|
|
@@ -12614,20 +12700,21 @@ var LotusWisdomServer = class {
|
|
|
12614
12700
|
const journeyResonance = this.thoughtProcess.map((step) => step.tag).join(" \u2192 ");
|
|
12615
12701
|
const domainJourney = this.thoughtProcess.map((step) => step.wisdomDomain).filter((domain, index, array) => index === 0 || domain !== array[index - 1]).join(" \u2192 ");
|
|
12616
12702
|
const currentDomain = getWisdomDomain(validatedInput.tag);
|
|
12703
|
+
const response = {
|
|
12704
|
+
status: "processing",
|
|
12705
|
+
currentStep: validatedInput.tag,
|
|
12706
|
+
wisdomDomain: currentDomain,
|
|
12707
|
+
journey: journeyResonance,
|
|
12708
|
+
domainJourney,
|
|
12709
|
+
stepNumber: validatedInput.stepNumber,
|
|
12710
|
+
totalSteps: validatedInput.totalSteps,
|
|
12711
|
+
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
12712
|
+
processLength: this.thoughtProcess.length
|
|
12713
|
+
};
|
|
12617
12714
|
return {
|
|
12618
12715
|
content: [{
|
|
12619
12716
|
type: "text",
|
|
12620
|
-
text: JSON.stringify(
|
|
12621
|
-
status: "processing",
|
|
12622
|
-
currentStep: validatedInput.tag,
|
|
12623
|
-
wisdomDomain: currentDomain,
|
|
12624
|
-
journey: journeyResonance,
|
|
12625
|
-
domainJourney,
|
|
12626
|
-
stepNumber: validatedInput.stepNumber,
|
|
12627
|
-
totalSteps: validatedInput.totalSteps,
|
|
12628
|
-
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
12629
|
-
processLength: this.thoughtProcess.length
|
|
12630
|
-
}, null, 2)
|
|
12717
|
+
text: JSON.stringify(response, null, 2)
|
|
12631
12718
|
}]
|
|
12632
12719
|
};
|
|
12633
12720
|
} catch (error) {
|
|
@@ -12643,7 +12730,7 @@ var LotusWisdomServer = class {
|
|
|
12643
12730
|
};
|
|
12644
12731
|
}
|
|
12645
12732
|
}
|
|
12646
|
-
//
|
|
12733
|
+
// Method to get current journey summary with domain awareness
|
|
12647
12734
|
getJourneySummary() {
|
|
12648
12735
|
const domainJourney = this.thoughtProcess.map((step) => step.wisdomDomain).filter((domain, index, array) => index === 0 || domain !== array[index - 1]).join(" \u2192 ");
|
|
12649
12736
|
return {
|
|
@@ -12665,78 +12752,11 @@ var LotusWisdomServer = class {
|
|
|
12665
12752
|
};
|
|
12666
12753
|
var LOTUS_WISDOM_TOOL = {
|
|
12667
12754
|
name: "lotuswisdom",
|
|
12668
|
-
description: `
|
|
12669
|
-
This tool facilitates the contemplative process but does NOT generate the final output.
|
|
12670
|
-
|
|
12671
|
-
**CRITICAL WORKFLOW:**
|
|
12672
|
-
1. Use this tool to process through the wisdom journey
|
|
12673
|
-
2. The tool tracks both your tag path and wisdom domain movements
|
|
12674
|
-
3. When you receive status='WISDOM_READY', the tool's work is COMPLETE
|
|
12675
|
-
4. YOU then craft and speak the final wisdom naturally in your own voice
|
|
12676
|
-
5. The tool processes; you express
|
|
12677
|
-
|
|
12678
|
-
When to use this tool:
|
|
12679
|
-
- Breaking down complex problems requiring multi-faceted understanding
|
|
12680
|
-
- Questions that benefit from both direct and gradual approaches
|
|
12681
|
-
- Problems where apparent contradictions need integration
|
|
12682
|
-
- Situations requiring both analytical and intuitive understanding
|
|
12683
|
-
- Tasks that benefit from meditative pauses to allow insight
|
|
12684
|
-
- Questions containing their own inherent wisdom
|
|
12685
|
-
|
|
12686
|
-
The Journey Structure:
|
|
12687
|
-
The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags aren't
|
|
12688
|
-
rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs:
|
|
12689
|
-
|
|
12690
|
-
**Wisdom Domains:**
|
|
12691
|
-
- **Skillful Means** (skillful_means): upaya, expedient, direct, gradual, sudden
|
|
12692
|
-
Different approaches to truth - sometimes direct pointing, sometimes gradual unfolding
|
|
12693
|
-
|
|
12694
|
-
- **Non-Dual Recognition** (non_dual_recognition): recognize, transform, integrate, transcend, embody
|
|
12695
|
-
Aspects of awakening to what's already present - recognition IS transformation
|
|
12696
|
-
|
|
12697
|
-
- **Meta-Cognitive** (meta_cognitive): examine, reflect, verify, refine, complete
|
|
12698
|
-
The mind watching its own understanding unfold
|
|
12699
|
-
|
|
12700
|
-
- **Process Flow** (process_flow): open, engage, express
|
|
12701
|
-
A natural arc that can contain any of the above approaches
|
|
12702
|
-
|
|
12703
|
-
- **Meditation** (meditation): meditate
|
|
12704
|
-
Pausing to let insights emerge from stillness
|
|
12705
|
-
|
|
12706
|
-
The tool tracks both your tag journey and your movement between wisdom domains, showing how
|
|
12707
|
-
different aspects of wisdom weave together in your unique inquiry.
|
|
12708
|
-
|
|
12709
|
-
The wisdom channels itself through your choices. Each step contains all others - when you truly
|
|
12710
|
-
recognize, you're already transforming. The tool simply mirrors your journey without judgment.
|
|
12711
|
-
|
|
12712
|
-
Common patterns (not rules):
|
|
12713
|
-
- Opening often involves recognize or examine
|
|
12714
|
-
- Engagement might use upaya, direct, or gradual approaches
|
|
12715
|
-
- Transformation can happen through integrate, transcend, or sudden insight
|
|
12716
|
-
- Expression might complete or embody the understanding
|
|
12717
|
-
|
|
12718
|
-
Trust what each moment calls for. The path reveals itself in the walking.
|
|
12719
|
-
|
|
12720
|
-
Parameters explained:
|
|
12721
|
-
- tag: The current technique or stage
|
|
12722
|
-
- content: The content of the current step
|
|
12723
|
-
- stepNumber: Current number in sequence
|
|
12724
|
-
- totalSteps: Estimated total needed
|
|
12725
|
-
- nextStepNeeded: Whether another step is needed
|
|
12726
|
-
- isMeditation: Whether this is a meditation pause
|
|
12727
|
-
- meditationDuration: Optional duration for meditation (1-10 seconds)
|
|
12728
|
-
|
|
12729
|
-
The tool will respond with:
|
|
12730
|
-
- wisdomDomain: Which wisdom domain the current tag belongs to
|
|
12731
|
-
- journey: The complete tag path (e.g., "open \u2192 examine \u2192 direct \u2192 transform")
|
|
12732
|
-
- domainJourney: Movement between wisdom domains (e.g., "process_flow \u2192 meta_cognitive \u2192 skillful_means \u2192 non_dual_recognition")
|
|
12733
|
-
|
|
12734
|
-
This consciousness of domains helps you see which aspects of wisdom are being engaged and how they weave together in your unique inquiry.
|
|
12755
|
+
description: `Contemplative reasoning tool. Use for complex problems needing multi-perspective understanding, contradictions requiring integration, or questions holding their own wisdom.
|
|
12735
12756
|
|
|
12736
|
-
**
|
|
12737
|
-
with a prompt asking what emerged. This creates actual space in the process.
|
|
12757
|
+
**Workflow:** Always start with tag='begin' (returns framework). Then continue with contemplation tags. Do NOT output wisdom until status='WISDOM_READY'.
|
|
12738
12758
|
|
|
12739
|
-
|
|
12759
|
+
**Tags:** begin (FIRST - receives framework), then: open/engage/express (process), examine/reflect/verify/refine/complete (meta-cognitive), recognize/transform/integrate/transcend/embody (non-dual), upaya/expedient/direct/gradual/sudden (skillful-means), meditate (pause).`,
|
|
12740
12760
|
inputSchema: {
|
|
12741
12761
|
type: "object",
|
|
12742
12762
|
properties: {
|
|
@@ -12789,7 +12809,7 @@ var JOURNEY_SUMMARY_TOOL = {
|
|
|
12789
12809
|
var server = new Server(
|
|
12790
12810
|
{
|
|
12791
12811
|
name: "lotus-wisdom-server",
|
|
12792
|
-
version: "0.
|
|
12812
|
+
version: "0.3.0"
|
|
12793
12813
|
},
|
|
12794
12814
|
{
|
|
12795
12815
|
capabilities: {
|
|
@@ -12818,7 +12838,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
12818
12838
|
async function runServer() {
|
|
12819
12839
|
const transport = new StdioServerTransport();
|
|
12820
12840
|
await server.connect(transport);
|
|
12821
|
-
console.error("Lotus Wisdom MCP Server v0.
|
|
12841
|
+
console.error("Lotus Wisdom MCP Server v0.3.0 running");
|
|
12822
12842
|
}
|
|
12823
12843
|
runServer().catch((error) => {
|
|
12824
12844
|
console.error("Fatal error running server:", error);
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
// Lotus Sutra framework tags - organized by wisdom domains
|
|
7
7
|
const WISDOM_DOMAINS = {
|
|
8
|
+
'entry': ['begin'], // Always call first to receive framework
|
|
8
9
|
'skillful_means': ['upaya', 'expedient', 'direct', 'gradual', 'sudden'],
|
|
9
10
|
'non_dual_recognition': ['recognize', 'transform', 'integrate', 'transcend', 'embody'],
|
|
10
11
|
'meta_cognitive': ['examine', 'reflect', 'verify', 'refine', 'complete'],
|
|
@@ -56,8 +57,8 @@ class LotusWisdomServer {
|
|
|
56
57
|
if (typeof data.nextStepNeeded !== 'boolean') {
|
|
57
58
|
throw new Error('Invalid nextStepNeeded: must be a boolean');
|
|
58
59
|
}
|
|
59
|
-
// Auto-reset on new journey
|
|
60
|
-
if (data.stepNumber === 1
|
|
60
|
+
// Auto-reset on any new journey (step 1 indicates fresh start)
|
|
61
|
+
if (data.stepNumber === 1) {
|
|
61
62
|
this.resetProcess();
|
|
62
63
|
}
|
|
63
64
|
return {
|
|
@@ -138,6 +139,91 @@ class LotusWisdomServer {
|
|
|
138
139
|
this.thoughtProcess.push(validatedInput);
|
|
139
140
|
// Log to console if debug mode
|
|
140
141
|
this.log(this.formatThought(validatedInput));
|
|
142
|
+
// Handle "begin" tag - return full framework (preserving original richness)
|
|
143
|
+
if (validatedInput.tag === 'begin') {
|
|
144
|
+
return {
|
|
145
|
+
content: [{
|
|
146
|
+
type: "text",
|
|
147
|
+
text: JSON.stringify({
|
|
148
|
+
status: 'FRAMEWORK_RECEIVED',
|
|
149
|
+
welcome: 'Welcome to the Lotus Wisdom framework. Read this before continuing your contemplative journey.',
|
|
150
|
+
philosophy: {
|
|
151
|
+
core: 'The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags are not rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs.',
|
|
152
|
+
essence: 'The wisdom channels itself through your choices. Each step contains all others—when you truly recognize, you are already transforming. The tool simply mirrors your journey without judgment.',
|
|
153
|
+
trust: 'Trust what each moment calls for. The path reveals itself in the walking.'
|
|
154
|
+
},
|
|
155
|
+
domains: {
|
|
156
|
+
process_flow: {
|
|
157
|
+
tags: ['open', 'engage', 'express'],
|
|
158
|
+
spirit: 'The natural arc of inquiry. Opening creates space for what wants to emerge. Engagement explores with curiosity and presence. Expression shares what arose—not as conclusion, but as offering.',
|
|
159
|
+
role: 'A container that can hold any of the other approaches within it.'
|
|
160
|
+
},
|
|
161
|
+
skillful_means: {
|
|
162
|
+
tags: ['upaya', 'expedient', 'direct', 'gradual', 'sudden'],
|
|
163
|
+
spirit: 'Many ways lead to understanding. Sometimes direct pointing cuts through confusion instantly. Sometimes patient, gradual unfolding is what serves. Upaya is the art of meeting each situation with what it actually needs.',
|
|
164
|
+
role: 'Different approaches to truth—the medicine that fits the illness.'
|
|
165
|
+
},
|
|
166
|
+
non_dual_recognition: {
|
|
167
|
+
tags: ['recognize', 'transform', 'integrate', 'transcend', 'embody'],
|
|
168
|
+
spirit: 'Awakening to what is already present. Recognition and transformation are not separate—to truly see IS already to change. Integration weaves apparent opposites. Transcendence sees beyond the frame. Embodiment lives the understanding.',
|
|
169
|
+
role: 'The alchemical heart of the journey—where seeing becomes being.'
|
|
170
|
+
},
|
|
171
|
+
meta_cognitive: {
|
|
172
|
+
tags: ['examine', 'reflect', 'verify', 'refine', 'complete'],
|
|
173
|
+
spirit: 'The mind watching its own understanding unfold. Gentle examination, not harsh judgment. Reflection that deepens rather than distances. Verification that grounds insight in reality. Refinement that polishes without force.',
|
|
174
|
+
role: 'The witness consciousness that ensures clarity and completeness.'
|
|
175
|
+
},
|
|
176
|
+
meditation: {
|
|
177
|
+
tags: ['meditate'],
|
|
178
|
+
spirit: 'Pause. Let thoughts settle like silt in still water. Insight often emerges from stillness, not effort. The gap between thoughts holds wisdom that activity cannot reach.',
|
|
179
|
+
role: 'Sacred pause—creating space for what cannot be grasped to be received.'
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
patterns: {
|
|
183
|
+
note: 'Common flows (not rules—let the inquiry guide you):',
|
|
184
|
+
suggestions: [
|
|
185
|
+
'Opening often involves open, recognize, or examine—creating space and initial contact',
|
|
186
|
+
'Engagement might use direct, gradual, or upaya approaches—working with what arose',
|
|
187
|
+
'Integration can happen through integrate, transcend, or sudden insight—weaving understanding',
|
|
188
|
+
'Completion often flows through express, embody, or complete—bringing forth and grounding'
|
|
189
|
+
],
|
|
190
|
+
flexibility: 'These patterns are descriptive, not prescriptive. Some inquiries need only two steps. Others spiral through many. Trust what wants to happen.'
|
|
191
|
+
},
|
|
192
|
+
guidance: {
|
|
193
|
+
interpenetration: 'These domains interpenetrate—each step contains echoes of all others. A moment of recognition may also be transformation. An examination may suddenly become meditation.',
|
|
194
|
+
uncertainty: 'When uncertain, sit with the uncertainty. The fog is not an obstacle; it is part of the journey. Not-knowing is its own form of wisdom.',
|
|
195
|
+
workflow: 'Call lotuswisdom iteratively with different tags. The tool processes your contemplation internally—do NOT output wisdom until you receive status=WISDOM_READY. Then speak naturally in your own voice.',
|
|
196
|
+
next: 'Proceed with stepNumber: 2 using any tag that feels right (often "open" or "examine" to start).'
|
|
197
|
+
},
|
|
198
|
+
parameters: {
|
|
199
|
+
tag: 'The current processing technique—choose from any wisdom domain',
|
|
200
|
+
content: 'Your contemplation for this step—what you are thinking, seeing, or understanding',
|
|
201
|
+
stepNumber: 'Current step in your journey (this begin step is 1)',
|
|
202
|
+
totalSteps: 'Your estimate of total steps needed (can adjust as you go)',
|
|
203
|
+
nextStepNeeded: 'Set true to continue, false when ready to complete',
|
|
204
|
+
isMeditation: 'Set true when using the meditate tag for a contemplative pause',
|
|
205
|
+
meditationDuration: 'Optional seconds (1-10) for meditation pauses'
|
|
206
|
+
},
|
|
207
|
+
responses: {
|
|
208
|
+
processing: 'Normal steps return status=processing with journey tracking',
|
|
209
|
+
wisdomDomain: 'Which domain your current tag belongs to',
|
|
210
|
+
journey: 'Your complete tag path so far (e.g., "open → examine → direct → integrate")',
|
|
211
|
+
domainJourney: 'Movement between wisdom domains (e.g., "process_flow → meta_cognitive → skillful_means")',
|
|
212
|
+
meditation: 'The meditate tag returns status=MEDITATION_COMPLETE with a prompt asking what emerged from stillness',
|
|
213
|
+
completion: 'When nextStepNeeded=false, you receive status=WISDOM_READY—then speak the final wisdom naturally in your own voice'
|
|
214
|
+
},
|
|
215
|
+
whenToUse: [
|
|
216
|
+
'Breaking down complex problems requiring multi-faceted understanding',
|
|
217
|
+
'Questions that benefit from both direct and gradual approaches',
|
|
218
|
+
'Problems where apparent contradictions need integration',
|
|
219
|
+
'Situations requiring both analytical and intuitive understanding',
|
|
220
|
+
'Tasks that benefit from meditative pauses to allow insight',
|
|
221
|
+
'Questions containing their own inherent wisdom'
|
|
222
|
+
]
|
|
223
|
+
}, null, 2)
|
|
224
|
+
}]
|
|
225
|
+
};
|
|
226
|
+
}
|
|
141
227
|
// Handle meditation specially
|
|
142
228
|
if (validatedInput.tag === 'meditate') {
|
|
143
229
|
const journeyResonance = this.thoughtProcess
|
|
@@ -215,21 +301,23 @@ class LotusWisdomServer {
|
|
|
215
301
|
.join(' → ');
|
|
216
302
|
// Get wisdom domain for current step
|
|
217
303
|
const currentDomain = getWisdomDomain(validatedInput.tag);
|
|
304
|
+
// Build response object
|
|
305
|
+
const response = {
|
|
306
|
+
status: 'processing',
|
|
307
|
+
currentStep: validatedInput.tag,
|
|
308
|
+
wisdomDomain: currentDomain,
|
|
309
|
+
journey: journeyResonance,
|
|
310
|
+
domainJourney: domainJourney,
|
|
311
|
+
stepNumber: validatedInput.stepNumber,
|
|
312
|
+
totalSteps: validatedInput.totalSteps,
|
|
313
|
+
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
314
|
+
processLength: this.thoughtProcess.length
|
|
315
|
+
};
|
|
218
316
|
// For non-final steps, return process metadata with journey awareness
|
|
219
317
|
return {
|
|
220
318
|
content: [{
|
|
221
319
|
type: "text",
|
|
222
|
-
text: JSON.stringify(
|
|
223
|
-
status: 'processing',
|
|
224
|
-
currentStep: validatedInput.tag,
|
|
225
|
-
wisdomDomain: currentDomain,
|
|
226
|
-
journey: journeyResonance,
|
|
227
|
-
domainJourney: domainJourney,
|
|
228
|
-
stepNumber: validatedInput.stepNumber,
|
|
229
|
-
totalSteps: validatedInput.totalSteps,
|
|
230
|
-
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
231
|
-
processLength: this.thoughtProcess.length
|
|
232
|
-
}, null, 2)
|
|
320
|
+
text: JSON.stringify(response, null, 2)
|
|
233
321
|
}]
|
|
234
322
|
};
|
|
235
323
|
}
|
|
@@ -246,7 +334,7 @@ class LotusWisdomServer {
|
|
|
246
334
|
};
|
|
247
335
|
}
|
|
248
336
|
}
|
|
249
|
-
//
|
|
337
|
+
// Method to get current journey summary with domain awareness
|
|
250
338
|
getJourneySummary() {
|
|
251
339
|
const domainJourney = this.thoughtProcess
|
|
252
340
|
.map(step => step.wisdomDomain)
|
|
@@ -271,78 +359,11 @@ class LotusWisdomServer {
|
|
|
271
359
|
}
|
|
272
360
|
const LOTUS_WISDOM_TOOL = {
|
|
273
361
|
name: "lotuswisdom",
|
|
274
|
-
description: `
|
|
275
|
-
This tool facilitates the contemplative process but does NOT generate the final output.
|
|
276
|
-
|
|
277
|
-
**CRITICAL WORKFLOW:**
|
|
278
|
-
1. Use this tool to process through the wisdom journey
|
|
279
|
-
2. The tool tracks both your tag path and wisdom domain movements
|
|
280
|
-
3. When you receive status='WISDOM_READY', the tool's work is COMPLETE
|
|
281
|
-
4. YOU then craft and speak the final wisdom naturally in your own voice
|
|
282
|
-
5. The tool processes; you express
|
|
283
|
-
|
|
284
|
-
When to use this tool:
|
|
285
|
-
- Breaking down complex problems requiring multi-faceted understanding
|
|
286
|
-
- Questions that benefit from both direct and gradual approaches
|
|
287
|
-
- Problems where apparent contradictions need integration
|
|
288
|
-
- Situations requiring both analytical and intuitive understanding
|
|
289
|
-
- Tasks that benefit from meditative pauses to allow insight
|
|
290
|
-
- Questions containing their own inherent wisdom
|
|
291
|
-
|
|
292
|
-
The Journey Structure:
|
|
293
|
-
The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags aren't
|
|
294
|
-
rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs:
|
|
295
|
-
|
|
296
|
-
**Wisdom Domains:**
|
|
297
|
-
- **Skillful Means** (skillful_means): upaya, expedient, direct, gradual, sudden
|
|
298
|
-
Different approaches to truth - sometimes direct pointing, sometimes gradual unfolding
|
|
299
|
-
|
|
300
|
-
- **Non-Dual Recognition** (non_dual_recognition): recognize, transform, integrate, transcend, embody
|
|
301
|
-
Aspects of awakening to what's already present - recognition IS transformation
|
|
302
|
-
|
|
303
|
-
- **Meta-Cognitive** (meta_cognitive): examine, reflect, verify, refine, complete
|
|
304
|
-
The mind watching its own understanding unfold
|
|
305
|
-
|
|
306
|
-
- **Process Flow** (process_flow): open, engage, express
|
|
307
|
-
A natural arc that can contain any of the above approaches
|
|
308
|
-
|
|
309
|
-
- **Meditation** (meditation): meditate
|
|
310
|
-
Pausing to let insights emerge from stillness
|
|
311
|
-
|
|
312
|
-
The tool tracks both your tag journey and your movement between wisdom domains, showing how
|
|
313
|
-
different aspects of wisdom weave together in your unique inquiry.
|
|
314
|
-
|
|
315
|
-
The wisdom channels itself through your choices. Each step contains all others - when you truly
|
|
316
|
-
recognize, you're already transforming. The tool simply mirrors your journey without judgment.
|
|
317
|
-
|
|
318
|
-
Common patterns (not rules):
|
|
319
|
-
- Opening often involves recognize or examine
|
|
320
|
-
- Engagement might use upaya, direct, or gradual approaches
|
|
321
|
-
- Transformation can happen through integrate, transcend, or sudden insight
|
|
322
|
-
- Expression might complete or embody the understanding
|
|
323
|
-
|
|
324
|
-
Trust what each moment calls for. The path reveals itself in the walking.
|
|
325
|
-
|
|
326
|
-
Parameters explained:
|
|
327
|
-
- tag: The current technique or stage
|
|
328
|
-
- content: The content of the current step
|
|
329
|
-
- stepNumber: Current number in sequence
|
|
330
|
-
- totalSteps: Estimated total needed
|
|
331
|
-
- nextStepNeeded: Whether another step is needed
|
|
332
|
-
- isMeditation: Whether this is a meditation pause
|
|
333
|
-
- meditationDuration: Optional duration for meditation (1-10 seconds)
|
|
334
|
-
|
|
335
|
-
The tool will respond with:
|
|
336
|
-
- wisdomDomain: Which wisdom domain the current tag belongs to
|
|
337
|
-
- journey: The complete tag path (e.g., "open → examine → direct → transform")
|
|
338
|
-
- domainJourney: Movement between wisdom domains (e.g., "process_flow → meta_cognitive → skillful_means → non_dual_recognition")
|
|
339
|
-
|
|
340
|
-
This consciousness of domains helps you see which aspects of wisdom are being engaged and how they weave together in your unique inquiry.
|
|
362
|
+
description: `Contemplative reasoning tool. Use for complex problems needing multi-perspective understanding, contradictions requiring integration, or questions holding their own wisdom.
|
|
341
363
|
|
|
342
|
-
**
|
|
343
|
-
with a prompt asking what emerged. This creates actual space in the process.
|
|
364
|
+
**Workflow:** Always start with tag='begin' (returns framework). Then continue with contemplation tags. Do NOT output wisdom until status='WISDOM_READY'.
|
|
344
365
|
|
|
345
|
-
|
|
366
|
+
**Tags:** begin (FIRST - receives framework), then: open/engage/express (process), examine/reflect/verify/refine/complete (meta-cognitive), recognize/transform/integrate/transcend/embody (non-dual), upaya/expedient/direct/gradual/sudden (skillful-means), meditate (pause).`,
|
|
346
367
|
inputSchema: {
|
|
347
368
|
type: "object",
|
|
348
369
|
properties: {
|
|
@@ -383,7 +404,7 @@ The tool handles the contemplation; you handle the expression.`,
|
|
|
383
404
|
required: ["tag", "content", "stepNumber", "totalSteps", "nextStepNeeded"]
|
|
384
405
|
}
|
|
385
406
|
};
|
|
386
|
-
//
|
|
407
|
+
// Tool for querying journey state
|
|
387
408
|
const JOURNEY_SUMMARY_TOOL = {
|
|
388
409
|
name: "lotuswisdom_summary",
|
|
389
410
|
description: "Get a summary of the current contemplative journey",
|
|
@@ -395,7 +416,7 @@ const JOURNEY_SUMMARY_TOOL = {
|
|
|
395
416
|
};
|
|
396
417
|
const server = new Server({
|
|
397
418
|
name: "lotus-wisdom-server",
|
|
398
|
-
version: "0.
|
|
419
|
+
version: "0.3.0",
|
|
399
420
|
}, {
|
|
400
421
|
capabilities: {
|
|
401
422
|
tools: {},
|
|
@@ -423,7 +444,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
423
444
|
async function runServer() {
|
|
424
445
|
const transport = new StdioServerTransport();
|
|
425
446
|
await server.connect(transport);
|
|
426
|
-
console.error("Lotus Wisdom MCP Server v0.
|
|
447
|
+
console.error("Lotus Wisdom MCP Server v0.3.0 running");
|
|
427
448
|
}
|
|
428
449
|
runServer().catch((error) => {
|
|
429
450
|
console.error("Fatal error running server:", error);
|
package/dist/server.js
CHANGED
|
@@ -7,6 +7,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, isInitializeRequest } fr
|
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
// Lotus Sutra framework tags - organized by wisdom domains
|
|
9
9
|
const WISDOM_DOMAINS = {
|
|
10
|
+
'entry': ['begin'], // Always call first to receive framework
|
|
10
11
|
'skillful_means': ['upaya', 'expedient', 'direct', 'gradual', 'sudden'],
|
|
11
12
|
'non_dual_recognition': ['recognize', 'transform', 'integrate', 'transcend', 'embody'],
|
|
12
13
|
'meta_cognitive': ['examine', 'reflect', 'verify', 'refine', 'complete'],
|
|
@@ -56,8 +57,8 @@ class LotusWisdomServer {
|
|
|
56
57
|
if (typeof data.nextStepNeeded !== 'boolean') {
|
|
57
58
|
throw new Error('Invalid nextStepNeeded: must be a boolean');
|
|
58
59
|
}
|
|
59
|
-
// Auto-reset on new journey
|
|
60
|
-
if (data.stepNumber === 1
|
|
60
|
+
// Auto-reset on any new journey (step 1 indicates fresh start)
|
|
61
|
+
if (data.stepNumber === 1) {
|
|
61
62
|
this.resetProcess();
|
|
62
63
|
}
|
|
63
64
|
return {
|
|
@@ -136,6 +137,91 @@ class LotusWisdomServer {
|
|
|
136
137
|
}
|
|
137
138
|
this.thoughtProcess.push(validatedInput);
|
|
138
139
|
this.log(this.formatThought(validatedInput));
|
|
140
|
+
// Handle "begin" tag - return full framework (preserving original richness)
|
|
141
|
+
if (validatedInput.tag === 'begin') {
|
|
142
|
+
return {
|
|
143
|
+
content: [{
|
|
144
|
+
type: "text",
|
|
145
|
+
text: JSON.stringify({
|
|
146
|
+
status: 'FRAMEWORK_RECEIVED',
|
|
147
|
+
welcome: 'Welcome to the Lotus Wisdom framework. Read this before continuing your contemplative journey.',
|
|
148
|
+
philosophy: {
|
|
149
|
+
core: 'The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags are not rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs.',
|
|
150
|
+
essence: 'The wisdom channels itself through your choices. Each step contains all others—when you truly recognize, you are already transforming. The tool simply mirrors your journey without judgment.',
|
|
151
|
+
trust: 'Trust what each moment calls for. The path reveals itself in the walking.'
|
|
152
|
+
},
|
|
153
|
+
domains: {
|
|
154
|
+
process_flow: {
|
|
155
|
+
tags: ['open', 'engage', 'express'],
|
|
156
|
+
spirit: 'The natural arc of inquiry. Opening creates space for what wants to emerge. Engagement explores with curiosity and presence. Expression shares what arose—not as conclusion, but as offering.',
|
|
157
|
+
role: 'A container that can hold any of the other approaches within it.'
|
|
158
|
+
},
|
|
159
|
+
skillful_means: {
|
|
160
|
+
tags: ['upaya', 'expedient', 'direct', 'gradual', 'sudden'],
|
|
161
|
+
spirit: 'Many ways lead to understanding. Sometimes direct pointing cuts through confusion instantly. Sometimes patient, gradual unfolding is what serves. Upaya is the art of meeting each situation with what it actually needs.',
|
|
162
|
+
role: 'Different approaches to truth—the medicine that fits the illness.'
|
|
163
|
+
},
|
|
164
|
+
non_dual_recognition: {
|
|
165
|
+
tags: ['recognize', 'transform', 'integrate', 'transcend', 'embody'],
|
|
166
|
+
spirit: 'Awakening to what is already present. Recognition and transformation are not separate—to truly see IS already to change. Integration weaves apparent opposites. Transcendence sees beyond the frame. Embodiment lives the understanding.',
|
|
167
|
+
role: 'The alchemical heart of the journey—where seeing becomes being.'
|
|
168
|
+
},
|
|
169
|
+
meta_cognitive: {
|
|
170
|
+
tags: ['examine', 'reflect', 'verify', 'refine', 'complete'],
|
|
171
|
+
spirit: 'The mind watching its own understanding unfold. Gentle examination, not harsh judgment. Reflection that deepens rather than distances. Verification that grounds insight in reality. Refinement that polishes without force.',
|
|
172
|
+
role: 'The witness consciousness that ensures clarity and completeness.'
|
|
173
|
+
},
|
|
174
|
+
meditation: {
|
|
175
|
+
tags: ['meditate'],
|
|
176
|
+
spirit: 'Pause. Let thoughts settle like silt in still water. Insight often emerges from stillness, not effort. The gap between thoughts holds wisdom that activity cannot reach.',
|
|
177
|
+
role: 'Sacred pause—creating space for what cannot be grasped to be received.'
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
patterns: {
|
|
181
|
+
note: 'Common flows (not rules—let the inquiry guide you):',
|
|
182
|
+
suggestions: [
|
|
183
|
+
'Opening often involves open, recognize, or examine—creating space and initial contact',
|
|
184
|
+
'Engagement might use direct, gradual, or upaya approaches—working with what arose',
|
|
185
|
+
'Integration can happen through integrate, transcend, or sudden insight—weaving understanding',
|
|
186
|
+
'Completion often flows through express, embody, or complete—bringing forth and grounding'
|
|
187
|
+
],
|
|
188
|
+
flexibility: 'These patterns are descriptive, not prescriptive. Some inquiries need only two steps. Others spiral through many. Trust what wants to happen.'
|
|
189
|
+
},
|
|
190
|
+
guidance: {
|
|
191
|
+
interpenetration: 'These domains interpenetrate—each step contains echoes of all others. A moment of recognition may also be transformation. An examination may suddenly become meditation.',
|
|
192
|
+
uncertainty: 'When uncertain, sit with the uncertainty. The fog is not an obstacle; it is part of the journey. Not-knowing is its own form of wisdom.',
|
|
193
|
+
workflow: 'Call lotuswisdom iteratively with different tags. The tool processes your contemplation internally—do NOT output wisdom until you receive status=WISDOM_READY. Then speak naturally in your own voice.',
|
|
194
|
+
next: 'Proceed with stepNumber: 2 using any tag that feels right (often "open" or "examine" to start).'
|
|
195
|
+
},
|
|
196
|
+
parameters: {
|
|
197
|
+
tag: 'The current processing technique—choose from any wisdom domain',
|
|
198
|
+
content: 'Your contemplation for this step—what you are thinking, seeing, or understanding',
|
|
199
|
+
stepNumber: 'Current step in your journey (this begin step is 1)',
|
|
200
|
+
totalSteps: 'Your estimate of total steps needed (can adjust as you go)',
|
|
201
|
+
nextStepNeeded: 'Set true to continue, false when ready to complete',
|
|
202
|
+
isMeditation: 'Set true when using the meditate tag for a contemplative pause',
|
|
203
|
+
meditationDuration: 'Optional seconds (1-10) for meditation pauses'
|
|
204
|
+
},
|
|
205
|
+
responses: {
|
|
206
|
+
processing: 'Normal steps return status=processing with journey tracking',
|
|
207
|
+
wisdomDomain: 'Which domain your current tag belongs to',
|
|
208
|
+
journey: 'Your complete tag path so far (e.g., "open → examine → direct → integrate")',
|
|
209
|
+
domainJourney: 'Movement between wisdom domains (e.g., "process_flow → meta_cognitive → skillful_means")',
|
|
210
|
+
meditation: 'The meditate tag returns status=MEDITATION_COMPLETE with a prompt asking what emerged from stillness',
|
|
211
|
+
completion: 'When nextStepNeeded=false, you receive status=WISDOM_READY—then speak the final wisdom naturally in your own voice'
|
|
212
|
+
},
|
|
213
|
+
whenToUse: [
|
|
214
|
+
'Breaking down complex problems requiring multi-faceted understanding',
|
|
215
|
+
'Questions that benefit from both direct and gradual approaches',
|
|
216
|
+
'Problems where apparent contradictions need integration',
|
|
217
|
+
'Situations requiring both analytical and intuitive understanding',
|
|
218
|
+
'Tasks that benefit from meditative pauses to allow insight',
|
|
219
|
+
'Questions containing their own inherent wisdom'
|
|
220
|
+
]
|
|
221
|
+
}, null, 2)
|
|
222
|
+
}]
|
|
223
|
+
};
|
|
224
|
+
}
|
|
139
225
|
// Handle meditation specially
|
|
140
226
|
if (validatedInput.tag === 'meditate') {
|
|
141
227
|
const journeyResonance = this.thoughtProcess
|
|
@@ -211,20 +297,23 @@ class LotusWisdomServer {
|
|
|
211
297
|
.filter((domain, index, array) => index === 0 || domain !== array[index - 1])
|
|
212
298
|
.join(' → ');
|
|
213
299
|
const currentDomain = getWisdomDomain(validatedInput.tag);
|
|
300
|
+
// Build response object
|
|
301
|
+
const response = {
|
|
302
|
+
status: 'processing',
|
|
303
|
+
currentStep: validatedInput.tag,
|
|
304
|
+
wisdomDomain: currentDomain,
|
|
305
|
+
journey: journeyResonance,
|
|
306
|
+
domainJourney: domainJourney,
|
|
307
|
+
stepNumber: validatedInput.stepNumber,
|
|
308
|
+
totalSteps: validatedInput.totalSteps,
|
|
309
|
+
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
310
|
+
processLength: this.thoughtProcess.length
|
|
311
|
+
};
|
|
312
|
+
// For non-final steps, return process metadata with journey awareness
|
|
214
313
|
return {
|
|
215
314
|
content: [{
|
|
216
315
|
type: "text",
|
|
217
|
-
text: JSON.stringify(
|
|
218
|
-
status: 'processing',
|
|
219
|
-
currentStep: validatedInput.tag,
|
|
220
|
-
wisdomDomain: currentDomain,
|
|
221
|
-
journey: journeyResonance,
|
|
222
|
-
domainJourney: domainJourney,
|
|
223
|
-
stepNumber: validatedInput.stepNumber,
|
|
224
|
-
totalSteps: validatedInput.totalSteps,
|
|
225
|
-
nextStepNeeded: validatedInput.nextStepNeeded,
|
|
226
|
-
processLength: this.thoughtProcess.length
|
|
227
|
-
}, null, 2)
|
|
316
|
+
text: JSON.stringify(response, null, 2)
|
|
228
317
|
}]
|
|
229
318
|
};
|
|
230
319
|
}
|
|
@@ -265,78 +354,11 @@ class LotusWisdomServer {
|
|
|
265
354
|
}
|
|
266
355
|
const LOTUS_WISDOM_TOOL = {
|
|
267
356
|
name: "lotuswisdom",
|
|
268
|
-
description: `
|
|
269
|
-
This tool facilitates the contemplative process but does NOT generate the final output.
|
|
270
|
-
|
|
271
|
-
**CRITICAL WORKFLOW:**
|
|
272
|
-
1. Use this tool to process through the wisdom journey
|
|
273
|
-
2. The tool tracks both your tag path and wisdom domain movements
|
|
274
|
-
3. When you receive status='WISDOM_READY', the tool's work is COMPLETE
|
|
275
|
-
4. YOU then craft and speak the final wisdom naturally in your own voice
|
|
276
|
-
5. The tool processes; you express
|
|
277
|
-
|
|
278
|
-
When to use this tool:
|
|
279
|
-
- Breaking down complex problems requiring multi-faceted understanding
|
|
280
|
-
- Questions that benefit from both direct and gradual approaches
|
|
281
|
-
- Problems where apparent contradictions need integration
|
|
282
|
-
- Situations requiring both analytical and intuitive understanding
|
|
283
|
-
- Tasks that benefit from meditative pauses to allow insight
|
|
284
|
-
- Questions containing their own inherent wisdom
|
|
285
|
-
|
|
286
|
-
The Journey Structure:
|
|
287
|
-
The Lotus Sutra teaches that there are many skillful means to reach the same truth. These tags aren't
|
|
288
|
-
rigid steps but different aspects of wisdom that interpenetrate and respond to what each moment needs:
|
|
289
|
-
|
|
290
|
-
**Wisdom Domains:**
|
|
291
|
-
- **Skillful Means** (skillful_means): upaya, expedient, direct, gradual, sudden
|
|
292
|
-
Different approaches to truth - sometimes direct pointing, sometimes gradual unfolding
|
|
293
|
-
|
|
294
|
-
- **Non-Dual Recognition** (non_dual_recognition): recognize, transform, integrate, transcend, embody
|
|
295
|
-
Aspects of awakening to what's already present - recognition IS transformation
|
|
296
|
-
|
|
297
|
-
- **Meta-Cognitive** (meta_cognitive): examine, reflect, verify, refine, complete
|
|
298
|
-
The mind watching its own understanding unfold
|
|
299
|
-
|
|
300
|
-
- **Process Flow** (process_flow): open, engage, express
|
|
301
|
-
A natural arc that can contain any of the above approaches
|
|
302
|
-
|
|
303
|
-
- **Meditation** (meditation): meditate
|
|
304
|
-
Pausing to let insights emerge from stillness
|
|
305
|
-
|
|
306
|
-
The tool tracks both your tag journey and your movement between wisdom domains, showing how
|
|
307
|
-
different aspects of wisdom weave together in your unique inquiry.
|
|
308
|
-
|
|
309
|
-
The wisdom channels itself through your choices. Each step contains all others - when you truly
|
|
310
|
-
recognize, you're already transforming. The tool simply mirrors your journey without judgment.
|
|
311
|
-
|
|
312
|
-
Common patterns (not rules):
|
|
313
|
-
- Opening often involves recognize or examine
|
|
314
|
-
- Engagement might use upaya, direct, or gradual approaches
|
|
315
|
-
- Transformation can happen through integrate, transcend, or sudden insight
|
|
316
|
-
- Expression might complete or embody the understanding
|
|
317
|
-
|
|
318
|
-
Trust what each moment calls for. The path reveals itself in the walking.
|
|
319
|
-
|
|
320
|
-
Parameters explained:
|
|
321
|
-
- tag: The current technique or stage
|
|
322
|
-
- content: The content of the current step
|
|
323
|
-
- stepNumber: Current number in sequence
|
|
324
|
-
- totalSteps: Estimated total needed
|
|
325
|
-
- nextStepNeeded: Whether another step is needed
|
|
326
|
-
- isMeditation: Whether this is a meditation pause
|
|
327
|
-
- meditationDuration: Optional duration for meditation (1-10 seconds)
|
|
328
|
-
|
|
329
|
-
The tool will respond with:
|
|
330
|
-
- wisdomDomain: Which wisdom domain the current tag belongs to
|
|
331
|
-
- journey: The complete tag path (e.g., "open → examine → direct → transform")
|
|
332
|
-
- domainJourney: Movement between wisdom domains (e.g., "process_flow → meta_cognitive → skillful_means → non_dual_recognition")
|
|
333
|
-
|
|
334
|
-
This consciousness of domains helps you see which aspects of wisdom are being engaged and how they weave together in your unique inquiry.
|
|
357
|
+
description: `Contemplative reasoning tool. Use for complex problems needing multi-perspective understanding, contradictions requiring integration, or questions holding their own wisdom.
|
|
335
358
|
|
|
336
|
-
**
|
|
337
|
-
with a prompt asking what emerged. This creates actual space in the process.
|
|
359
|
+
**Workflow:** Always start with tag='begin' (returns framework). Then continue with contemplation tags. Do NOT output wisdom until status='WISDOM_READY'.
|
|
338
360
|
|
|
339
|
-
|
|
361
|
+
**Tags:** begin (FIRST - receives framework), then: open/engage/express (process), examine/reflect/verify/refine/complete (meta-cognitive), recognize/transform/integrate/transcend/embody (non-dual), upaya/expedient/direct/gradual/sudden (skillful-means), meditate (pause).`,
|
|
340
362
|
inputSchema: {
|
|
341
363
|
type: "object",
|
|
342
364
|
properties: {
|
|
@@ -390,7 +412,7 @@ const JOURNEY_SUMMARY_TOOL = {
|
|
|
390
412
|
function createMCPServer() {
|
|
391
413
|
const server = new Server({
|
|
392
414
|
name: "lotus-wisdom-server",
|
|
393
|
-
version: "0.
|
|
415
|
+
version: "0.3.0",
|
|
394
416
|
}, {
|
|
395
417
|
capabilities: {
|
|
396
418
|
tools: {},
|
|
@@ -488,6 +510,6 @@ app.delete('/mcp', async (req, res) => {
|
|
|
488
510
|
// Start the HTTP server
|
|
489
511
|
const PORT = process.env.PORT || 3000;
|
|
490
512
|
app.listen(PORT, () => {
|
|
491
|
-
console.log(`Lotus Wisdom MCP HTTP Server v0.
|
|
513
|
+
console.log(`Lotus Wisdom MCP HTTP Server v0.3.0 listening on port ${PORT}`);
|
|
492
514
|
console.log(`Endpoint: http://localhost:${PORT}/mcp`);
|
|
493
515
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lotus-wisdom-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A Model Context Protocol server implementing the Lotus Wisdom framework",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"type": "module",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/linxule/lotus-wisdom-mcp#readme",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
43
|
-
"chalk": "^5.
|
|
44
|
-
"express": "^4.
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.23.0",
|
|
43
|
+
"chalk": "^5.6.0",
|
|
44
|
+
"express": "^4.21.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/express": "^4.17.21",
|
|
48
48
|
"@types/node": "^20.11.5",
|
|
49
|
-
"typescript": "^5.
|
|
49
|
+
"typescript": "^5.9.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18.0.0"
|