Skip to main content
Glama
MealCP

MealCP MCP

Official
by MealCP

MealCP MCP

面向 MealCP 的官方 Model Context Protocol 服务器——为 AI 智能体提供的杂货与食品数据层。

通过 MealCP 公共 API 暴露两个工具:

  • search_products — 按关键词搜索杂货产品目录,支持分面过滤(国家、零售商、连锁店、品牌、标签、类别、城市、价格区间、排序、分页)。

  • get_price_history — 单个产品在日期范围内的聚合价格历史统计(最低/最高/平均/首价/末价、净变化)。

要求

  • Python 3.10+

  • 来自 MealCP 的 API 密钥(每次工具调用消耗 1 个积分)

Related MCP server: Swissgroceries MCP

使用方法

使用 uv 直接运行:

uvx mealcp-mcp

或安装:

pip install mealcp-mcp
mealcp-mcp

服务器通过 stdio 使用 MCP 协议通信;任何 MCP 主机(Claude Desktop、opencode、Cursor 等)都可以启动它。

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"
      }
    }
  }
}

配置

变量

默认值

描述

MEALCP_API_URL

http://localhost:8000

MealCP API 的基础 URL

MEALCP_API_KEY

(无)

每次请求都会发送的 X-API-Key

错误

工具错误会暴露 API 的稳定错误令牌,格式为 <code>: <message>(例如 not_found: Product not found)。请根据代码进行分支判断,切勿依赖消息内容。

契约

响应模型由 API 的 OpenAPI 规范(contract/openapi.json,当前版本 0.1.0)生成。刷新方式:

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

开发

uv sync
uv run pytest
uv run ruff check .

许可证

MIT

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server for real-time Swiss grocery shopping that searches and compares products across 8 major Swiss retailers (Migros, Coop, Aldi, Denner, Lidl, Farmy, Volgshop, Otto’s), normalizes per-unit prices, surfaces promotions, computes optimal multi-store shopping plans, and works with any MCP-compatible client without API keys or accounts.
    7
    95
    27
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Kroger MCP — grocery products, prices, and store locations (developer.kroger.com)

  • Federated commerce search across independent WooCommerce merchants. Keyless, read-only MCP server.

  • Track prices & price history on any online shop, with alerts and an API

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MealCP/mealcp-mcp-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server