npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cn-food-mcp

v1.0.0

Published

MCP server for Chinese food nutrition data (~1724 foods, 25 nutrients per 100g)

Readme

cn-food-mcp

MCP server for Chinese food nutrition data. Provides ~1725 foods with 25 nutrients per 100g.

Usage

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "cn-food": {
      "command": "npx",
      "args": ["-y", "cn-food-mcp"]
    }
  }
}

Cursor

Add to Cursor MCP settings:

{
  "mcpServers": {
    "cn-food": {
      "command": "npx",
      "args": ["-y", "cn-food-mcp"]
    }
  }
}

Tools

list_nutrients

List all available nutrient fields with Chinese/English names and units.

Parameters: none

Example: {}

{
  "per_100g": true,
  "nutrients": [
    { "field": "energy", "name_cn": "能量", "name_en": "Energy", "unit": "kcal" },
    { "field": "protein", "name_cn": "蛋白质", "name_en": "Protein", "unit": "g" },
    { "field": "carbohydrate", "name_cn": "糖类", "name_en": "Carbohydrate", "unit": "g" },
    { "field": "fat", "name_cn": "脂肪", "name_en": "Fat", "unit": "g" },
    { "field": "vitamin_a", "name_cn": "维生素A", "name_en": "Vitamin A", "unit": "μg" },
    { "field": "calcium", "name_cn": "钙", "name_en": "Calcium", "unit": "mg" },
    "... (25 nutrients total)"
  ]
}

search_food

Search foods by name.

Parameters:

  • query (string) — Food name keyword

Example: { "query": "豆腐" }

{
  "count": 20,
  "foods": [
    {
      "id": 285,
      "name": "豆腐",
      "energy_kcal": 81,
      "protein_g": 8.1,
      "fat_g": 3.7,
      "carbohydrate_g": 3.8
    },
    {
      "id": 286,
      "name": "豆腐(北)",
      "energy_kcal": 98,
      "protein_g": 12.2,
      "fat_g": 4.8,
      "carbohydrate_g": 1.5
    }
  ]
}

get_nutrition

Get full nutrition data for a food by ID (from search_food).

Parameters:

  • food_id (number) — Food ID

Example: { "food_id": 579 }

{
  "id": 579,
  "name": "鸡蛋(白皮)",
  "energy": 138,
  "protein": 12.7,
  "carbohydrate": 1.5,
  "fat": 9,
  "water": 75.8,
  "fiber": 0,
  "ash": 1,
  "vitamin_a": 310,
  "carotene": 0,
  "retinol_equivalent": 310,
  "vitamin_b1": 0.09,
  "vitamin_b2": 0.31,
  "niacin": 0.2,
  "vitamin_c": 0,
  "vitamin_e": 1.23,
  "potassium": 98,
  "sodium": 94.7,
  "calcium": 48,
  "magnesium": 14,
  "iron": 2,
  "manganese": 0.03,
  "zinc": 1,
  "copper": 0.06,
  "phosphorus": 176,
  "selenium": 16.55,
  "unit": 100
}

compare_foods

Compare nutrition of 2-5 foods side by side.

Parameters:

  • food_ids (number[]) — Array of 2-5 food IDs

Example: { "food_ids": [579, 580, 586] }

{
  "unit": 100,
  "foods": [
    { "id": 579, "name": "鸡蛋(白皮)", "energy": 138, "protein": 12.7, "fat": 9, "..." : "..." },
    { "id": 580, "name": "鸡蛋(红皮)", "energy": 156, "protein": 12.8, "fat": 11.1, "..." : "..." },
    { "id": 586, "name": "鸡蛋黄", "energy": 328, "protein": 15.2, "fat": 28.2, "..." : "..." }
  ]
}

filter_by_nutrient

Filter foods by nutrient range.

Parameters:

  • nutrient (string) — One of: energy, protein, carbohydrate, fat, water, fiber, ash, vitamin_a, carotene, retinol_equivalent, vitamin_b1, vitamin_b2, niacin, vitamin_c, vitamin_e, potassium, sodium, calcium, magnesium, iron, manganese, zinc, copper, phosphorus, selenium
  • min (number, optional) — Minimum value (inclusive)
  • max (number, optional) — Maximum value (inclusive)
  • limit (number, optional) — Max results, default 20
  • sort ("asc" | "desc", optional) — Sort order, default "desc"

Example: { "nutrient": "protein", "min": 30, "sort": "desc", "limit": 3 }

{
  "nutrient": "protein",
  "count": 3,
  "foods": [
    { "id": 875, "name": "骆驼掌", "protein": 72.8 },
    { "id": 899, "name": "曼氏无针乌贼", "protein": 65.3 },
    { "id": 959, "name": "墨鱼(干)", "protein": 65.3 }
  ]
}

License

MIT