{
  "markdown": "# China Fuel Price MCP\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-Server-blue)](https://modelcontextprotocol.io)\n[![Remote](https://img.shields.io/badge/Streamable%20HTTP-hosted%20free-success)](https://mcp.pianam.cn/fuel-mcp/mcp)\n\n**China domestic refined-fuel (gasoline & diesel) prices** for AI agents: query pump prices for 92# / 95# / 98# gasoline and 0# diesel in any of China's 31 provincial-level regions, or get the full national list, plus the next expected price-adjustment window.\n\n- **Try it in 30 seconds**: a free public MCP endpoint is already running — just paste the URL into your MCP client (no install, no API key).\n- **Or self-host**: a small FastMCP server. A bundled static price table (clearly dated) guarantees answers even when no live source is reachable.\n\n## ⚡ Use the hosted endpoint (no setup)\n\n```\nhttps://mcp.pianam.cn/fuel-mcp/mcp\n```\n\nTransport: **Streamable HTTP** (MCP 2025-03-26 compatible). No authentication required.\n\n## 🔌 Client configuration\n\nAdd this to your MCP client's `mcpServers` configuration (Claude Desktop, Cursor, Cline, Cherry Studio, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"fuel\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.pianam.cn/fuel-mcp/mcp\"\n    }\n  }\n}\n```\n\n> Clients that do not accept `\"type\": \"http\"` accept the same entry with just `\"url\"`.\n\n## 🧰 Tools\n\n| Tool | Parameters | Returns |\n|\n\n[![fuel-mcp MCP server](https://glama.ai/mcp/servers/boy-373/fuel-mcp/badges/score.svg)](https://glama.ai/mcp/servers/boy-373/fuel-mcp)\n\n---|---|---|\n| `query_oil_price(province=\"\")` | `province`: optional region name — full (`山东省`), short (`山东`), or one-character abbreviation (`鲁`/`京`). Omit to get all regions. | **Single region**: 92#/95#/98# gasoline and 0# diesel prices (CNY/liter), data date, data source, next adjustment window. **No argument**: prices for all 31 provincial-level regions, with data date and next adjustment window. |\n\n### Examples\n\n- \"山东今天 92 号汽油多少钱？\" → Shandong fuel prices.\n- \"广东油价\" → Guangdong prices.\n- \"全国油价列表\" → all regions.\n\n## 📡 Data\n\n- The server attempts live sources in order (CNPC official site, NDRC announcements, WallStreetCN commodities); when none yields structured data it **falls back to a bundled static price table** whose date is always returned in the response (`data_date` / `data_source` fields).\n- Region names accept full names, short names and traditional one-character abbreviations (京/沪/鲁/粤…).\n- Prices are reference benchmark prices in **CNY per liter**; actual pump prices may vary by station and promotions. **No API key required.**\n\n> Adjust the bundled table (`STATIC_OIL_PRICES` / `STATIC_DATA_DATE` in `fuel_server.py`) to refresh figures between releases.\n\n## 🐢 Self-hosting\n\n```bash\ngit clone https://github.com/boy-373/fuel-mcp.git\ncd fuel-mcp\npip install -r requirements.txt\npython server.py\n# listens on 127.0.0.1:8000 by default; override with:\n#   MCP_HOST=0.0.0.0 MCP_PORT=9000 python server.py\n# behind a reverse proxy, allow your public hostname:\n#   MCP_ALLOWED_HOSTS=\"your-domain.com,your-domain.com:*\" python server.py\n```\n\nThen point your MCP client at `http://127.0.0.1:8000/mcp`.\n\nWith [uv](https://docs.astral.sh/uv/):\n\n```bash\nuv venv && uv pip install -r requirements.txt\nuv run python server.py\n```\n\n## 🗂️ Files\n\n- `fuel_server.py` — the MCP server: price table, province-name normalization, live-source attempts with static fallback, FastMCP tool definition.\n- `server.py` — standalone Streamable HTTP entry point (serves the MCP app at `/mcp`).\n- `requirements.txt` — Python dependencies.\n- `LICENSE` — MIT.\n\n---\n\n## 🇨🇳 中文说明\n\n国内油价 MCP：查询全国 31 个省区市的 **92/95/98 号汽油与 0 号柴油**价格（元/升），支持省名全称、简称与单字别称（鲁→山东、京→北京）；不传省份返回全国列表，并给出下一轮调价窗口预估。\n\n**在线直连（免费、无需 Key）**：`https://mcp.pianam.cn/fuel-mcp/mcp`\n\n联网数据源不可用时自动降级到内置静态油价表（响应中始终标注数据日期与来源）。价格为参考基准价，实际以当地加油站为准。\n\n## 📄 License\n\n[MIT](LICENSE) © 2026 boy-373 (刘扶阳)\n",
  "bytes": 3936,
  "sha": "1de604682448a5b9114e676195a3528799312a57a86dd723df237f5f1b2a43bb",
  "repo_slug": "boy-373/fuel-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_cn_pianam_mcp_fuel_mcp_7390f2b0/readme"
}