yazio-mcp 0.0.13 → 0.0.14
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 +4 -3
- package/dist/index.js +30785 -547
- package/package.json +13 -9
- package/dist/schemas.js +0 -71
- package/dist/types.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yazio-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "MCP server for accessing Yazio user & nutrition data (unofficial)",
|
|
5
5
|
"mcpName": "io.github.fliptheweb/yazio-mcp",
|
|
6
6
|
"author": "fliptheweb",
|
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsc",
|
|
28
|
+
"build": "rm -rf dist && tsc --emitDeclarationOnly && esbuild src/index.ts --bundle --platform=node --format=esm --packages=bundle --outfile=dist/index.js",
|
|
29
|
+
"pack:mcpb": "node scripts/pack-mcpb.cjs",
|
|
30
|
+
"build:mcpb": "npm run build && npm run pack:mcpb",
|
|
31
|
+
"build:mcpb:unpacked": "npm run build && node scripts/pack-mcpb.cjs --unpacked",
|
|
29
32
|
"dev": "tsx src/index.ts",
|
|
30
33
|
"start": "node dist/index.js",
|
|
31
34
|
"prepublishOnly": "npm run build",
|
|
@@ -47,20 +50,21 @@
|
|
|
47
50
|
"engines": {
|
|
48
51
|
"node": ">=18.0.0"
|
|
49
52
|
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@modelcontextprotocol/sdk": "^1.25.0",
|
|
52
|
-
"uuid": "^13.0.0",
|
|
53
|
-
"yazio": "^1.0.0",
|
|
54
|
-
"zod": "^4.2.1"
|
|
55
|
-
},
|
|
53
|
+
"dependencies": {},
|
|
56
54
|
"devDependencies": {
|
|
55
|
+
"@anthropic-ai/mcpb": "^2.1.2",
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.25.0",
|
|
57
57
|
"@types/node": "^20.0.0",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
59
59
|
"@typescript-eslint/parser": "^8.44.1",
|
|
60
|
+
"esbuild": "^0.28.0",
|
|
60
61
|
"eslint": "^9.36.0",
|
|
61
62
|
"globals": "^16.4.0",
|
|
62
63
|
"prettier": "^3.6.2",
|
|
63
64
|
"tsx": "^4.0.0",
|
|
64
|
-
"typescript": "^5.0.0"
|
|
65
|
+
"typescript": "^5.0.0",
|
|
66
|
+
"uuid": "^13.0.0",
|
|
67
|
+
"yazio": "^1.0.0",
|
|
68
|
+
"zod": "^4.2.1"
|
|
65
69
|
}
|
|
66
70
|
}
|
package/dist/schemas.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export const DaytimeSchema = z.enum(['breakfast', 'lunch', 'dinner', 'snack']);
|
|
3
|
-
export const DateStringSchema = z.iso.date().describe('Date in YYYY-MM-DD format');
|
|
4
|
-
export const ProductIdSchema = z.uuid().describe('Product UUID v1/v4 (e.g. 4ceff6e9-78ce-441b-964a-22e81c1dee92)');
|
|
5
|
-
export const ItemIdSchema = ProductIdSchema.describe('Unique item identifier');
|
|
6
|
-
export const ServingTypeSchema = z.string().describe('Serving type (e.g. portion, fruit, glass, cup, slice, piece, bar, gram, bottle, can, etc.)');
|
|
7
|
-
export const QueryStringSchema = z.string().describe('Search query string');
|
|
8
|
-
export const LimitSchema = z.number().optional().describe('Maximum number of results to return');
|
|
9
|
-
export const DateInputSchema = z.object({
|
|
10
|
-
date: DateStringSchema
|
|
11
|
-
});
|
|
12
|
-
export const OptionalDateInputSchema = z.object({
|
|
13
|
-
date: DateStringSchema.optional()
|
|
14
|
-
});
|
|
15
|
-
export const QueryInputSchema = z.object({
|
|
16
|
-
query: QueryStringSchema.describe('Search query'),
|
|
17
|
-
sex: z.enum(["male", "female"]).default("male").optional(),
|
|
18
|
-
countries: z.array(z.string()).default(["US"]).optional().describe('Array of country codes for product search (e.g. ["US", "DE", "TR"])'),
|
|
19
|
-
locales: z.array(z.string()).default(["en_US"]).optional().describe('Array of locale codes (e.g. ["en_US", "de_US"])')
|
|
20
|
-
});
|
|
21
|
-
export const OptionalQueryInputSchema = z.object({
|
|
22
|
-
query: QueryStringSchema.optional().describe('Search query (optional)'),
|
|
23
|
-
limit: LimitSchema
|
|
24
|
-
});
|
|
25
|
-
export const EmptyInputSchema = z.object({});
|
|
26
|
-
export const GetFoodEntriesInputSchema = DateInputSchema;
|
|
27
|
-
export const GetDailySummaryInputSchema = DateInputSchema;
|
|
28
|
-
export const GetUserInfoInputSchema = EmptyInputSchema;
|
|
29
|
-
export const GetUserWeightInputSchema = EmptyInputSchema; // Yazio getWeight doesn't accept parameters
|
|
30
|
-
export const GetWaterIntakeInputSchema = DateInputSchema;
|
|
31
|
-
export const SearchProductsInputSchema = QueryInputSchema;
|
|
32
|
-
export const SearchProductsOutputSchema = z.object({
|
|
33
|
-
products: z.array(z.object({
|
|
34
|
-
score: z.number(),
|
|
35
|
-
name: z.string(),
|
|
36
|
-
product_id: ProductIdSchema,
|
|
37
|
-
serving: ServingTypeSchema,
|
|
38
|
-
serving_quantity: z.number(),
|
|
39
|
-
amount: z.number(),
|
|
40
|
-
base_unit: z.enum(['g', 'ml']).describe('Base unit: grams (g) or milliliters (ml)'),
|
|
41
|
-
producer: z.string().nullable().describe('Producer name'),
|
|
42
|
-
is_verified: z.boolean(),
|
|
43
|
-
nutrients: z.record(z.string(), z.number()).describe('Nutrients object with keys like energy.energy, nutrient.carb, etc.'),
|
|
44
|
-
countries: z.array(z.string()).describe('Array of country codes (e.g. ["US", "DE"])'),
|
|
45
|
-
language: z.string().describe('Language code (e.g. "en", "de")'),
|
|
46
|
-
})),
|
|
47
|
-
});
|
|
48
|
-
export const GetProductInputSchema = z.object({
|
|
49
|
-
id: ProductIdSchema.describe('Product ID to get details for')
|
|
50
|
-
});
|
|
51
|
-
export const GetUserExercisesInputSchema = OptionalDateInputSchema; // Only supports single date, not date ranges
|
|
52
|
-
export const GetUserSettingsInputSchema = EmptyInputSchema;
|
|
53
|
-
export const GetUserSuggestedProductsInputSchema = OptionalQueryInputSchema;
|
|
54
|
-
export const AddConsumedItemInputSchema = z.object({
|
|
55
|
-
// id: ProductIdSchema.describe('Random identifier for the consumed item'),
|
|
56
|
-
product_id: ProductIdSchema,
|
|
57
|
-
date: DateStringSchema.describe('Date when the food was consumed'),
|
|
58
|
-
daytime: DaytimeSchema.describe('Type of meal (breakfast, lunch, dinner, snack)'),
|
|
59
|
-
amount: z.number().describe('Amount of the product consumed in base units (g or ml)'),
|
|
60
|
-
serving: ServingTypeSchema.optional(),
|
|
61
|
-
serving_quantity: z.number().optional().describe('Quantity of servings')
|
|
62
|
-
});
|
|
63
|
-
export const RemoveConsumedItemInputSchema = z.object({
|
|
64
|
-
itemId: ItemIdSchema.describe('ID of the consumed item to remove')
|
|
65
|
-
});
|
|
66
|
-
export const AddWaterIntakeInputSchema = z.object({
|
|
67
|
-
date: z.string().describe('Date and time in format "YYYY-MM-DD HH:mm:ss" (e.g., "2025-12-18 12:00:00")'),
|
|
68
|
-
water_intake: z.number().describe('Cumulative water intake in milliliters (ml)')
|
|
69
|
-
});
|
|
70
|
-
export const GetDietaryPreferencesInputSchema = EmptyInputSchema;
|
|
71
|
-
export const GetUserGoalsInputSchema = EmptyInputSchema;
|
package/dist/types.js
DELETED