MealCP MCP
Official Model Context Protocol server for MealCP — the grocery & food data layer for AI agents.
Exposes two tools over the MealCP public API:
search_products— search the grocery product catalog by keyword with faceted filtering (country, retailer, chain, brand, tag, category, city, price range, sort, pagination).get_price_history— aggregated price-history stats (min/max/avg/first/ last, net change) for one product over a date range.
Requirements
- Python 3.10+
- An API key from MealCP (each tool call consumes 1 credit)
Usage
Run directly with uv:
uvx mealcp-mcp
Or install:
pip install mealcp-mcp
mealcp-mcp
The server speaks MCP over stdio; any MCP host (Claude Desktop, opencode, Cursor, …) can spawn it.
Claude Desktop
{
"mcpServers": {
"mealcp": {
"command": "uvx",
"args": ["mealcp-mcp"],
"env": {
"MEALCP_API_URL": "https://api.mealcp.com",
"MEALCP_API_KEY": "mcp_live_your_key_here"
}
}
}
}
opencode
{
"mcp": {
"mealcp": {
"type": "local",
"command": ["uvx", "mealcp-mcp"],
"enabled": true,
"environment": {
"MEALCP_API_URL": "https://api.mealcp.com",
"MEALCP_API_KEY": "mcp_live_your_key_here"
}
}
}
}
Configuration
| Variable | Default | Description |
|---|---|---|
MEALCP_API_URL |
http://localhost:8000 |
Base URL of the MealCP API |
MEALCP_API_KEY |
(none) | X-API-Key sent with every request |
Errors
Tool errors surface the API's stable error tokens, formatted
<code>: <message> (e.g. not_found: Product not found). Branch on the code,
never the message.
Contract
Response models are generated from the API's OpenAPI spec
(contract/openapi.json, currently version 0.1.0). Refresh with:
uvx --from datamodel-code-generator datamodel-codegen \
--input contract/openapi.json \
--output src/mealcp_mcp/models.py \
--output-model-type pydantic_v2.BaseModel \
--target-python-version 3.10 --disable-timestamp
Development
uv sync
uv run pytest
uv run ruff check .
License
MIT
Metadata
Release files for mealcp-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mealcp_mcp-0.1.1.tar.gz | 8.6 kB | Without provenance | Details for mealcp_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mealcp_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mealcp_mcp-0.1.1-py3-none-any.whl |
Total release size: 17.0 kB
Release files / mealcp_mcp-0.1.1.tar.gz
| Download URL | mealcp_mcp-0.1.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75b974117d025593ced8add6272add0378799c69185988a79a585558aa1e26f7
|
|
BLAKE2b-256 checksum How to use checksums |
faf376f5db1a747f8b48fa7683b197416f4eb709a7b4492612f3609feb47e28d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mealcp_mcp-0.1.1-py3-none-any.whl
| Download URL | mealcp_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bbfdb0564ed62e2e2d5aa2b7ff31f7eef2d3c56b72db2faad638e3c20256853
|
|
BLAKE2b-256 checksum How to use checksums |
13c83da9d5e05e826e0a4b84559c902424f68c6291167ce2ece8c8028e388e13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mealcp-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.