Content
# rakuten-pantry-mcp
[mrslbt/rakuten-mcp](https://github.com/mrslbt/rakuten-mcp) based MCP server for Rakuten Ichiba.
Additional features not available in the upstream (npm's `rakuten-mcp`) are implemented.
## Additional Features (not in upstream)
| Field / Feature | Description |
|------------------|------|
| `quantity` | Parse total quantity from item name (e.g., `24 bottles × 2 cases` → 48) |
| `unitPrice` | `itemPrice ÷ quantity` |
| `postageLabel` | `Free shipping` / `Shipping separate` / `To be confirmed` |
| `estimatedTotalPrice` | `itemPrice` when free shipping |
| `shippingVerified` | Whether shipping cost is confirmed on API |
| `compare_ichiba_value` | Guide prompt for unit price comparison and shipping confirmation |
See [CHANGES.md](CHANGES.md) for detailed modifications. Patches for upstream are in [patches/](patches/).
## Repository Structure
```
rakuten-pantry-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server assembly
│ ├── client.ts # Rakuten API client
│ ├── config.ts / errors.ts / i18n.ts / auth.ts
│ ├── tools/
│ │ ├── ichiba.ts # ★ Main modification (5 tools)
│ │ ├── index.ts
│ │ ├── types.ts
│ │ └── meta.ts
│ ├── prompts/
│ │ ├── ichiba.ts # ★ compare_ichiba_value
│ │ ├── schema.ts # ★ Prompt argument type conversion
│ │ └── index.ts
│ ├── transports/ # stdio / HTTP
│ └── resources/
├── test/ # ichiba / prompts / http tests
├── patches/ # Upstream patches
├── dist/ # Build artifacts (npm run build)
├── package.json
├── README.md
├── CHANGES.md
├── AGENTS.md
└── LICENSE
```
Only 5 Ichiba tools (excluding Books, Travel, Recipe, Kobo, and GORA). `resources/` is currently unused (empty registry).
## Setup
```bash
git clone https://github.com/yukin_co/rakuten-pantry-mcp.git
cd rakuten-pantry-mcp
npm install
npm run build
```
## MCP Client Configuration
Environment variables `RAKUTEN_APP_ID` and `RAKUTEN_ACCESS_KEY` are required (obtainable from [Rakuten Developer](https://webservice.rakuten.co.jp/)).
### Using Local Clone
Specify the absolute path to `dist/index.js` in `args`.
```json
{
"mcpServers": {
"rakuten-pantry": {
"command": "node",
"args": ["/path/to/rakuten-pantry-mcp/dist/index.js"],
"env": {
"RAKUTEN_APP_ID": "your-app-id",
"RAKUTEN_ACCESS_KEY": "your-access-key"
}
}
}
}
```
### Using npx (after npm publication)
```json
{
"mcpServers": {
"rakuten-pantry": {
"command": "npx",
"args": ["-y", "rakuten-pantry-mcp"],
"env": {
"RAKUTEN_APP_ID": "your-app-id",
"RAKUTEN_ACCESS_KEY": "your-access-key"
}
}
}
}
```
> Note that npm's `rakuten-mcp` (from [mrslbt/rakuten-mcp](https://github.com/mrslbt/rakuten-mcp)) is a separate package. Specify `rakuten-pantry-mcp` above.
## Tools (5)
| Tool | Description |
|--------|------|
| `ichiba_item_search` | Keyword search (with quantity, unit price, and shipping flag) |
| `ichiba_genre_search` | Genre tree |
| `ichiba_tag_search` | Tag reference |
| `ichiba_item_ranking` | Best-selling rankings |
| `ichiba_product_search` | Cross-store price comparison |
## Prompts (1)
| Prompt | Description |
|------------|------|
| `compare_ichiba_value` | Procedure for unit price comparison and shipping confirmation |
## Development
```bash
npm run typecheck
npm test
npm run build
```
## License
MIT — Original: [mrslbt/rakuten-mcp](https://github.com/mrslbt/rakuten-mcp) (MIT)