salling-food-waste-mcp
by Kristoffer88
README.md
# Salling Food Waste MCP Server
Find discounted food waste from Danish supermarkets (Salling Group) via the [Model Context Protocol](https://modelcontextprotocol.io/).
**Live endpoint:** `https://salling-food-waste-mcp-production.up.railway.app/mcp`
## Tools
| Tool | Description |
|------|-------------|
| `search_food_waste` | Find nearby stores with clearance items. Accepts ZIP code, GPS coordinates, or Danish address. |
| `get_store_food_waste` | Get all discounted products for a specific store by Salling store ID. |
## Connect to your AI assistant
### ChatGPT
Requires Plus, Team, Business, Enterprise, or Education plan with Developer Mode enabled.
1. In a chat, click the **"+"** icon in the input area
2. Select **"Developer Mode"**
3. Click **"Add sources"**
4. Enter the server URL:
```
https://salling-food-waste-mcp-production.up.railway.app/mcp
```
5. Check **"I trust this application"** and click **Create**
### Claude.ai
Requires Pro, Max, Team, or Enterprise plan.
1. Go to **Settings > Connectors** ([direct link](https://claude.ai/settings/connectors))
2. Click **"Add custom connector"**
3. Enter the server URL:
```
https://salling-food-waste-mcp-production.up.railway.app/mcp
```
4. Click **Add**
5. In chat, click the **Search and Tools** icon to enable the connector
### Claude Desktop
#### Option A: Connectors UI (recommended)
Same as Claude.ai above — open **Settings > Connectors > Add custom connector** and enter the URL.
#### Option B: Config file
Edit your config file:
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"madspild": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://salling-food-waste-mcp-production.up.railway.app/mcp"
]
}
}
}
```
Restart Claude Desktop after saving.
### Claude Code
```bash
claude mcp add --transport http --scope user madspild https://salling-food-waste-mcp-production.up.railway.app/mcp
```
Or add to `.mcp.json` in your project:
```json
{
"mcpServers": {
"madspild": {
"type": "http",
"url": "https://salling-food-waste-mcp-production.up.railway.app/mcp"
}
}
}
```
## Rate limits
- **Per client:** 10 requests per minute by default (HTTP 429 with `Retry-After` header)
- **Daily:** Process-local soft cap at 9,500 shared-key requests (Salling API hard limit is 10,000)
- The server respects `Retry-After` headers from the Salling API to avoid quarantine
The hosted endpoint does not accept API keys from clients. Self-hosted operators can explicitly enable `X-Salling-API-Key` overrides with `ALLOW_API_KEY_OVERRIDE=true`, but should do so only on a trusted deployment because the credential passes through that server.
## Self-hosting
Create `.env`:
```
SALLING_API_KEY=your_key_here
POSTHOG_API_KEY=your_posthog_key_here # optional
TRUSTED_CLIENT_IP_HEADER=
TRUSTED_PROXY_HOPS=0
ALLOW_API_KEY_OVERRIDE=false
```
Get a Salling API key at [developer.sallinggroup.com](https://developer.sallinggroup.com/). For direct connections, leave `TRUSTED_CLIENT_IP_HEADER` empty and keep `TRUSTED_PROXY_HOPS=0`. Behind a trusted proxy, configure either an authoritative client-IP header or the number of trusted `X-Forwarded-For` hops. The included Railway deployment trusts Railway's overwritten `X-Real-IP` header.
## Privacy
The server does not enable analytics unless `POSTHOG_API_KEY` is configured. When enabled, it sends request and rate-limit event names with a truncated SHA-256 hash of the client IP as the distinct identifier; it does not send locations, product results, or API keys. API-key overrides are disabled by default.
```bash
npm install
# HTTP mode (for deployment)
npx tsx mcp-server.ts --http
# Stdio mode (for local Claude Desktop/Code)
npx tsx mcp-server.ts
```
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues