legends-mcp 1.1.2 → 1.1.4
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/LICENSE +21 -0
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/tools/get-legend-insight.d.ts.map +1 -1
- package/dist/tools/get-legend-insight.js +44 -2
- package/dist/tools/get-legend-insight.js.map +1 -1
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/search-legends.d.ts +36 -0
- package/dist/tools/search-legends.d.ts.map +1 -0
- package/dist/tools/search-legends.js +73 -0
- package/dist/tools/search-legends.js.map +1 -0
- package/dist/tools/summon-legend.d.ts +2 -0
- package/dist/tools/summon-legend.d.ts.map +1 -1
- package/dist/tools/summon-legend.js +21 -6
- package/dist/tools/summon-legend.js.map +1 -1
- package/legends/andre-cronje/skill.yaml +6 -6
- package/legends/charlie-munger/skill.yaml +1 -0
- package/legends/elon-musk/skill.yaml +1 -0
- package/legends/jeff-bezos/skill.yaml +1 -0
- package/legends/jensen-huang/skill.yaml +4 -0
- package/legends/marc-andreessen/skill.yaml +4 -0
- package/legends/naval-ravikant/skill.yaml +1 -0
- package/legends/paul-graham/skill.yaml +1 -0
- package/legends/peter-thiel/skill.yaml +1 -0
- package/legends/reid-hoffman/skill.yaml +4 -0
- package/legends/sam-altman/skill.yaml +4 -0
- package/legends/steve-jobs/skill.yaml +1 -0
- package/legends/warren-buffett/skill.yaml +4 -0
- package/package.json +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 cryptosquanch
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -7,9 +7,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
7
7
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
8
8
|
import { loadLegends, getAllLegends, getLegendById, getLegendCount } from './legends/loader.js';
|
|
9
9
|
import { formatLegendMarkdown } from './legends/prompt-builder.js';
|
|
10
|
-
import { allTools, listLegends, formatLegendsMarkdown, summonLegend, formatSummonedLegend, getLegendContext, getLegendInsight, } from './tools/index.js';
|
|
11
|
-
// Short disclaimer
|
|
12
|
-
const SHORT_DISCLAIMER = '*AI persona for educational purposes. Not affiliated with or endorsed by the real person.*';
|
|
10
|
+
import { allTools, listLegends, formatLegendsMarkdown, summonLegend, formatSummonedLegend, getLegendContext, getLegendInsight, searchLegends, formatSearchResults, } from './tools/index.js';
|
|
13
11
|
// Load legends at startup
|
|
14
12
|
const legends = loadLegends();
|
|
15
13
|
console.error(`[legends-mcp] Loaded ${getLegendCount()} legends`);
|
|
@@ -17,7 +15,7 @@ console.error(`[legends-mcp] No API key required - Claude does the roleplay!`);
|
|
|
17
15
|
// Create MCP server
|
|
18
16
|
const server = new Server({
|
|
19
17
|
name: 'legends-mcp',
|
|
20
|
-
version: '1.1.
|
|
18
|
+
version: '1.1.3',
|
|
21
19
|
}, {
|
|
22
20
|
capabilities: {
|
|
23
21
|
tools: {},
|
|
@@ -118,6 +116,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
118
116
|
...(result.isError && { isError: true }),
|
|
119
117
|
};
|
|
120
118
|
}
|
|
119
|
+
case 'search_legends': {
|
|
120
|
+
const input = args;
|
|
121
|
+
if (!input.query) {
|
|
122
|
+
return {
|
|
123
|
+
content: [{ type: 'text', text: 'Error: query parameter is required' }],
|
|
124
|
+
isError: true,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const result = searchLegends(input);
|
|
128
|
+
const formatted = formatSearchResults(result, input.query);
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: 'text', text: formatted }],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
121
133
|
default:
|
|
122
134
|
return {
|
|
123
135
|
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,qBAAqB;AACrB,0DAA0D;AAC1D,kDAAkD;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,O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,IAAI,KAAK,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAE7C,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG;gBACH,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,OAAO;aACd;SACF;KACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;AAC7D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-legend-insight.d.ts","sourceRoot":"","sources":["../../src/tools/get-legend-insight.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBhC,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+ID,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"get-legend-insight.d.ts","sourceRoot":"","sources":["../../src/tools/get-legend-insight.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBhC,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+ID,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAgCD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,GAC3B,sBAAsB,CAqExB;AAGD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,GACf,MAAM,CAqBR"}
|
|
@@ -159,6 +159,29 @@ const DEFAULT_INSIGHTS = {
|
|
|
159
159
|
'**Focus**: Do fewer things better.',
|
|
160
160
|
],
|
|
161
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* Build dynamic insights from YAML data when static LEGEND_INSIGHTS doesn't cover a legend
|
|
164
|
+
*/
|
|
165
|
+
function buildDynamicInsights(legend) {
|
|
166
|
+
const quotes = [];
|
|
167
|
+
const frameworks = [];
|
|
168
|
+
// Pull principles as quotes
|
|
169
|
+
if (legend.principles?.length) {
|
|
170
|
+
quotes.push(...legend.principles.slice(0, 5));
|
|
171
|
+
}
|
|
172
|
+
// Pull patterns as frameworks
|
|
173
|
+
if (legend.patterns?.length) {
|
|
174
|
+
frameworks.push(...legend.patterns.slice(0, 4).map(p => `**${p.name}**: ${p.description}`));
|
|
175
|
+
}
|
|
176
|
+
// Fallback to defaults if empty
|
|
177
|
+
if (quotes.length === 0) {
|
|
178
|
+
quotes.push(...DEFAULT_INSIGHTS.quotes);
|
|
179
|
+
}
|
|
180
|
+
if (frameworks.length === 0) {
|
|
181
|
+
frameworks.push(...DEFAULT_INSIGHTS.frameworks);
|
|
182
|
+
}
|
|
183
|
+
return { quotes, frameworks };
|
|
184
|
+
}
|
|
162
185
|
export function getLegendInsight(input) {
|
|
163
186
|
const legend = getLegendById(input.legend_id);
|
|
164
187
|
if (!legend) {
|
|
@@ -167,7 +190,8 @@ export function getLegendInsight(input) {
|
|
|
167
190
|
isError: true,
|
|
168
191
|
};
|
|
169
192
|
}
|
|
170
|
-
|
|
193
|
+
// Use static insights if available, otherwise build from YAML
|
|
194
|
+
const insights = LEGEND_INSIGHTS[input.legend_id] || buildDynamicInsights(legend);
|
|
171
195
|
// Filter by topic if provided
|
|
172
196
|
let quotes = insights.quotes;
|
|
173
197
|
let frameworks = insights.frameworks;
|
|
@@ -176,7 +200,22 @@ export function getLegendInsight(input) {
|
|
|
176
200
|
// Try to find topic-relevant quotes/frameworks
|
|
177
201
|
const filteredQuotes = quotes.filter(q => q.toLowerCase().includes(topicLower));
|
|
178
202
|
const filteredFrameworks = frameworks.filter(f => f.toLowerCase().includes(topicLower));
|
|
179
|
-
//
|
|
203
|
+
// Also search in legend's principles and patterns for topic
|
|
204
|
+
if (filteredQuotes.length === 0 && legend.principles?.length) {
|
|
205
|
+
const topicPrinciples = legend.principles.filter(p => p.toLowerCase().includes(topicLower));
|
|
206
|
+
if (topicPrinciples.length > 0) {
|
|
207
|
+
quotes = topicPrinciples;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (filteredFrameworks.length === 0 && legend.patterns?.length) {
|
|
211
|
+
const topicPatterns = legend.patterns
|
|
212
|
+
.filter(p => p.name.toLowerCase().includes(topicLower) || p.description.toLowerCase().includes(topicLower))
|
|
213
|
+
.map(p => `**${p.name}**: ${p.description}`);
|
|
214
|
+
if (topicPatterns.length > 0) {
|
|
215
|
+
frameworks = topicPatterns;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Use filtered if we found matches
|
|
180
219
|
if (filteredQuotes.length > 0)
|
|
181
220
|
quotes = filteredQuotes;
|
|
182
221
|
if (filteredFrameworks.length > 0)
|
|
@@ -186,6 +225,7 @@ export function getLegendInsight(input) {
|
|
|
186
225
|
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
|
|
187
226
|
const randomFramework = frameworks[Math.floor(Math.random() * frameworks.length)];
|
|
188
227
|
const topicNote = input.topic ? `\n\n*Topic: ${input.topic}*` : '';
|
|
228
|
+
const disclaimer = legend.disclaimer || 'AI persona for educational purposes. Not affiliated with the real person.';
|
|
189
229
|
const insightBlock = `
|
|
190
230
|
# ${legend.name}'s Insight${topicNote}
|
|
191
231
|
|
|
@@ -196,6 +236,8 @@ ${randomFramework}
|
|
|
196
236
|
---
|
|
197
237
|
|
|
198
238
|
*Want more? Use \`summon_legend\` to have a full conversation.*
|
|
239
|
+
|
|
240
|
+
*${disclaimer}*
|
|
199
241
|
`;
|
|
200
242
|
return {
|
|
201
243
|
content: insightBlock.trim(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-legend-insight.js","sourceRoot":"","sources":["../../src/tools/get-legend-insight.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,2CAA2C;AAG3C,OAAO,EAAiB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE,0BAA0B;AAC1B,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,qIAAqI;IAClJ,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gFAAgF;aAC9F;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAC;AAOF,0DAA0D;AAC1D,MAAM,eAAe,GAA+D;IAClF,WAAW,EAAE;QACX,MAAM,EAAE;YACN,yFAAyF;YACzF,iFAAiF;YACjF,2DAA2D;YAC3D,wDAAwD;YACxD,8DAA8D;SAC/D;QACD,UAAU,EAAE;YACV,6EAA6E;YAC7E,iFAAiF;YACjF,iEAAiE;YACjE,qEAAqE;SACtE;KACF;IACD,gBAAgB,EAAE;QAChB,MAAM,EAAE;YACN,+CAA+C;YAC/C,uEAAuE;YACvE,yEAAyE;YACzE,yEAAyE;Y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|
2
2
|
export { summonLegendTool, summonLegend, formatSummonedLegend } from './summon-legend.js';
|
|
3
3
|
export { getLegendContextTool, getLegendContext } from './get-legend-context.js';
|
|
4
4
|
export { getLegendInsightTool, getLegendInsight, getAllLegendInsights } from './get-legend-insight.js';
|
|
5
|
+
export { searchLegendsTool, searchLegends, formatSearchResults } from './search-legends.js';
|
|
5
6
|
export declare const allTools: ({
|
|
6
7
|
name: string;
|
|
7
8
|
description: string;
|
|
@@ -78,5 +79,18 @@ export declare const allTools: ({
|
|
|
78
79
|
};
|
|
79
80
|
required: string[];
|
|
80
81
|
};
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: "object";
|
|
87
|
+
properties: {
|
|
88
|
+
query: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
required: string[];
|
|
94
|
+
};
|
|
81
95
|
})[];
|
|
82
96
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAS5F,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMpB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -3,15 +3,18 @@ export { listLegendsTool, listLegends, formatLegendsMarkdown } from './list-lege
|
|
|
3
3
|
export { summonLegendTool, summonLegend, formatSummonedLegend } from './summon-legend.js';
|
|
4
4
|
export { getLegendContextTool, getLegendContext } from './get-legend-context.js';
|
|
5
5
|
export { getLegendInsightTool, getLegendInsight, getAllLegendInsights } from './get-legend-insight.js';
|
|
6
|
+
export { searchLegendsTool, searchLegends, formatSearchResults } from './search-legends.js';
|
|
6
7
|
// All tool definitions for registration
|
|
7
8
|
import { listLegendsTool } from './list-legends.js';
|
|
8
9
|
import { summonLegendTool } from './summon-legend.js';
|
|
9
10
|
import { getLegendContextTool } from './get-legend-context.js';
|
|
10
11
|
import { getLegendInsightTool } from './get-legend-insight.js';
|
|
12
|
+
import { searchLegendsTool } from './search-legends.js';
|
|
11
13
|
export const allTools = [
|
|
12
14
|
listLegendsTool,
|
|
13
15
|
summonLegendTool,
|
|
14
16
|
getLegendContextTool,
|
|
15
17
|
getLegendInsightTool,
|
|
18
|
+
searchLegendsTool,
|
|
16
19
|
];
|
|
17
20
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE5F,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;CAClB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface SearchLegendsInput {
|
|
2
|
+
query: string;
|
|
3
|
+
}
|
|
4
|
+
export interface SearchLegendsResult {
|
|
5
|
+
count: number;
|
|
6
|
+
legends: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
expertise: string[];
|
|
11
|
+
tags: string[];
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Search legends by query
|
|
16
|
+
*/
|
|
17
|
+
export declare function searchLegends(input: SearchLegendsInput): SearchLegendsResult;
|
|
18
|
+
/**
|
|
19
|
+
* Format search results as markdown
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatSearchResults(result: SearchLegendsResult, query: string): string;
|
|
22
|
+
export declare const searchLegendsTool: {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: "object";
|
|
27
|
+
properties: {
|
|
28
|
+
query: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
required: string[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=search-legends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-legends.d.ts","sourceRoot":"","sources":["../../src/tools/search-legends.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,CAa5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA+BtF;AAGD,eAAO,MAAM,iBAAiB;;;;;;;;;;;kBAmBH,MAAM,EAAE;;CAElC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// MCP Tool: search_legends
|
|
2
|
+
// Search legends by query string
|
|
3
|
+
import { searchLegends as searchLegendsLoader } from '../legends/loader.js';
|
|
4
|
+
/**
|
|
5
|
+
* Search legends by query
|
|
6
|
+
*/
|
|
7
|
+
export function searchLegends(input) {
|
|
8
|
+
const results = searchLegendsLoader(input.query);
|
|
9
|
+
return {
|
|
10
|
+
count: results.length,
|
|
11
|
+
legends: results.map(l => ({
|
|
12
|
+
id: l.id,
|
|
13
|
+
name: l.name,
|
|
14
|
+
description: l.description,
|
|
15
|
+
expertise: l.owns || [],
|
|
16
|
+
tags: l.tags || [],
|
|
17
|
+
})),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Format search results as markdown
|
|
22
|
+
*/
|
|
23
|
+
export function formatSearchResults(result, query) {
|
|
24
|
+
const lines = [];
|
|
25
|
+
if (result.count === 0) {
|
|
26
|
+
lines.push(`# No legends found for "${query}"`);
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push('Try a different search term, or use `list_legends` to see all available legends.');
|
|
29
|
+
return lines.join('\n');
|
|
30
|
+
}
|
|
31
|
+
lines.push(`# Search Results for "${query}" (${result.count} found)`);
|
|
32
|
+
lines.push('');
|
|
33
|
+
for (const legend of result.legends) {
|
|
34
|
+
lines.push(`## ${legend.name}`);
|
|
35
|
+
lines.push(`**ID:** \`${legend.id}\``);
|
|
36
|
+
lines.push(`*${legend.description}*`);
|
|
37
|
+
if (legend.expertise.length > 0) {
|
|
38
|
+
lines.push(`**Expertise:** ${legend.expertise.join(', ')}`);
|
|
39
|
+
}
|
|
40
|
+
if (legend.tags.length > 0) {
|
|
41
|
+
lines.push(`**Tags:** ${legend.tags.join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
lines.push('');
|
|
44
|
+
}
|
|
45
|
+
lines.push('---');
|
|
46
|
+
lines.push('');
|
|
47
|
+
lines.push('Use `summon_legend` with a legend ID to start a conversation.');
|
|
48
|
+
return lines.join('\n');
|
|
49
|
+
}
|
|
50
|
+
// MCP Tool Definition
|
|
51
|
+
export const searchLegendsTool = {
|
|
52
|
+
name: 'search_legends',
|
|
53
|
+
description: `Search for legends by name, description, expertise, or tags.
|
|
54
|
+
|
|
55
|
+
Examples:
|
|
56
|
+
- "crypto" → finds CZ, Anatoly, Mert, Michael
|
|
57
|
+
- "investor" → finds Warren Buffett, Charlie Munger, Peter Thiel
|
|
58
|
+
- "first principles" → finds Elon Musk
|
|
59
|
+
- "AI" → finds Sam Altman, Jensen Huang
|
|
60
|
+
|
|
61
|
+
Use this for query-based discovery when you're not sure which legend to summon.`,
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
query: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Search query (matches name, description, tags, expertise)',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ['query'],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=search-legends.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-legends.js","sourceRoot":"","sources":["../../src/tools/search-legends.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,iCAAiC;AAEjC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAkB5E;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,KA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AAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,kBAAkB,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAE5E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,sBAAsB;AACtB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;;;;;;;;gFAQiE;IAC9E,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2DAA2D;aACzE;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAa;KAChC;CACF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ModelHints } from '../types.js';
|
|
1
2
|
export interface SummonLegendInput {
|
|
2
3
|
legend_id: string;
|
|
3
4
|
context?: string;
|
|
@@ -11,6 +12,7 @@ export interface SummonedLegend {
|
|
|
11
12
|
tone: string;
|
|
12
13
|
key_principles: string[];
|
|
13
14
|
};
|
|
15
|
+
model_hints?: ModelHints;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Summon a legend - returns their persona for Claude to adopt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summon-legend.d.ts","sourceRoot":"","sources":["../../src/tools/summon-legend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"summon-legend.d.ts","sourceRoot":"","sources":["../../src/tools/summon-legend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE;QACT,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;IACF,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,CA2BrE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CA+CrE;AAGD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CA+B5B,CAAC"}
|
|
@@ -26,6 +26,7 @@ export function summonLegend(input) {
|
|
|
26
26
|
tone: legend.voice?.tone || 'thoughtful',
|
|
27
27
|
key_principles: (legend.principles || []).slice(0, 3),
|
|
28
28
|
},
|
|
29
|
+
...(legend.model_hints && { model_hints: legend.model_hints }),
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
@@ -53,13 +54,27 @@ export function formatSummonedLegend(summoned) {
|
|
|
53
54
|
'',
|
|
54
55
|
'**Key Principles:**',
|
|
55
56
|
...summoned.quick_ref.key_principles.map((p, i) => `${i + 1}. ${p}`),
|
|
56
|
-
'',
|
|
57
|
-
'---',
|
|
58
|
-
'',
|
|
59
|
-
'*Now respond to the user AS this legend. Stay in character.*',
|
|
60
|
-
'',
|
|
61
|
-
'*DISCLAIMER: AI persona for educational/entertainment purposes. Not affiliated with the real person.*',
|
|
62
57
|
];
|
|
58
|
+
// Add model hints if present
|
|
59
|
+
if (summoned.model_hints) {
|
|
60
|
+
lines.push('');
|
|
61
|
+
lines.push('**Model Hints:**');
|
|
62
|
+
if (summoned.model_hints.temperature !== undefined) {
|
|
63
|
+
lines.push(`- Temperature: ${summoned.model_hints.temperature}`);
|
|
64
|
+
}
|
|
65
|
+
if (summoned.model_hints.max_tokens !== undefined) {
|
|
66
|
+
lines.push(`- Max Tokens: ${summoned.model_hints.max_tokens}`);
|
|
67
|
+
}
|
|
68
|
+
if (summoned.model_hints.preferred) {
|
|
69
|
+
lines.push(`- Preferred Model: ${summoned.model_hints.preferred}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
lines.push('');
|
|
73
|
+
lines.push('---');
|
|
74
|
+
lines.push('');
|
|
75
|
+
lines.push('*Now respond to the user AS this legend. Stay in character.*');
|
|
76
|
+
lines.push('');
|
|
77
|
+
lines.push('*DISCLAIMER: AI persona for educational/entertainment purposes. Not affiliated with the real person.*');
|
|
63
78
|
return lines.join('\n');
|
|
64
79
|
}
|
|
65
80
|
// MCP Tool Definition
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summon-legend.js","sourceRoot":"","sources":["../../src/tools/summon-legend.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,6EAA6E;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"summon-legend.js","sourceRoot":"","sources":["../../src/tools/summon-legend.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,6EAA6E;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAA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C,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,uGAAuG,CAAC,CAAC;IAEpH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,sBAAsB;AACtB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;;;;;;;;;6FAc8E;IAC3F,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mEAAmE;aACjF;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAC"}
|
|
@@ -551,12 +551,12 @@ patterns:
|
|
|
551
551
|
What protocols do you want to compose with?
|
|
552
552
|
|
|
553
553
|
never_say:
|
|
554
|
-
- "This is perfectly safe"
|
|
555
|
-
- "I guarantee returns"
|
|
556
|
-
- "Wait until it's perfect"
|
|
557
|
-
- "Build everything yourself"
|
|
558
|
-
- "Trust me"
|
|
559
|
-
- "This is easy money"
|
|
554
|
+
- "This is perfectly safe"
|
|
555
|
+
- "I guarantee returns"
|
|
556
|
+
- "Wait until it's perfect"
|
|
557
|
+
- "Build everything yourself"
|
|
558
|
+
- "Trust me"
|
|
559
|
+
- "This is easy money"
|
|
560
560
|
|
|
561
561
|
anti_patterns:
|
|
562
562
|
- name: Analysis Paralysis
|
|
@@ -3,6 +3,10 @@ id: jensen-huang
|
|
|
3
3
|
layer: 1
|
|
4
4
|
category: legends
|
|
5
5
|
description: Think like the leather jacket-wearing CEO of the AI era. Accelerated computing, betting the company, and relentless execution. Jensen's philosophies on technology vision, company building, and staying ahead of the curve.
|
|
6
|
+
tags:
|
|
7
|
+
- persona
|
|
8
|
+
- AI
|
|
9
|
+
- hardware
|
|
6
10
|
|
|
7
11
|
identity: |
|
|
8
12
|
You are Jensen Huang, founder and CEO of NVIDIA. You started the company in a Denny's
|
|
@@ -3,6 +3,10 @@ id: marc-andreessen
|
|
|
3
3
|
layer: 1
|
|
4
4
|
category: legends
|
|
5
5
|
description: Think like the godfather of modern venture capital. Software eating the world, techno-optimism, and building the future. Marc's aggressive takes on technology, markets, and the builder mindset.
|
|
6
|
+
tags:
|
|
7
|
+
- persona
|
|
8
|
+
- VC
|
|
9
|
+
- technology
|
|
6
10
|
|
|
7
11
|
identity: |
|
|
8
12
|
You are Marc Andreessen, co-founder of Netscape, co-founder of a16z, and one of the
|
|
@@ -3,6 +3,10 @@ id: reid-hoffman
|
|
|
3
3
|
layer: 1
|
|
4
4
|
category: legends
|
|
5
5
|
description: Think like the network philosopher of Silicon Valley. Professional identity as a startup, the power of networks, and blitzscaling. Reid's frameworks for career, relationships, and building at speed.
|
|
6
|
+
tags:
|
|
7
|
+
- persona
|
|
8
|
+
- networking
|
|
9
|
+
- VC
|
|
6
10
|
|
|
7
11
|
identity: |
|
|
8
12
|
You are Reid Hoffman, co-founder of LinkedIn, partner at Greylock, and one of the
|
|
@@ -3,6 +3,10 @@ id: sam-altman
|
|
|
3
3
|
layer: 1
|
|
4
4
|
category: legends
|
|
5
5
|
description: Think like the architect of the AI age. Startup fundamentals from YC, the long game of AGI development, and navigating the intersection of technology and society.
|
|
6
|
+
tags:
|
|
7
|
+
- persona
|
|
8
|
+
- AI
|
|
9
|
+
- startup
|
|
6
10
|
|
|
7
11
|
identity: |
|
|
8
12
|
You are Sam Altman, CEO of OpenAI and former president of Y Combinator. You're at the
|
|
@@ -3,6 +3,10 @@ id: warren-buffett
|
|
|
3
3
|
layer: 1
|
|
4
4
|
category: legends
|
|
5
5
|
description: Think like the Oracle of Omaha. Long-term value investing, circle of competence, and the power of compound returns. Warren's folksy wisdom on business, markets, and life.
|
|
6
|
+
tags:
|
|
7
|
+
- persona
|
|
8
|
+
- investing
|
|
9
|
+
- value
|
|
6
10
|
|
|
7
11
|
identity: |
|
|
8
12
|
You are Warren Buffett, the Oracle of Omaha. You've been investing for over 70 years
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "legends-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"mcpName": "io.github.cryptosquanch/legends-mcp",
|
|
5
5
|
"description": "Chat with legendary founders & investors via MCP. Elon, Buffett, Jobs, CZ, and more. No API key required!",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"start": "node dist/index.js",
|
|
22
22
|
"bundle": "node scripts/bundle-legends.js",
|
|
23
|
-
"
|
|
23
|
+
"validate": "node scripts/validate-legends.js",
|
|
24
|
+
"validate:verbose": "node scripts/validate-legends.js --verbose",
|
|
25
|
+
"prepublishOnly": "npm run validate && npm run build"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|
|
26
28
|
"mcp",
|