{
  "markdown": "# ⛩️ Torii Gate\n\n**Japanese data tools for AI agents.**\n\nJapan has a wealth of clean, public, factual data — food composition tables, corporate registries, laws, land prices. Almost none of it is usable by AI agents: no clean APIs, Japanese-only interfaces, Excel files behind web forms. Meanwhile, agents worldwide get asked to do Japanese tasks every day.\n\nTorii Gate is the gateway: each dataset becomes a remote [MCP](https://modelcontextprotocol.io) server that any agent can discover, connect to, and call.\n\n## Tools\n\n| Tool | Description | Endpoint |\n|------|-------------|----------|\n| **Japan Food DB** | Resolve Japanese food names (fuzzy/colloquial forms included) to nutrition facts per 100g, based on the official Standard Tables of Food Composition in Japan. Covers foods USDA and Open Food Facts don't. | `/mcp/food-db` |\n\nMore tools are on the way — corporate registry lookup, invoice registration checks, subsidy search. The platform is manifest-driven: adding a tool is one directory and one registry line.\n\n## Connect from an MCP client\n\nAdd the remote server to your client (Claude Code example):\n\n```sh\nclaude mcp add --transport http japan-food-db https://toriigate.dev/mcp/food-db\n```\n\nThen ask things like *\"「セブンのサラダチキン」的な鶏むね肉のカロリーは?\"* — the agent calls `search_food` / `get_nutrition` and gets factual data with sources attached.\n\nNo API key is needed for the free tier (rate-limited).\n\n## Run it yourself\n\n```sh\nnpm install\nnpm run dev        # local dev server on :8787\nnpm run typecheck\n```\n\nSmoke test:\n\n```sh\ncurl http://localhost:8787/llms.txt\ncurl -X POST http://localhost:8787/mcp/food-db \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/json, text/event-stream' \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"search_food\",\"arguments\":{\"query\":\"ごはん\"}}}'\n```\n\n## Architecture\n\n- **Cloudflare Workers + Hono + MCP SDK** (Streamable HTTP, stateless)\n- **Manifest-driven**: each tool lives in `src/tools/<name>/` and declares its MCP tools, pricing, and data sources in a manifest. `llms.txt` and MCP Registry `server.json` records are generated from manifests — never hand-written.\n- **Funnel metering built in**: discovery → connect → call events are recorded for every tool.\n- **Budget-guarded by design**: runs on the Workers free plan, whose hard request cap fails closed instead of billing.\n\n## Data principles\n\n1. Records hold facts only — names, numbers, source URL, retrieval date. No copyrighted text or images.\n2. Public/government data forms the base layer; every record carries its source and license.\n3. Every response includes a disclaimer: reference values only, never for medical, allergy, or other critical decisions.\n4. Takedown requests are honored immediately.\n\nFull datasets are imported at deploy time and are not part of this repository.\n\n## The experiment\n\nThis platform is built and operated almost entirely by AI agents — planning, code, registry publishing, monitoring, and weekly funnel reports — with a human in the loop only for publish/kill approvals and a budget review. It is an open experiment in whether an AI-operated business unit can find real agent-to-agent demand. Funnel numbers and decisions will be published as we go.\n\n## License\n\n[MIT](LICENSE)\n",
  "bytes": 3264,
  "sha": "8d174d603dc39a55821a2a0dfecb401573e3aa807144c23c09f6c582ddc280ec",
  "repo_slug": "yuki00yossi/toriigate-platform",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_dev_toriigate_food_db_2b370fa6/readme"
}