nomgacha-mcp
# NomGacha MCP Server
Official **Model Context Protocol (MCP)** server for **[NomGacha](https://nomgacha.com/)** — the free, zero-login browser trading card game and Daily Calorie Raid Boss challenge powered by curated real-world nutrition data from Open Food Facts.
> **Official MCP Guide & Live Setup**: [https://nomgacha.com/mcp/](https://nomgacha.com/mcp/)
> **Play Free in Browser**: [https://nomgacha.com/](https://nomgacha.com/) · [Collection Dex](https://nomgacha.com/dex/) · [Daily Raid Boss](https://nomgacha.com/raid/)
---
## Features (Zero API Key Required)
All tools run directly against NomGacha's public Series 01 dataset (`https://nomgacha.com/data/cards.min.json`, 224 studio-clean Open Food Facts cards) with in-memory caching and zero authentication required.
### Tools (6)
| Tool | Description |
| --- | --- |
| `search_food_cards` | Search & filter all 224 Series 01 cards by keyword, rarity (`N–UR`), Nutri-Score (`A–E`), category, country, kcal range, or `Healthy Counter ×1.5` eligibility. |
| `get_food_card` | Inspect a single card by barcode ID, serial number (`#001–#224`), or name — with exact per-100g nutrition, transparent `ATK`/`DEF` equation breakdown, and Open Food Facts links. |
| `open_booster_pack` | Simulate ripping 1–10 Standard or 10-Pack Mythic Gold Pity booster packs using exact production slot weights, returning pulled cards and a live `nomgacha.com/share/` URL. |
| `get_daily_raid_boss` | Deterministically compute today's (or any UTC date's) global Daily Calorie Raid Boss, Boss HP, UTC reset countdown, and top Healthy Counter picks. |
| `simulate_raid_battle` | Draft up to 5 cards (or auto-pick the optimal Healthy Counter squad) to simulate a full 5-turn Raid Boss battle with `×1.5 CRIT` math and a copyable Wordle-style grid. |
| `calculate_nutrition_card_stats` | Convert *any* real-world snack's per-100g nutrition label into official NomGacha `ATK`, `DEF`, estimated Rarity, Raid damage, and closest Series 01 rivals. |
### Resources (2) & Prompts (2)
- **Resources**: `nomgacha://series01/overview` (live pool stats & leaders), `nomgacha://rules/formulas` (exact ATK/DEF/Raid/Drop-Rate specs)
- **Prompts**: `daily_raid_strategy`, `rate_my_snack`
---
## Quick Start (`stdio`)
### Option A: Run via `npx` (Recommended after npm publish)
Add this to your **Claude Desktop**, **Cursor**, **Windsurf**, or generic MCP client configuration:
```json
{
"mcpServers": {
"nomgacha": {
"command": "npx",
"args": ["-y", "nomgacha-mcp-server"]
}
}
}
```
### Option B: Run Locally from Source
```bash
git clone https://github.com/double2dev/nomgacha-mcp.git
cd nomgacha-mcp
npm install
npm run build
```
Then point your MCP client to the compiled entry point:
```json
{
"mcpServers": {
"nomgacha": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/mcp-server/dist/index.js"],
"env": {
"NOMGACHA_DATA_URL": "https://nomgacha.com/data/cards.min.json"
}
}
}
}
```
### Environment Variables (All Optional)
See [`.env.example`](./.env.example):
- `NOMGACHA_DATA_URL` — Custom URL for `cards.min.json` (default: `https://nomgacha.com/data/cards.min.json`)
- `NOMGACHA_DATA_PATH` — Absolute path to a local `cards.min.json` file for offline usage
- `NOMGACHA_CACHE_TTL_SEC` — In-memory dataset cache TTL in seconds (default: `3600`)
### Remote Transport Note (Streamable HTTP / SSE)
This package defaults to local `stdio` transport so it runs with **zero hosting cost** and zero rate limits on any developer's machine. If you want to expose a hosted remote MCP endpoint in the future, wrap `registerNomGachaTools` and `registerNomGachaResourcesAndPrompts` inside `@modelcontextprotocol/sdk`'s `StreamableHTTPServerTransport` on Node.js or Cloudflare Workers.
---
## Attribution & License
- **Code License**: MIT
- **Nutrition Data**: Curated from [Open Food Facts](https://world.openfoodfacts.org/) under ODbL 1.0 / CC-BY-SA 3.0.
- **Disclaimer**: NomGacha is strictly an entertainment trading card game — not medical, dietary, or health advice.
TDQS
Scored across 6 tools
Each tool targets a clearly distinct resource and action: card lookup, card search, pack opening, daily boss retrieval, battle simulation, and stat conversion. The closest pair, get_food_card and calculate_nutrition_card_stats, is well separated by existing-card retrieval versus arbitrary food-label conversion.
All tool names use consistent snake_case with a leading verb and descriptive noun phrase. The pattern is predictable across all six tools, with only natural variation like get_daily_raid_boss versus get_food_card.
Six tools is well-scoped for a TCG simulation server, covering card discovery, pack opening, raid content, battle simulation, and stat conversion without bloat. Each tool clearly earns its place in the core game loop.
The surface covers the key workflows: searching and retrieving cards, opening packs, checking daily raid bosses, simulating battles, and converting real nutrition into card stats. Minor gaps exist around set metadata, filter discovery, or saved player/collection state, but agents can work around them.