About Taiwan Garbage Truck Map
Taiwan Garbage Truck Map is a read-only service for MCP clients, covering garbage-truck stops and arrival information in Taipei, New Taipei, Taichung, and Kaohsiung. It supports location and keyword searches as well as route schedules.
Key features
- 01List supported cities and geographic bounds
- 02Find nearby stops by coordinates
- 03Search stops by district or keyword
- 04Retrieve stop and route schedules
- 05Provide weekly schedules for some cities
Use cases
- 01Find garbage-truck stops near a coordinate
- 02Search collection points by road or district
- 03Check stop order and arrival schedules along a route
- 04Review weekly schedules in New Taipei or Taichung
MCP support
A read-only MCP server exposing city, stop-search, and schedule tools over Streamable HTTP. Results include structured content and a plain-text summary.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://mcp.garbage.yukai.dev/mcpclaude mcp add --transport http dev-yukai-taipei-trash https://mcp.garbage.yukai.dev/mcp{"mcpServers":{"dev-yukai-taipei-trash":{"type":"http","url":"https://mcp.garbage.yukai.dev/mcp"}}}Open in Cursor{"servers":{"dev-yukai-taipei-trash":{"type":"http","url":"https://mcp.garbage.yukai.dev/mcp"}}}Open in VS Code{"mcpServers":{"dev-yukai-taipei-trash":{"type":"http","url":"https://mcp.garbage.yukai.dev/mcp"}}}{"mcpServers":{"dev-yukai-taipei-trash":{"serverUrl":"https://mcp.garbage.yukai.dev/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMETaiwan Garbage Truck Map — MCP Server
Read-only Model Context Protocol server for the garbage-truck dataset powering garbage.yukai.dev. Built on mcp-handler 2.x and @modelcontextprotocol/server 2.x, exposing a single stateless Streamable HTTP endpoint supporting MCP protocol versions 2025-11-25, 2025-06-18, and 2025-03-26.
The server reuses the web app's city adapters (../src/cities), keeping field mappings identical across the site and MCP responses. Data is fetched from the published JSON files (DATA_BASE_URL, defaulting to https://garbage.yukai.dev) and cached in memory for one hour per warm instance. Cities load lazily on demand (note: Taichung's dataset is ~50 MB, taking ~1 s on cold load and ~400 MB RSS in memory).
Tools
| Tool | Purpose |
|---|---|
list_cities | List supported cities, their IDs, and geographic bounding boxes |
find_nearby_points | Find stops within 50–2,000 m of a coordinate, sorted nearest first |
search_points | Search stops in a city by district, village, road, or route keyword |
get_schedule | Retrieve a stop along with every stop on its route in arrival order |
All tools are annotated read-only and return structuredContent alongside a plain-text summary. All times are in Asia/Taipei.
For New Taipei and Taichung (whose open data includes weekday schedules), each stop includes a weekly schedule (collectionType → ISO weekdays, 1=Mon … 7=Sun) and a servesToday boolean computed in Taiwan time. Taipei and Kaohsiung do not publish weekday schedules, so those fields are omitted. Unlike the web app's default "today only" view for Taichung, the MCP server loads adapters in allDays mode so agents can answer questions about any day of the week.
Development
cd mcp
bun install
bun test # query logic + adapter schedule tests
bun run typecheck
bun dev.ts # http://localhost:3939/api/mcp
Test interactively with MCP Inspector:
npx @modelcontextprotocol/inspector
Then connect to http://localhost:3939/api/mcp.
Deployment (Vercel)
This directory is deployed as a standalone Vercel project (taipei-trash-mcp), separate from the GitHub Pages web app. The serverless function is bundled with esbuild at build time (bun run build → api/mcp.js) so that extensionless TypeScript imports in ../src/cities resolve cleanly in Node ESM.
To deploy from the repository root (.vercelignore keeps the upload minimal):
- Import the repository in Vercel and set Root Directory to
mcp. - Leave Include source files outside of the Root Directory enabled (default) so the build can import
../src/cities. - Add the custom domain (
vercel api /v10/projects/<id>/domains -X POST -F name=mcp.garbage.yukai.dev) and configure theCNAMEand_vercelTXTrecords at your DNS provider. - Optional environment variables:
DATA_BASE_URL,MCP_ALLOWED_ORIGINS(comma-separated allowlist for browser clients). - Rate limiting is enforced via a Vercel Firewall rule (
mcp-rate-limit: 60 requests/min per IP on/api/mcpand/mcp).
Production endpoint: https://mcp.garbage.yukai.dev/mcp (also accessible at /api/mcp; fallback https://taipei-trash-mcp.vercel.app). For stdio-only clients, use npx mcp-remote https://mcp.garbage.yukai.dev/mcp.
Discovery Endpoints
/mcp/server-card— MCP Server Card (SEP-2127), served asapplication/mcp-server-card+jsonfrompublic/server-card.json./.well-known/ai-catalog.json— AI Catalog entry pointing to the Server Card (also hosted onhttps://garbage.yukai.dev)./llms.txt— plain-text guide for LLMs.
Directory Listings
-
server.json— the official MCP Registry manifest for this remote-only server. It mirrorspublic/server-card.json(samename,version,title,description, repository and remote URL) so the two never disagree. -
Publish it with the official CLI (namespace
dev.yukai/*requires DNS or HTTP verification ofyukai.dev— GitHub OAuth only grantsio.github.*/*):mcp-publisher validate server.json mcp-publisher login dns --domain yukai.dev --private-key "$PRIVATE_KEY" mcp-publisher publish server.json -
Step-by-step submission notes for the official registry, Smithery, Glama, PulseMCP, mcp.so and awesome-remote-mcp-servers (including the copy to paste and the manual account/DNS steps) live in
docs/mcp-directory-submission.md.
Security Notes
- No authentication: all underlying data is public government open data and every tool is strictly read-only.
- Origin check: requests carrying an
Originheader are rejected with403unless the origin is listed inMCP_ALLOWED_ORIGINS, per the MCP transport specification. Native and server-side clients do not send anOriginheader.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.