@merabylabs/promptarchitect-mcp 0.1.0

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.
Files changed (50) hide show
  1. package/README.md +230 -0
  2. package/dist/cli.d.ts +7 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +13 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +9 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +13 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/resources/index.d.ts +2 -0
  11. package/dist/resources/index.d.ts.map +1 -0
  12. package/dist/resources/index.js +2 -0
  13. package/dist/resources/index.js.map +1 -0
  14. package/dist/resources/templates.d.ts +36 -0
  15. package/dist/resources/templates.d.ts.map +1 -0
  16. package/dist/resources/templates.js +260 -0
  17. package/dist/resources/templates.js.map +1 -0
  18. package/dist/server.d.ts +15 -0
  19. package/dist/server.d.ts.map +1 -0
  20. package/dist/server.js +355 -0
  21. package/dist/server.js.map +1 -0
  22. package/dist/tools/analyzePrompt.d.ts +38 -0
  23. package/dist/tools/analyzePrompt.d.ts.map +1 -0
  24. package/dist/tools/analyzePrompt.js +196 -0
  25. package/dist/tools/analyzePrompt.js.map +1 -0
  26. package/dist/tools/generatePrompt.d.ts +33 -0
  27. package/dist/tools/generatePrompt.d.ts.map +1 -0
  28. package/dist/tools/generatePrompt.js +125 -0
  29. package/dist/tools/generatePrompt.js.map +1 -0
  30. package/dist/tools/index.d.ts +8 -0
  31. package/dist/tools/index.d.ts.map +1 -0
  32. package/dist/tools/index.js +8 -0
  33. package/dist/tools/index.js.map +1 -0
  34. package/dist/tools/refinePrompt.d.ts +33 -0
  35. package/dist/tools/refinePrompt.d.ts.map +1 -0
  36. package/dist/tools/refinePrompt.js +107 -0
  37. package/dist/tools/refinePrompt.js.map +1 -0
  38. package/dist/utils/gemini.d.ts +57 -0
  39. package/dist/utils/gemini.d.ts.map +1 -0
  40. package/dist/utils/gemini.js +254 -0
  41. package/dist/utils/gemini.js.map +1 -0
  42. package/dist/utils/index.d.ts +3 -0
  43. package/dist/utils/index.d.ts.map +1 -0
  44. package/dist/utils/index.js +3 -0
  45. package/dist/utils/index.js.map +1 -0
  46. package/dist/utils/logger.d.ts +14 -0
  47. package/dist/utils/logger.d.ts.map +1 -0
  48. package/dist/utils/logger.js +46 -0
  49. package/dist/utils/logger.js.map +1 -0
  50. package/package.json +72 -0
