Matdata – Swedish food composition data

Nutrition facts for 2,600 Swedish foods (Swedish Food Agency), NNR 2023 intakes, climate impact.

Should I use this

Quality & Safety

A
Description quality
76%
Schema completeness
98%
Naming quality
92%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Findings (2)

  • LOWTool 'top_foods' description lacks action verbin top_foods
  • LOWTool 'compare_foods' description lacks action verbin compare_foods

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~1,334Tokens (tool definitions)
~1.7 KBTypical response size
Moderate attention impact (1.04% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "matdata": {
      "url": "https://matdata.se/mcp"
    }
  }
}

Remote endpoints

https://matdata.se/mcpstreamable-http

What it can do

Tool inventory

Tools (5)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢search_foods(query, lang, limit)

Search the Swedish Food Agency food composition database (2,600 foods) by name in Swedish or English. Returns id, name, energy (kcal per 100 g) and URL. Use the id with get_food.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Food name or part of it, in Swedish or English, e.g. 'havregryn', 'rolled oats' or 'kycklingfilé'. Several words narrow the search ('ris kokt')."
    },
    "lang": {
      "type": "string",
      "enum": [
        "sv",
        "en"
      ],
      "description": "Language of names in the result (default: sv)"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "description": "Maximum number of results, 1–25 (default 10). Best matches come first."
    }
  },
  "required": [
    "query"
  ]
}
🟢get_food(id, grams)

All nutrient values for one food (energy, macronutrients, fatty acids, vitamins, minerals), per 100 g or scaled to a given amount in grams. Includes portion sizes, density, category, diet, climate impact (kg CO2e, AGRIBALYSE 3.2, for about 610 foods) and source attribution.

Input Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1,
      "description": "Food id (Swedish Food Agency number) as returned by search_foods, top_foods or compare_foods, e.g. 553 for banana."
    },
    "grams": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Amount of the food in grams. All values, including climate impact, are scaled to this amount. Default 100 (values per 100 g). Use the portions in the result to convert pieces or decilitres to grams."
    }
  },
  "required": [
    "id"
  ]
}
🟢top_foods(nutrient, order, per, diet, everyday, ...)

Foods with the most (or least) of a nutrient per 100 g or per 100 kcal. Nutrient codes: ENERC_KCAL, PROT, FAT, FASAT, FAMS, FAPU, N3, CHO, SUGAR, SUGAD, SUGFR, FIBT, WHOLET, NACL, NA, CHORL, VITA, CARTB, VITD, VITE, THIA, RIBF, NIAEQ, VITB6, FOL, VITB12, VITC, CA, P, K, MG, FE, ZN, SE, ID.

Input Schema

{
  "type": "object",
  "properties": {
    "nutrient": {
      "type": "string",
      "description": "Nutrient code from the list in the tool description, e.g. PROT (protein), FIBT (fibre), FE (iron), VITD (vitamin D), ENERC_KCAL (energy)."
    },
    "order": {
      "type": "string",
      "enum": [
        "desc",
        "asc"
      ],
      "description": "Sort order: desc lists the foods with the most first (default), asc the least first."
    },
    "per": {
      "type": "string",
      "enum": [
        "100g",
        "100kcal"
      ],
      "description": "Basis for the ranking: 100g compares per 100 g of food (default), 100kcal per 100 kcal, which favours nutrient-dense foods."
    },
    "diet": {
      "type": "string",
      "enum": [
        "vegan",
        "vegetarian",
        "pescetarian"
      ],
      "description": "Only foods that fit this diet. Omit for all foods."
    },
    "everyday": {
      "type": "boolean",
      "description": "true (default) leaves out spices, supplements, baby food, stock, sweeteners and similar that are rarely eaten in 100 g amounts; false includes everything."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "description": "Maximum number of foods, 1–50 (default 15)."
    },
    "lang": {
      "type": "string",
      "enum": [
        "sv",
        "en"
      ],
      "description": "Language of food names and URLs in the result (default: sv)."
    }
  },
  "required": [
    "nutrient"
  ]
}
🟢compare_foods(ids, lang)

Compare 2–6 foods side by side on the main nutrients per 100 g.

Input Schema

{
  "type": "object",
  "properties": {
    "ids": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1
      },
      "minItems": 2,
      "maxItems": 6,
      "description": "Two to six food ids as returned by search_foods, e.g. [951, 884] for minced beef and lentils."
    },
    "lang": {
      "type": "string",
      "enum": [
        "sv",
        "en"
      ],
      "description": "Language of food names and URLs in the result (default: sv)."
    }
  },
  "required": [
    "ids"
  ]
}
🟢get_reference_values(group)

Recommended daily intakes from the Nordic Nutrition Recommendations 2023 for a population group, or EU labelling reference intakes. Groups: c1-3, c4-6, c7-10, f11-14, m11-14, f15-17, m15-17, f18-24, f25-50, f51-70, f71+, m18-24, m25-50, m51-70, m71+, preg-t1, preg-t2, preg-t3, lact, eu.

Input Schema

{
  "type": "object",
  "properties": {
    "group": {
      "type": "string",
      "enum": [
        "c1-3",
        "c4-6",
        "c7-10",
        "f11-14",
        "m11-14",
        "f15-17",
        "m15-17",
        "f18-24",
        "f25-50",
        "f51-70",
        "f71+",
        "m18-24",
        "m25-50",
        "m51-70",
        "m71+",
        "preg-t1",
        "preg-t2",
        "preg-t3",
        "lact",
        "eu"
      ],
      "description": "Population group: c = children (age span), f = women, m = men (age span), preg-t1…t3 = pregnancy by trimester, lact = breastfeeding, eu = EU labelling reference intakes. Default f25-50."
    }
  }
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded5 tools