{
  "markdown": "# Food Near Me — MCP Server\n\n> **Model Context Protocol server for AI-native restaurant discovery** — three-tier search (verified → menu_indexed → discovered), Menu Protocol menus, and structured menu validation. Plug into Claude Desktop, Cursor, ChatGPT, or any MCP host in about 30 seconds.\n\n[![MCP Registry](https://img.shields.io/badge/MCP-me.foodnear%2Ffoodnear--me-blue)](https://registry.modelcontextprotocol.io/v0.1/servers?search=me.foodnear/foodnear-me)\n\n**Production endpoint:** `https://foodnear.me/mcp` · **8 tools** · **4 resources** · **3 prompts** · **No API key** (beta)\n\n---\n\n## Quick start {#quick-start}\n\n### 1. Add this to your MCP host config\n\n**Cursor** — `~/.cursor/mcp.json` (macOS/Linux) or `%USERPROFILE%\\.cursor\\mcp.json` (Windows)\n\n**Claude Desktop** — `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS), `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows)\n\n```json\n{\n  \"mcpServers\": {\n    \"foodnear-me\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-remote\", \"https://foodnear.me/mcp\"]\n    }\n  }\n}\n```\n\n### 2. Restart your MCP host\n\n### 3. Try a prompt\n\n> “Find vegan Thai restaurants near Brooklyn Bridge and show me a menu for the top result.”\n\nYour agent should call `search_restaurants` → `get_menu` (or `get_restaurant` first).\n\n---\n\n## What you get\n\n### Tools (8)\n\n| Tool | Description |\n|------|-------------|\n| `search_restaurants` | Three-tier geo search by `lat`/`lng` — verified → menu_indexed → discovered; check `menu_available` before `get_menu` |\n| `get_restaurant` | Restaurant profile with Schema.org JSON-LD + Menu Protocol extensions |\n| `get_menu` | Full Menu Protocol v1.0 menu (dietary flags, allergens, signatures) |\n| `get_ado_score_breakdown` | ADO score factors and improvement recommendations |\n| `validate_menu_protocol` | Validate a Menu Protocol JSON payload before publish |\n| `explore_area_for_diet` | Composite: bucketed neighborhood overview (`verified` / `menu_indexed` / `discovered`); optional `dietary` filter narrows the verified tier only |\n| `compare_restaurants_for_diet` | Composite: compare 2–5 known restaurants by dietary-eligible menu items and trust tier ranking |\n| `find_restaurants_along_route` | Composite: route-adjacent restaurant discovery between origin/destination with optional dietary ranking |\n\n### Resources (4)\n\n| URI | Content |\n|-----|---------|\n| `foodnearme://spec/menu-protocol` | Menu Protocol v1.0 specification |\n| `foodnearme://spec/openapi` | OpenAPI 3.1 spec pointer |\n| `foodnearme://agent/skill` | Agent skill summary |\n| `foodnearme://examples/search-flow` | Example search → menu flow |\n\n### Prompts (3)\n\n| Prompt | Args | Guides agent to |\n|--------|------|-----------------|\n| `find_dinner_near_me` | `location` (required), `cuisine?`, `dietary?` | `search_restaurants` → `get_menu` |\n| `dietary_constrained_menu` | `restaurant_id`, `restrictions` | `get_menu` with explicit MP flags/allergens |\n| `validate_my_menu` | `strict?` (`true` for strict mode) | `validate_menu_protocol` |\n\n---\n\n## Configuration\n\n| Setting | Value |\n|---------|--------|\n| **MCP URL** | `https://foodnear.me/mcp` |\n| **Transport** | HTTP JSON-RPC (`POST`); discovery via `GET /mcp` |\n| **Auth** | None during beta (rate limits apply) |\n| **Registry** | `me.foodnear/foodnear-me` ([official MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=me.foodnear/foodnear-me)) |\n\n**Preview / local:** Replace the URL with `http://localhost:3000/mcp` when running `npm run dev` in `apps/web`.\n\n**Operational tool filter:** set `FNM_MCP_ENABLED_TOOLS=search_restaurants,get_menu` to expose only a comma-separated subset in `tools/list` and `GET /mcp`. Leave unset or `*` to expose all tools. This is for temporary degradation/context control, not privacy or auth.\n\n---\n\n## Architecture\n\n```\n┌─────────────────────┐     POST /mcp (JSON-RPC)     ┌─────────────────────────┐\n│  MCP host           │ ────────────────────────────▶│  apps/web/app/mcp       │\n│  (Cursor / Claude)  │     GET /mcp (discovery)     │  Next.js route handler  │\n└─────────────────────┘                              └────────────┬────────────┘\n                                                                │\n                                                                ▼\n                                                   ┌─────────────────────────┐\n                                                   │  Supabase + PostGIS     │\n                                                   │  Menu Protocol (MP)     │\n                                                   └─────────────────────────┘\n```\n\nImplementation: [`apps/web/app/mcp/route.ts`](apps/web/app/mcp/route.ts) · Flow runner: [`apps/web/lib/mcp/mcp-flow-runner.ts`](apps/web/lib/mcp/mcp-flow-runner.ts)\n\n---\n\n## Tool error contract\n\nFailed `tools/call` responses include structured metadata in `_meta.error`:\n\n| Field | Meaning |\n|-------|---------|\n| `code` | `VALIDATION_ERROR` · `NOT_FOUND` · `UPSTREAM` · `RATE_LIMITED` · `UNKNOWN` |\n| `message` | What went wrong |\n| `hint` | How to fix the request |\n| `retryable` | Whether the agent should retry |\n| `docs` | https://foodnear.me/docs#quick-start |\n\nHuman-readable text is still in `content[0].text` for hosts that ignore `_meta`.\n\n---\n\n## Verify\n\nFrom repo root (with `apps/web` dev server running for localhost):\n\n```bash\n# Automated agent flows (14 flows when Supabase + seed configured; 11 without DB)\nnpm run test:mcp-flows\n\n# Against production\nnpm run test:mcp-flows:http\n\n# Discovery GETs + MCP tools/list count\nnpm run smoke:mcp\n\n# Three-tier trust model copy parity (local files)\nnpm run check:discovery-copy\n\n# Full deploy gate (13 checks + discovery copy on production URL)\nnpm run preflight -w web\n# or: ./apps/web/scripts/deploy-preflight.sh https://foodnear.me\n```\n\n**Production monitoring:** GitHub Actions workflow `MCP Production Smoke` runs `smoke:mcp` daily and on manual dispatch (`.github/workflows/mcp-smoke.yml`).\n\n---\n\n## Agent discovery\n\n| File | URL |\n|------|-----|\n| `llms.txt` | https://foodnear.me/llms.txt |\n| `llms-full.txt` | https://foodnear.me/llms-full.txt |\n| MCP manifest | https://foodnear.me/.well-known/mcp-server.json |\n| AgentRoot | https://foodnear.me/.well-known/agentroot.json |\n| Skill file | https://foodnear.me/SKILL.md |\n| OpenAPI | https://foodnear.me/openapi.json |\n| Web quick reference | https://foodnear.me/docs |\n\nScripted flows: [`apps/web/docs/example-agent-flows.md`](apps/web/docs/example-agent-flows.md)\n\n---\n\n## Data trust model (three-tier search)\n\n- `search_restaurants` returns **verified** → **menu_indexed** → **discovered**.\n- Every result includes `verification_status` and `menu_available`. Call `get_menu` only when `menu_available` is true.\n- **Verified** — owner-approved MP; authoritative for dietary/allergen claims.\n- **menu_indexed** — automated/public MP menu; cite with caveat — not owner-verified.\n- **discovered** — place only; do not cite menu items.\n- Trust progression: `discovered` → `menu_indexed` → `verified`. See https://foodnear.me/attribution for data sources.\n\n---\n\n## FAQ\n\n**Do I need an API key?**  \nNo for beta MCP access. Future paid tiers may use API keys or x402 (USDC on Base). See `x402-prepaid-spec.md` in your local `docs/Food Near Me` playbook.\n\n**Tools not showing after restart?**  \nConfirm the config URL ends with `/mcp`. Restart the host completely. Run `npm run smoke:mcp` against your target base URL.\n\n**Empty search results?**  \nBeta verified menus are seeded for specific metros (e.g. Williamsburg, NYC). **7 `menu_indexed`** restaurants in Williamsburg have automated menus from website ingest. Discovered place listings cover many US metros — use coordinates in an imported region. Demo coords: `40.7128, -74.006`. Run `npm run db:seed -w web` locally for verified test data.\n\n**Cursor vs Claude config path?**  \nSee Quick start above — each host uses a different JSON file; only the `mcpServers` block matters.\n\n**How is this different from DoorDash / Uber Eats APIs?**  \nWe expose **owner-verified Menu Protocol** data for agents — not scraped aggregator menus or ordering checkout.\n\n---\n\n## Monorepo layout\n\nThis repository ships the MCP server inside the `foodnear.me` web app:\n\n| Path | Purpose |\n|------|---------|\n| [`apps/web`](apps/web) | Next.js app — **MCP at `/mcp`**, landing, API routes |\n| [`packages/menu-protocol`](packages/menu-protocol) | Menu Protocol schema + validators |\n| [`database`](database) | Migrations, seeds, schema |\n| [`server.json`](server.json) | Official MCP Registry metadata |\n\nBusiness strategy and runbooks live in a **separate local docs folder** (not in this repo) — see your team's `docs/Food Near Me` playbook.\n\n---\n\n## Development\n\n```bash\nnpm install\ncd apps/web && cp .env.example .env.local   # Supabase keys\nnpm run dev                                 # http://localhost:3000\nnpm run test:mcp-flows                      # POST localhost:3000/mcp\n```\n\n### Operator: `menu_indexed` website ingest\n\nPromote **discovered** → **menu_indexed** via free website/ordering-platform parsers (ChowNow API, order.online, Sauce, Squarespace, BentoBox, Toast, Playwright). **Always dry-run first** — headless is slow.\n\n```bash\ncd apps/web\nnpm run db:probe:menu-batch -- --headless --limit=10\nnpm run db:import:menu-indexed:website:headless:dry-run -- --limit=10\nnpm run db:import:menu-indexed:website:headless -- --limit=10   # live\n```\n\nNo Uber Eats / DoorDash / Grubhub / RapidAPI scrapers. See [`apps/web/docs/example-agent-flows.md`](apps/web/docs/example-agent-flows.md).\n\n---\n\n## Links\n\n- **Website:** https://foodnear.me  \n- **GitHub:** https://github.com/food-near-me/platform  \n- **Menu Protocol spec:** https://github.com/foodnearme/menu-protocol  \n- **Support:** https://foodnear.me/support · api@foodnear.me\n",
  "bytes": 9788,
  "sha": "28b22855131f0a0c6a8b042ba5db6fa3a1d85b0097af5d160b325f9174690d99",
  "repo_slug": "food-near-me/platform",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_me_foodnear_foodnear_me_87e9d313/readme"
}