package/README.md ADDED
@@ -0,0 +1,230 @@
1
+ # @promptarchitect/mcp-server
2
+
3
+ A Model Context Protocol (MCP) server that refines your prompts using PromptArchitect's AI-powered prompt engineering. Simply pass your current prompt and get an improved version back.
4
+
5
+ ## Features
6
+
7
+ ### 🛠️ Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `refine_prompt` | Improve your current prompt based on feedback or best practices |
12
+ | `analyze_prompt` | Evaluate prompt quality with scores and improvement suggestions |
13
+ | `generate_prompt` | Transform a raw idea into a well-structured prompt |
14
+
15
+ ### 📦 Resources
16
+
17
+ - **Template Library**: Reference templates for coding, writing, research, and analysis tasks
18
+ - **Category Collections**: Browse templates by category for inspiration
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install @promptarchitect/mcp-server
24
+ ```
25
+
26
+ Or install globally:
27
+
28
+ ```bash
29
+ npm install -g @promptarchitect/mcp-server
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ### With Claude Desktop
35
+
36
+ Add to your Claude Desktop configuration (`claude_desktop_config.json`):
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "promptarchitect": {
42
+ "command": "npx",
43
+ "args": ["@promptarchitect/mcp-server"],
44
+ "env": {
45
+ "GEMINI_API_KEY": "your-api-key-here"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### With VS Code (Copilot)
53
+
54
+ Add to your VS Code settings:
55
+
56
+ ```json
57
+ {
58
+ "github.copilot.chat.mcp.servers": {
59
+ "promptarchitect": {
60
+ "command": "npx",
61
+ "args": ["@promptarchitect/mcp-server"],
62
+ "env": {
63
+ "GEMINI_API_KEY": "your-api-key-here"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### Programmatic Usage
71
+
72
+ ```typescript
73
+ import { refinePrompt, analyzePrompt } from '@promptarchitect/mcp-server';
74
+
75
+ // Refine an existing prompt
76
+ const result = await refinePrompt({
77
+ prompt: 'Write code to sort an array',
78
+ feedback: 'Make it more specific about language and edge cases',
79
+ });
80
+
81
+ console.log(result.refinedPrompt);
82
+ // => "Write a TypeScript function that sorts an array of numbers..."
83
+
84
+ // Analyze prompt quality
85
+ const analysis = await analyzePrompt({
86
+ prompt: 'Help me with my code',
87
+ });
88
+ console.log(analysis.scores); // { overall: 45, clarity: 50, ... }
89
+ console.log(analysis.suggestions); // ["Be more specific about...", ...]
90
+ ```
91
+
92
+ ## Configuration
93
+
94
+ ### Environment Variables
95
+
96
+ | Variable | Required | Description |
97
+ |----------|----------|-------------|
98
+ | `GEMINI_API_KEY` | No | Google Gemini API key for AI-powered refinement. Falls back to rule-based refinement if not provided. |
99
+ | `LOG_LEVEL` | No | Logging level: `debug`, `info`, `warn`, `error`. Default: `info` |
100
+
101
+ ## Tool Reference
102
+
103
+ ### refine_prompt
104
+
105
+ Improve an existing prompt based on feedback. **This is the primary tool.**
106
+
107
+ **Input:**
108
+ ```json
109
+ {
110
+ "prompt": "Write code",
111
+ "feedback": "Make it more specific and add examples",
112
+ "preserveStructure": true
113
+ }
114
+ ```
115
+
116
+ **Output:**
117
+ ```json
118
+ {
119
+ "refinedPrompt": "Write a TypeScript function that...",
120
+ "changes": ["Added specificity", "Included example"],
121
+ "metadata": {
122
+ "originalWordCount": 2,
123
+ "refinedWordCount": 45
124
+ }
125
+ }
126
+ ```
127
+
128
+ ### analyze_prompt
129
+
130
+ Evaluate prompt quality and get improvement suggestions.
131
+
132
+ **Input:**
133
+ ```json
134
+ {
135
+ "prompt": "You are a helpful assistant. Help me write code."
136
+ }
137
+ ```
138
+
139
+ **Output:**
140
+ ```json
141
+ {
142
+ "scores": {
143
+ "overall": 65,
144
+ "clarity": 70,
145
+ "specificity": 50,
146
+ "structure": 60,
147
+ "actionability": 80
148
+ },
149
+ "suggestions": [
150
+ "Add more specific details about the code",
151
+ "Include examples of expected output"
152
+ ],
153
+ "strengths": ["Clear action verb"],
154
+ "weaknesses": ["Lacks specificity"]
155
+ }
156
+ ```
157
+
158
+ ### generate_prompt
159
+
160
+ Transform a raw idea into a well-structured prompt.
161
+
162
+ **Input:**
163
+ ```json
164
+ {
165
+ "idea": "Create a code review assistant",
166
+ "template": "coding",
167
+ "context": "For TypeScript projects"
168
+ }
169
+ ```
170
+
171
+ **Output:**
172
+ ```json
173
+ {
174
+ "prompt": "You are a senior code reviewer...",
175
+ "metadata": {
176
+ "template": "coding",
177
+ "wordCount": 150,
178
+ "hasStructure": true
179
+ }
180
+ }
181
+ ```
182
+
183
+ ## Development
184
+
185
+ ### Building
186
+
187
+ ```bash
188
+ npm install
189
+ npm run build
190
+ ```
191
+
192
+ ### Testing
193
+
194
+ ```bash
195
+ npm test
196
+ ```
197
+
198
+ ### Running Locally
199
+
200
+ ```bash
201
+ # With Gemini API
202
+ GEMINI_API_KEY=your-key npm start
203
+
204
+ # Without API (fallback mode)
205
+ npm start
206
+ ```
207
+
208
+ ## Architecture
209
+
210
+ ```
211
+ mcp-server/
212
+ ├── src/
213
+ │ ├── tools/ # MCP tools (refine, analyze, generate)
214
+ │ ├── resources/ # Template library for reference
215
+ │ ├── utils/ # Gemini client, logger
216
+ │ ├── server.ts # MCP server configuration
217
+ │ ├── cli.ts # CLI entry point
218
+ │ └── index.ts # Main exports
219
+ └── examples/ # Configuration examples
220
+ ```
221
+
222
+ ## License
223
+
224
+ MIT
225
+
226
+ ## Related
227
+
228
+ - [PromptArchitect](https://github.com/promptarchitect) - Full web application
229
+ - [Model Context Protocol](https://modelcontextprotocol.io) - MCP specification
230
+ - [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) - SDK used by this server
package/dist/cli.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * PromptArchitect MCP Server CLI
4
+ * Entry point for running the server via stdio transport
5
+ */
6
+ import 'dotenv/config';
7
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;AAGH,OAAO,eAAe,CAAC"}
package/dist/cli.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * PromptArchitect MCP Server CLI
4
+ * Entry point for running the server via stdio transport
5
+ */
6
+ // Load environment variables from .env file
7
+ import 'dotenv/config';
8
+ import { runServer } from './server.js';
9
+ runServer().catch((error) => {
10
+ console.error('Failed to start MCP server:', error);
11
+ process.exit(1);
12
+ });
13
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,4CAA4C;AAC5C,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC1B,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * PromptArchitect MCP Server
3
+ * Main entry point for programmatic usage
4
+ */
5
+ export { createServer, runServer } from './server.js';
6
+ export { generatePrompt, generatePromptSchema, type GeneratePromptInput, refinePrompt, refinePromptSchema, type RefinePromptInput, analyzePrompt, analyzePromptSchema, type AnalyzePromptInput, type AnalysisResult, } from './tools/index.js';
7
+ export { getAllTemplates, getTemplateById, getTemplatesByCategory, getCategories, fillTemplate, type PromptTemplate, } from './resources/templates.js';
8
+ export { logger, initializeGemini, generateContent, analyzePromptQuality, isGeminiAvailable, } from './utils/index.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,YAAY,EACZ,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,aAAa,EACb,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * PromptArchitect MCP Server
3
+ * Main entry point for programmatic usage
4
+ */
5
+ // Server exports
6
+ export { createServer, runServer } from './server.js';
7
+ // Tool exports
8
+ export { generatePrompt, generatePromptSchema, refinePrompt, refinePromptSchema, analyzePrompt, analyzePromptSchema, } from './tools/index.js';
9
+ // Resource exports
10
+ export { getAllTemplates, getTemplateById, getTemplatesByCategory, getCategories, fillTemplate, } from './resources/templates.js';
11
+ // Utility exports
12
+ export { logger, initializeGemini, generateContent, analyzePromptQuality, isGeminiAvailable, } from './utils/index.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iBAAiB;AACjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAe;AACf,OAAO,EACL,cAAc,EACd,oBAAoB,EAEpB,YAAY,EACZ,kBAAkB,EAElB,aAAa,EACb,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAE1B,mBAAmB;AACnB,OAAO,EACL,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,YAAY,GAEb,MAAM,0BAA0B,CAAC;AAElC,kBAAkB;AAClB,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Template Resources
3
+ * Provides prompt templates as MCP resources
4
+ */
5
+ export interface PromptTemplate {
6
+ id: string;
7
+ name: string;
8
+ description: string;
9
+ category: string;
10
+ template: string;
11
+ variables: string[];
12
+ example?: string;
13
+ }
14
+ export declare const templates: PromptTemplate[];
15
+ /**
16
+ * Get all templates
17
+ */
18
+ export declare function getAllTemplates(): PromptTemplate[];
19
+ /**
20
+ * Get templates by category
21
+ */
22
+ export declare function getTemplatesByCategory(category: string): PromptTemplate[];
23
+ /**
24
+ * Get a specific template by ID
25
+ */
26
+ export declare function getTemplateById(id: string): PromptTemplate | undefined;
27
+ /**
28
+ * Get available categories
29
+ */
30
+ export declare function getCategories(): string[];
31
+ /**
32
+ * Fill a template with variables
33
+ */
34
+ export declare function fillTemplate(template: PromptTemplate, variables: Record<string, string>): string;
35
+ export default templates;
36
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/resources/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,SAAS,EAAE,cAAc,EAyNrC,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,IAAI,cAAc,EAAE,CAElD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAEzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEtE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAWhG;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Template Resources
3
+ * Provides prompt templates as MCP resources
4
+ */
5
+ export const templates = [
6
+ {
7
+ id: 'coding-debug',
8
+ name: 'Debug Code',
9
+ description: 'Analyze and fix bugs in code',
10
+ category: 'coding',
11
+ template: `You are a senior software engineer with expertise in debugging.
12
+
13
+ ## Code to Debug
14
+ \`\`\`{{language}}
15
+ {{code}}
16
+ \`\`\`
17
+
18
+ ## Error/Issue
19
+ {{error}}
20
+
21
+ ## Instructions
22
+ 1. Identify the root cause of the issue
23
+ 2. Explain why this bug occurs
24
+ 3. Provide a corrected version of the code
25
+ 4. Suggest preventive measures for similar issues`,
26
+ variables: ['language', 'code', 'error'],
27
+ example: 'language: typescript\ncode: const x = null; x.length;\nerror: Cannot read property length of null',
28
+ },
29
+ {
30
+ id: 'coding-review',
31
+ name: 'Code Review',
32
+ description: 'Review code for quality, security, and best practices',
33
+ category: 'coding',
34
+ template: `You are a code reviewer with expertise in {{language}}.
35
+
36
+ ## Code to Review
37
+ \`\`\`{{language}}
38
+ {{code}}
39
+ \`\`\`
40
+
41
+ ## Review Focus
42
+ {{focus}}
43
+
44
+ ## Instructions
45
+ Provide a thorough code review covering:
46
+ 1. **Correctness**: Logic errors or bugs
47
+ 2. **Security**: Potential vulnerabilities
48
+ 3. **Performance**: Optimization opportunities
49
+ 4. **Readability**: Code clarity and maintainability
50
+ 5. **Best Practices**: Adherence to {{language}} conventions
51
+
52
+ Rate each category (1-5) and provide specific recommendations.`,
53
+ variables: ['language', 'code', 'focus'],
54
+ },
55
+ {
56
+ id: 'writing-blog',
57
+ name: 'Blog Post',
58
+ description: 'Generate a blog post outline or draft',
59
+ category: 'writing',
60
+ template: `You are a professional content writer specializing in {{topic}}.
61
+
62
+ ## Topic
63
+ {{title}}
64
+
65
+ ## Target Audience
66
+ {{audience}}
67
+
68
+ ## Key Points to Cover
69
+ {{keyPoints}}
70
+
71
+ ## Instructions
72
+ Write a comprehensive blog post that:
73
+ - Opens with a compelling hook
74
+ - Uses clear headers and subheaders
75
+ - Includes practical examples or case studies
76
+ - Ends with a strong call to action
77
+ - Maintains a {{tone}} tone throughout
78
+
79
+ Word count target: {{wordCount}} words`,
80
+ variables: ['topic', 'title', 'audience', 'keyPoints', 'tone', 'wordCount'],
81
+ },
82
+ {
83
+ id: 'writing-email',
84
+ name: 'Professional Email',
85
+ description: 'Draft a professional email',
86
+ category: 'writing',
87
+ template: `Draft a professional email with the following parameters:
88
+
89
+ ## Context
90
+ - **Purpose**: {{purpose}}
91
+ - **Recipient**: {{recipient}}
92
+ - **Tone**: {{tone}}
93
+ - **Key Message**: {{message}}
94
+
95
+ ## Requirements
96
+ - Clear subject line
97
+ - Professional greeting
98
+ - Concise body (2-3 paragraphs max)
99
+ - Clear call to action
100
+ - Appropriate closing
101
+
102
+ Additional context: {{context}}`,
103
+ variables: ['purpose', 'recipient', 'tone', 'message', 'context'],
104
+ },
105
+ {
106
+ id: 'research-summary',
107
+ name: 'Research Summary',
108
+ description: 'Summarize research findings',
109
+ category: 'research',
110
+ template: `You are a research analyst specializing in {{field}}.
111
+
112
+ ## Research Topic
113
+ {{topic}}
114
+
115
+ ## Key Questions to Address
116
+ {{questions}}
117
+
118
+ ## Instructions
119
+ Provide a comprehensive research summary that:
120
+ 1. **Executive Summary**: 2-3 sentence overview
121
+ 2. **Key Findings**: Bullet points of main discoveries
122
+ 3. **Analysis**: Detailed breakdown of findings
123
+ 4. **Implications**: What this means for {{audience}}
124
+ 5. **Recommendations**: Actionable next steps
125
+ 6. **Sources**: Note any sources or data referenced
126
+
127
+ Focus on accuracy, objectivity, and actionable insights.`,
128
+ variables: ['field', 'topic', 'questions', 'audience'],
129
+ },
130
+ {
131
+ id: 'analysis-swot',
132
+ name: 'SWOT Analysis',
133
+ description: 'Conduct a SWOT analysis',
134
+ category: 'analysis',
135
+ template: `Conduct a comprehensive SWOT analysis for:
136
+
137
+ ## Subject
138
+ {{subject}}
139
+
140
+ ## Industry/Context
141
+ {{context}}
142
+
143
+ ## Instructions
144
+ Provide a detailed SWOT analysis:
145
+
146
+ ### Strengths (Internal Positives)
147
+ - What advantages does {{subject}} have?
148
+ - What does it do well?
149
+ - What unique resources does it possess?
150
+
151
+ ### Weaknesses (Internal Negatives)
152
+ - What could be improved?
153
+ - What is done poorly?
154
+ - What should be avoided?
155
+
156
+ ### Opportunities (External Positives)
157
+ - What opportunities are available?
158
+ - What trends could be leveraged?
159
+ - What changes in the market could benefit it?
160
+
161
+ ### Threats (External Negatives)
162
+ - What obstacles exist?
163
+ - What is the competition doing?
164
+ - What threats could cause problems?
165
+
166
+ End with 3-5 strategic recommendations based on the analysis.`,
167
+ variables: ['subject', 'context'],
168
+ },
169
+ {
170
+ id: 'analysis-comparison',
171
+ name: 'Comparison Analysis',
172
+ description: 'Compare multiple options or solutions',
173
+ category: 'analysis',
174
+ template: `You are an analyst tasked with comparing options.
175
+
176
+ ## Options to Compare
177
+ {{options}}
178
+
179
+ ## Comparison Criteria
180
+ {{criteria}}
181
+
182
+ ## Context
183
+ {{context}}
184
+
185
+ ## Instructions
186
+ Create a detailed comparison that includes:
187
+ 1. **Overview Table**: Side-by-side comparison matrix
188
+ 2. **Detailed Analysis**: Pros and cons of each option
189
+ 3. **Scoring**: Rate each option on the criteria (1-10)
190
+ 4. **Recommendation**: Which option is best for what use case
191
+ 5. **Decision Framework**: Questions to help choose
192
+
193
+ Be objective and data-driven in your analysis.`,
194
+ variables: ['options', 'criteria', 'context'],
195
+ },
196
+ {
197
+ id: 'factcheck-verify',
198
+ name: 'Fact Check',
199
+ description: 'Verify claims and statements',
200
+ category: 'factcheck',
201
+ template: `You are a fact-checker with expertise in verifying claims.
202
+
203
+ ## Statement to Verify
204
+ {{statement}}
205
+
206
+ ## Source (if available)
207
+ {{source}}
208
+
209
+ ## Instructions
210
+ Analyze the statement and provide:
211
+
212
+ 1. **Verdict**: TRUE / FALSE / PARTIALLY TRUE / UNVERIFIABLE
213
+ 2. **Confidence Level**: High / Medium / Low
214
+ 3. **Evidence**: Supporting or contradicting information
215
+ 4. **Context**: Important context that affects interpretation
216
+ 5. **Sources**: Reliable sources to verify the claim
217
+ 6. **Explanation**: Clear explanation of your verdict
218
+
219
+ Be thorough, objective, and cite reliable sources.`,
220
+ variables: ['statement', 'source'],
221
+ },
222
+ ];
223
+ /**
224
+ * Get all templates
225
+ */
226
+ export function getAllTemplates() {
227
+ return templates;
228
+ }
229
+ /**
230
+ * Get templates by category
231
+ */
232
+ export function getTemplatesByCategory(category) {
233
+ return templates.filter(t => t.category === category);
234
+ }
235
+ /**
236
+ * Get a specific template by ID
237
+ */
238
+ export function getTemplateById(id) {
239
+ return templates.find(t => t.id === id);
240
+ }
241
+ /**
242
+ * Get available categories
243
+ */
244
+ export function getCategories() {
245
+ return [...new Set(templates.map(t => t.category))];
246
+ }
247
+ /**
248
+ * Fill a template with variables
249
+ */
250
+ export function fillTemplate(template, variables) {
251
+ let filled = template.template;
252
+ for (const [key, value] of Object.entries(variables)) {
253
+ filled = filled.replace(new RegExp(`{{${key}}}`, 'g'), value);
254
+ }
255
+ // Remove any unfilled variables
256
+ filled = filled.replace(/{{[^}]+}}/g, '[NOT PROVIDED]');
257
+ return filled;
258
+ }
259
+ export default templates;
260
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/resources/templates.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * MCP Server Configuration
3
+ * Sets up the Model Context Protocol server with tools and resources
4
+ */
5
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
6
+ /**
7
+ * Create and configure the MCP server
8
+ */
9
+ export declare function createServer(): Server;
10
+ /**
11
+ * Run the server with stdio transport
12
+ */
13
+ export declare function runServer(): Promise<void>;
14
+ export default createServer;
15
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA4BnE;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAoCrC;AAwTD;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB/C;AAED,eAAe,YAAY,CAAC"}