@schaferandrew/mealie-mcp-server 0.1.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/.env.example +19 -0
- package/LICENSE +201 -0
- package/README.md +138 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +57 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +110 -0
- package/dist/index.js.map +1 -0
- package/dist/mealie-client.d.ts +26 -0
- package/dist/mealie-client.d.ts.map +1 -0
- package/dist/mealie-client.js +231 -0
- package/dist/mealie-client.js.map +1 -0
- package/dist/test-connection.d.ts +11 -0
- package/dist/test-connection.d.ts.map +1 -0
- package/dist/test-connection.js +119 -0
- package/dist/test-connection.js.map +1 -0
- package/dist/tools.d.ts +69 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +357 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +161 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -0
package/dist/tools.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DEFINITIONS = exports.SearchByIngredientSchema = exports.AddRecipeFromUrlSchema = exports.ListRecipesSchema = exports.GetRecipeSchema = exports.SearchRecipesSchema = void 0;
|
|
4
|
+
exports.handleTool = handleTool;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
// ─── Zod Schemas ───────────────────────────────────────────────────────────────
|
|
7
|
+
exports.SearchRecipesSchema = zod_1.z.object({
|
|
8
|
+
query: zod_1.z.string().min(1).describe("Search query string (recipe name, keyword, or phrase)"),
|
|
9
|
+
tags: zod_1.z
|
|
10
|
+
.array(zod_1.z.string())
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("Optional list of tag names to filter by"),
|
|
13
|
+
limit: zod_1.z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(100)
|
|
18
|
+
.optional()
|
|
19
|
+
.default(20)
|
|
20
|
+
.describe("Maximum number of results to return (default: 20, max: 100)"),
|
|
21
|
+
});
|
|
22
|
+
exports.GetRecipeSchema = zod_1.z.object({
|
|
23
|
+
recipe_id: zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1)
|
|
26
|
+
.describe("Recipe ID (UUID) or slug to retrieve"),
|
|
27
|
+
});
|
|
28
|
+
exports.ListRecipesSchema = zod_1.z.object({
|
|
29
|
+
tags: zod_1.z
|
|
30
|
+
.array(zod_1.z.string())
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("Optional list of tag names to filter by"),
|
|
33
|
+
categories: zod_1.z
|
|
34
|
+
.array(zod_1.z.string())
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("Optional list of category names to filter by"),
|
|
37
|
+
limit: zod_1.z
|
|
38
|
+
.number()
|
|
39
|
+
.int()
|
|
40
|
+
.min(1)
|
|
41
|
+
.max(200)
|
|
42
|
+
.optional()
|
|
43
|
+
.default(50)
|
|
44
|
+
.describe("Number of recipes per page (default: 50, max: 200)"),
|
|
45
|
+
offset: zod_1.z
|
|
46
|
+
.number()
|
|
47
|
+
.int()
|
|
48
|
+
.min(0)
|
|
49
|
+
.optional()
|
|
50
|
+
.default(0)
|
|
51
|
+
.describe("Number of recipes to skip for pagination (default: 0)"),
|
|
52
|
+
});
|
|
53
|
+
exports.AddRecipeFromUrlSchema = zod_1.z.object({
|
|
54
|
+
url: zod_1.z.string().url().describe("URL of the recipe page to scrape and import"),
|
|
55
|
+
includeTags: zod_1.z
|
|
56
|
+
.boolean()
|
|
57
|
+
.optional()
|
|
58
|
+
.default(false)
|
|
59
|
+
.describe("Whether to import tags from the source website (default: false)"),
|
|
60
|
+
includeCategories: zod_1.z
|
|
61
|
+
.boolean()
|
|
62
|
+
.optional()
|
|
63
|
+
.default(false)
|
|
64
|
+
.describe("Whether to import categories from the source website (default: false)"),
|
|
65
|
+
});
|
|
66
|
+
exports.SearchByIngredientSchema = zod_1.z.object({
|
|
67
|
+
ingredient: zod_1.z
|
|
68
|
+
.string()
|
|
69
|
+
.min(1)
|
|
70
|
+
.describe("Ingredient name to search for (e.g. 'cream cheese', 'chicken')"),
|
|
71
|
+
limit: zod_1.z
|
|
72
|
+
.number()
|
|
73
|
+
.int()
|
|
74
|
+
.min(1)
|
|
75
|
+
.max(100)
|
|
76
|
+
.optional()
|
|
77
|
+
.default(20)
|
|
78
|
+
.describe("Maximum number of results to return (default: 20)"),
|
|
79
|
+
});
|
|
80
|
+
exports.TOOL_DEFINITIONS = [
|
|
81
|
+
{
|
|
82
|
+
name: "search_recipes",
|
|
83
|
+
description: "Search for recipes in Mealie by name, keyword, or description. " +
|
|
84
|
+
"Optionally filter by tags. Returns a list of matching recipes with basic info.",
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: {
|
|
88
|
+
query: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Search query string (recipe name, keyword, or phrase)",
|
|
91
|
+
},
|
|
92
|
+
tags: {
|
|
93
|
+
type: "array",
|
|
94
|
+
items: { type: "string" },
|
|
95
|
+
description: "Optional list of tag names to filter by",
|
|
96
|
+
},
|
|
97
|
+
limit: {
|
|
98
|
+
type: "integer",
|
|
99
|
+
minimum: 1,
|
|
100
|
+
maximum: 100,
|
|
101
|
+
description: "Maximum number of results to return (default: 20, max: 100)",
|
|
102
|
+
default: 20,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ["query"],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "get_recipe",
|
|
110
|
+
description: "Get complete details for a specific recipe including ingredients, " +
|
|
111
|
+
"step-by-step instructions, nutrition information, notes, and tags. " +
|
|
112
|
+
"Use the recipe ID or slug from search results.",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
recipe_id: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Recipe ID (UUID) or slug to retrieve",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
required: ["recipe_id"],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "list_recipes",
|
|
126
|
+
description: "List all recipes in Mealie, optionally filtered by tags or categories. " +
|
|
127
|
+
"Supports pagination for large recipe collections.",
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
tags: {
|
|
132
|
+
type: "array",
|
|
133
|
+
items: { type: "string" },
|
|
134
|
+
description: "Optional list of tag names to filter by",
|
|
135
|
+
},
|
|
136
|
+
categories: {
|
|
137
|
+
type: "array",
|
|
138
|
+
items: { type: "string" },
|
|
139
|
+
description: "Optional list of category names to filter by",
|
|
140
|
+
},
|
|
141
|
+
limit: {
|
|
142
|
+
type: "number",
|
|
143
|
+
description: "Number of recipes per page (default: 50, max: 200)",
|
|
144
|
+
default: 50,
|
|
145
|
+
},
|
|
146
|
+
offset: {
|
|
147
|
+
type: "number",
|
|
148
|
+
description: "Number of recipes to skip for pagination (default: 0)",
|
|
149
|
+
default: 0,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
required: [],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "add_recipe_from_url",
|
|
157
|
+
description: "Import a recipe into Mealie by scraping a URL. Mealie will automatically extract " +
|
|
158
|
+
"the recipe name, ingredients, instructions, and metadata from the page. " +
|
|
159
|
+
"Works best with sites that use structured recipe data (most major recipe sites).",
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: "object",
|
|
162
|
+
properties: {
|
|
163
|
+
url: {
|
|
164
|
+
type: "string",
|
|
165
|
+
description: "URL of the recipe page to scrape and import",
|
|
166
|
+
},
|
|
167
|
+
includeTags: {
|
|
168
|
+
type: "boolean",
|
|
169
|
+
description: "Whether to import tags from the source website (default: false)",
|
|
170
|
+
default: false,
|
|
171
|
+
},
|
|
172
|
+
includeCategories: {
|
|
173
|
+
type: "boolean",
|
|
174
|
+
description: "Whether to import categories from the source website (default: false)",
|
|
175
|
+
default: false,
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ["url"],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "search_by_ingredient",
|
|
183
|
+
description: "Find recipes that contain a specific ingredient. " +
|
|
184
|
+
"Searches through recipe names, descriptions, and ingredient lists.",
|
|
185
|
+
inputSchema: {
|
|
186
|
+
type: "object",
|
|
187
|
+
properties: {
|
|
188
|
+
ingredient: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Ingredient name to search for (e.g. 'cream cheese', 'chicken')",
|
|
191
|
+
},
|
|
192
|
+
limit: {
|
|
193
|
+
type: "number",
|
|
194
|
+
description: "Maximum number of results to return (default: 20)",
|
|
195
|
+
default: 20,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
required: ["ingredient"],
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
// ─── Tool Handler ──────────────────────────────────────────────────────────────
|
|
203
|
+
async function handleTool(name, args, client) {
|
|
204
|
+
switch (name) {
|
|
205
|
+
case "search_recipes": {
|
|
206
|
+
const input = exports.SearchRecipesSchema.parse(args);
|
|
207
|
+
const recipes = await client.searchRecipes(input.query, input.tags, input.limit);
|
|
208
|
+
return formatRecipeList(recipes, `Search results for "${input.query}"`);
|
|
209
|
+
}
|
|
210
|
+
case "get_recipe": {
|
|
211
|
+
const input = exports.GetRecipeSchema.parse(args);
|
|
212
|
+
const recipe = await client.getRecipe(input.recipe_id);
|
|
213
|
+
return formatFullRecipe(recipe);
|
|
214
|
+
}
|
|
215
|
+
case "list_recipes": {
|
|
216
|
+
const input = exports.ListRecipesSchema.parse(args);
|
|
217
|
+
const result = await client.listRecipes({
|
|
218
|
+
tags: input.tags,
|
|
219
|
+
categories: input.categories,
|
|
220
|
+
limit: input.limit,
|
|
221
|
+
offset: input.offset,
|
|
222
|
+
});
|
|
223
|
+
const showing = Math.min(input.limit ?? 50, result.items.length);
|
|
224
|
+
const header = `Showing ${showing} of ${result.total} recipes (offset: ${input.offset ?? 0})`;
|
|
225
|
+
return formatRecipeList(result.items, header);
|
|
226
|
+
}
|
|
227
|
+
case "add_recipe_from_url": {
|
|
228
|
+
const input = exports.AddRecipeFromUrlSchema.parse(args);
|
|
229
|
+
const recipe = await client.createRecipeFromUrl(input.url, input.includeTags, input.includeCategories);
|
|
230
|
+
return `Recipe imported successfully!\n\n${formatFullRecipe(recipe)}`;
|
|
231
|
+
}
|
|
232
|
+
case "search_by_ingredient": {
|
|
233
|
+
const input = exports.SearchByIngredientSchema.parse(args);
|
|
234
|
+
const recipes = await client.searchByIngredient(input.ingredient, input.limit);
|
|
235
|
+
return formatRecipeList(recipes, `Recipes containing "${input.ingredient}"`);
|
|
236
|
+
}
|
|
237
|
+
default:
|
|
238
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// ─── Formatters ────────────────────────────────────────────────────────────────
|
|
242
|
+
function formatRecipeList(recipes, header) {
|
|
243
|
+
if (recipes.length === 0) {
|
|
244
|
+
return `${header}\n\nNo recipes found.`;
|
|
245
|
+
}
|
|
246
|
+
const lines = [`${header}\n`];
|
|
247
|
+
for (const recipe of recipes) {
|
|
248
|
+
lines.push(`- **${recipe.name}** (ID: \`${recipe.slug ?? recipe.id}\`)`);
|
|
249
|
+
if (recipe.description) {
|
|
250
|
+
lines.push(` ${recipe.description}`);
|
|
251
|
+
}
|
|
252
|
+
const meta = [];
|
|
253
|
+
if (recipe.totalTime)
|
|
254
|
+
meta.push(`Time: ${recipe.totalTime}`);
|
|
255
|
+
if (recipe.recipeYield)
|
|
256
|
+
meta.push(`Yield: ${recipe.recipeYield}`);
|
|
257
|
+
if (recipe.tags && recipe.tags.length > 0) {
|
|
258
|
+
meta.push(`Tags: ${recipe.tags.map((t) => t.name).join(", ")}`);
|
|
259
|
+
}
|
|
260
|
+
if (meta.length > 0) {
|
|
261
|
+
lines.push(` ${meta.join(" | ")}`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return lines.join("\n");
|
|
265
|
+
}
|
|
266
|
+
function formatFullRecipe(recipe) {
|
|
267
|
+
const lines = [];
|
|
268
|
+
lines.push(`# ${recipe.name}`);
|
|
269
|
+
lines.push(`**ID/Slug:** \`${recipe.slug ?? recipe.id}\``);
|
|
270
|
+
if (recipe.description) {
|
|
271
|
+
lines.push(`\n${recipe.description}`);
|
|
272
|
+
}
|
|
273
|
+
// Metadata
|
|
274
|
+
const meta = [];
|
|
275
|
+
if (recipe.prepTime)
|
|
276
|
+
meta.push(`Prep: ${recipe.prepTime}`);
|
|
277
|
+
if (recipe.cookTime)
|
|
278
|
+
meta.push(`Cook: ${recipe.cookTime}`);
|
|
279
|
+
if (recipe.totalTime)
|
|
280
|
+
meta.push(`Total: ${recipe.totalTime}`);
|
|
281
|
+
if (recipe.recipeYield)
|
|
282
|
+
meta.push(`Yield: ${recipe.recipeYield}`);
|
|
283
|
+
if (meta.length > 0) {
|
|
284
|
+
lines.push(`\n${meta.join(" | ")}`);
|
|
285
|
+
}
|
|
286
|
+
if (recipe.tags && recipe.tags.length > 0) {
|
|
287
|
+
lines.push(`**Tags:** ${recipe.tags.map((t) => t.name).join(", ")}`);
|
|
288
|
+
}
|
|
289
|
+
if (recipe.recipeCategory && recipe.recipeCategory.length > 0) {
|
|
290
|
+
lines.push(`**Categories:** ${recipe.recipeCategory.map((c) => c.name).join(", ")}`);
|
|
291
|
+
}
|
|
292
|
+
// Ingredients
|
|
293
|
+
if (recipe.recipeIngredient && recipe.recipeIngredient.length > 0) {
|
|
294
|
+
lines.push(`\n## Ingredients`);
|
|
295
|
+
for (const ing of recipe.recipeIngredient) {
|
|
296
|
+
const text = ing.display ?? ing.note ?? formatIngredient(ing);
|
|
297
|
+
if (text)
|
|
298
|
+
lines.push(`- ${text}`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// Instructions
|
|
302
|
+
if (recipe.recipeInstructions && recipe.recipeInstructions.length > 0) {
|
|
303
|
+
lines.push(`\n## Instructions`);
|
|
304
|
+
recipe.recipeInstructions.forEach((step, i) => {
|
|
305
|
+
if (step.title) {
|
|
306
|
+
lines.push(`\n**${step.title}**`);
|
|
307
|
+
}
|
|
308
|
+
lines.push(`${i + 1}. ${step.text}`);
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
// Nutrition
|
|
312
|
+
if (recipe.nutrition) {
|
|
313
|
+
const n = recipe.nutrition;
|
|
314
|
+
const nutrients = [];
|
|
315
|
+
if (n.calories)
|
|
316
|
+
nutrients.push(`Calories: ${n.calories}`);
|
|
317
|
+
if (n.proteinContent)
|
|
318
|
+
nutrients.push(`Protein: ${n.proteinContent}`);
|
|
319
|
+
if (n.carbohydrateContent)
|
|
320
|
+
nutrients.push(`Carbs: ${n.carbohydrateContent}`);
|
|
321
|
+
if (n.fatContent)
|
|
322
|
+
nutrients.push(`Fat: ${n.fatContent}`);
|
|
323
|
+
if (n.fiberContent)
|
|
324
|
+
nutrients.push(`Fiber: ${n.fiberContent}`);
|
|
325
|
+
if (n.sodiumContent)
|
|
326
|
+
nutrients.push(`Sodium: ${n.sodiumContent}`);
|
|
327
|
+
if (n.sugarContent)
|
|
328
|
+
nutrients.push(`Sugar: ${n.sugarContent}`);
|
|
329
|
+
if (nutrients.length > 0) {
|
|
330
|
+
lines.push(`\n## Nutrition (per serving)`);
|
|
331
|
+
nutrients.forEach((n) => lines.push(`- ${n}`));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
// Notes
|
|
335
|
+
if (recipe.notes && recipe.notes.length > 0) {
|
|
336
|
+
lines.push(`\n## Notes`);
|
|
337
|
+
for (const note of recipe.notes) {
|
|
338
|
+
if (note.title)
|
|
339
|
+
lines.push(`**${note.title}**`);
|
|
340
|
+
lines.push(note.text);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return lines.join("\n");
|
|
344
|
+
}
|
|
345
|
+
function formatIngredient(ing) {
|
|
346
|
+
const parts = [];
|
|
347
|
+
if (ing.quantity != null)
|
|
348
|
+
parts.push(String(ing.quantity));
|
|
349
|
+
if (ing.unit)
|
|
350
|
+
parts.push(ing.unit.abbreviation ?? ing.unit.name);
|
|
351
|
+
if (ing.food)
|
|
352
|
+
parts.push(ing.food.name);
|
|
353
|
+
if (ing.note)
|
|
354
|
+
parts.push(ing.note);
|
|
355
|
+
return parts.join(" ").trim();
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":";;;AA8NA,gCAiDC;AA/QD,6BAAwB;AAIxB,kFAAkF;AAErE,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC1F,IAAI,EAAE,OAAC;SACJ,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CAAC,yCAAyC,CAAC;IACtD,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,6DAA6D,CAAC;CAC3E,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,SAAS,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CAAC,CAAC;YAChD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,gBAAgB,CAAC,GAKzB;IACC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,GAAG,CAAC,QAAQ,IAAI,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D,IAAI,GAAG,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjE,IAAI,GAAG,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,GAAG,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export interface RecipeIngredient {
|
|
2
|
+
quantity?: number | null;
|
|
3
|
+
unit?: IngredientUnit | null;
|
|
4
|
+
food?: IngredientFood | null;
|
|
5
|
+
note?: string | null;
|
|
6
|
+
isFood?: boolean;
|
|
7
|
+
disableAmount?: boolean;
|
|
8
|
+
display?: string;
|
|
9
|
+
title?: string | null;
|
|
10
|
+
originalText?: string | null;
|
|
11
|
+
referenceId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IngredientUnit {
|
|
14
|
+
id?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
abbreviation?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
fraction?: boolean;
|
|
19
|
+
pluralName?: string | null;
|
|
20
|
+
pluralAbbreviation?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface IngredientFood {
|
|
23
|
+
id?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
pluralName?: string | null;
|
|
26
|
+
description?: string;
|
|
27
|
+
extras?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface RecipeInstruction {
|
|
30
|
+
id?: string;
|
|
31
|
+
title?: string | null;
|
|
32
|
+
text: string;
|
|
33
|
+
ingredientReferences?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface RecipeNote {
|
|
36
|
+
title: string;
|
|
37
|
+
text: string;
|
|
38
|
+
}
|
|
39
|
+
export interface RecipeTag {
|
|
40
|
+
id?: string;
|
|
41
|
+
name: string;
|
|
42
|
+
slug?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RecipeCategory {
|
|
45
|
+
id?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
slug?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface RecipeTool {
|
|
50
|
+
id?: string;
|
|
51
|
+
name: string;
|
|
52
|
+
slug?: string;
|
|
53
|
+
onHand?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface NutritionInfo {
|
|
56
|
+
calories?: string | null;
|
|
57
|
+
fatContent?: string | null;
|
|
58
|
+
proteinContent?: string | null;
|
|
59
|
+
carbohydrateContent?: string | null;
|
|
60
|
+
fiberContent?: string | null;
|
|
61
|
+
sodiumContent?: string | null;
|
|
62
|
+
sugarContent?: string | null;
|
|
63
|
+
}
|
|
64
|
+
export interface RecipeSummary {
|
|
65
|
+
id: string;
|
|
66
|
+
userId?: string;
|
|
67
|
+
groupId?: string;
|
|
68
|
+
name: string;
|
|
69
|
+
slug: string;
|
|
70
|
+
image?: string | null;
|
|
71
|
+
recipeYield?: string | null;
|
|
72
|
+
totalTime?: string | null;
|
|
73
|
+
prepTime?: string | null;
|
|
74
|
+
cookTime?: string | null;
|
|
75
|
+
performTime?: string | null;
|
|
76
|
+
description?: string | null;
|
|
77
|
+
recipeCategory?: RecipeCategory[];
|
|
78
|
+
tags?: RecipeTag[];
|
|
79
|
+
tools?: RecipeTool[];
|
|
80
|
+
rating?: number | null;
|
|
81
|
+
orgURL?: string | null;
|
|
82
|
+
dateAdded?: string | null;
|
|
83
|
+
dateUpdated?: string | null;
|
|
84
|
+
createdAt?: string | null;
|
|
85
|
+
updatedAt?: string | null;
|
|
86
|
+
lastMade?: string | null;
|
|
87
|
+
}
|
|
88
|
+
export interface Recipe extends RecipeSummary {
|
|
89
|
+
recipeIngredient?: RecipeIngredient[];
|
|
90
|
+
recipeInstructions?: RecipeInstruction[];
|
|
91
|
+
nutrition?: NutritionInfo | null;
|
|
92
|
+
notes?: RecipeNote[];
|
|
93
|
+
extras?: Record<string, unknown>;
|
|
94
|
+
isOcrRecipe?: boolean;
|
|
95
|
+
settings?: RecipeSettings;
|
|
96
|
+
assets?: RecipeAsset[];
|
|
97
|
+
comments?: RecipeComment[];
|
|
98
|
+
}
|
|
99
|
+
export interface RecipeSettings {
|
|
100
|
+
public?: boolean;
|
|
101
|
+
showNutrition?: boolean;
|
|
102
|
+
showAssets?: boolean;
|
|
103
|
+
landscapeView?: boolean;
|
|
104
|
+
disableComments?: boolean;
|
|
105
|
+
disableAmount?: boolean;
|
|
106
|
+
locked?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface RecipeAsset {
|
|
109
|
+
name: string;
|
|
110
|
+
icon: string;
|
|
111
|
+
fileType: string;
|
|
112
|
+
fileName: string;
|
|
113
|
+
}
|
|
114
|
+
export interface RecipeComment {
|
|
115
|
+
id?: string;
|
|
116
|
+
recipeId?: string;
|
|
117
|
+
userId?: string;
|
|
118
|
+
text: string;
|
|
119
|
+
createdAt?: string;
|
|
120
|
+
updatedAt?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface PaginatedResponse<T> {
|
|
123
|
+
page: number;
|
|
124
|
+
per_page: number;
|
|
125
|
+
total: number;
|
|
126
|
+
total_pages: number;
|
|
127
|
+
items: T[];
|
|
128
|
+
next?: string | null;
|
|
129
|
+
previous?: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface RecipeSearchResponse {
|
|
132
|
+
page: number;
|
|
133
|
+
per_page: number;
|
|
134
|
+
total: number;
|
|
135
|
+
total_pages: number;
|
|
136
|
+
items: RecipeSummary[];
|
|
137
|
+
}
|
|
138
|
+
export interface SearchRecipesInput {
|
|
139
|
+
query: string;
|
|
140
|
+
tags?: string[];
|
|
141
|
+
limit?: number;
|
|
142
|
+
}
|
|
143
|
+
export interface GetRecipeInput {
|
|
144
|
+
recipe_id: string;
|
|
145
|
+
}
|
|
146
|
+
export interface ListRecipesInput {
|
|
147
|
+
tags?: string[];
|
|
148
|
+
categories?: string[];
|
|
149
|
+
limit?: number;
|
|
150
|
+
offset?: number;
|
|
151
|
+
}
|
|
152
|
+
export interface SearchByIngredientInput {
|
|
153
|
+
ingredient: string;
|
|
154
|
+
limit?: number;
|
|
155
|
+
}
|
|
156
|
+
export interface ServerConfig {
|
|
157
|
+
mealieUrl: string;
|
|
158
|
+
mealieApiKey: string;
|
|
159
|
+
port: number;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,G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I,EAAE,MAAM,CAAC;CACd"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,iFAAiF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@schaferandrew/mealie-mcp-server",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "MCP server for integrating Mealie recipe manager with Claude and Vivian",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mealie-mcp-server": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
".env.example"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"prepare": "npm run build",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"dev": "ts-node src/index.ts",
|
|
18
|
+
"test-connection": "ts-node src/test-connection.ts",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"mealie",
|
|
24
|
+
"recipes",
|
|
25
|
+
"claude",
|
|
26
|
+
"model-context-protocol"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
32
|
+
"axios": "^1.7.9",
|
|
33
|
+
"dotenv": "^16.4.7",
|
|
34
|
+
"zod": "^3.23.8"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.10.2",
|
|
38
|
+
"ts-node": "^10.9.2",
|
|
39
|
+
"typescript": "^5.7.2"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|