dogpolicies-mcp 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +77 -117
  3. package/data/snapshot.json.gz +0 -0
  4. package/docs/architecture.md +1 -1
  5. package/docs/tools.md +160 -82
  6. package/package.json +2 -1
  7. package/server.json +22 -4
  8. package/src/core/index.mjs +1 -1
  9. package/src/core/server.mjs +170 -32
  10. package/src/dogpolicies/feed-urls.mjs +60 -0
  11. package/src/dogpolicies/feeds.mjs +552 -0
  12. package/src/dogpolicies/graph.mjs +45 -12
  13. package/src/dogpolicies/prompts.mjs +19 -13
  14. package/src/dogpolicies/report.mjs +12 -2
  15. package/src/dogpolicies/resources.mjs +5 -1
  16. package/src/dogpolicies/rest.mjs +365 -0
  17. package/src/dogpolicies/server.mjs +33 -3
  18. package/src/dogpolicies/tools/browse-answers.mjs +3 -3
  19. package/src/dogpolicies/tools/change-scope.mjs +257 -0
  20. package/src/dogpolicies/tools/changes-near.mjs +120 -17
  21. package/src/dogpolicies/tools/changes-since.mjs +20 -6
  22. package/src/dogpolicies/tools/common.mjs +489 -163
  23. package/src/dogpolicies/tools/compare-places.mjs +19 -10
  24. package/src/dogpolicies/tools/conditions-source.mjs +88 -0
  25. package/src/dogpolicies/tools/corrections.mjs +121 -0
  26. package/src/dogpolicies/tools/coverage.mjs +358 -0
  27. package/src/dogpolicies/tools/find-hotels.mjs +78 -38
  28. package/src/dogpolicies/tools/get-brand-policy.mjs +4 -3
  29. package/src/dogpolicies/tools/get-place.mjs +62 -6
  30. package/src/dogpolicies/tools/get-rule.mjs +4 -2
  31. package/src/dogpolicies/tools/i5-conditions.mjs +58 -46
  32. package/src/dogpolicies/tools/i5-corridor.mjs +82 -66
  33. package/src/dogpolicies/tools/index.mjs +12 -1
  34. package/src/dogpolicies/tools/invalid.mjs +177 -0
  35. package/src/dogpolicies/tools/names.mjs +241 -0
  36. package/src/dogpolicies/tools/near.mjs +18 -15
  37. package/src/dogpolicies/tools/plan-trip.mjs +231 -29
  38. package/src/dogpolicies/tools/query-words.mjs +178 -0
  39. package/src/dogpolicies/tools/report-correction.mjs +55 -4
  40. package/src/dogpolicies/tools/road-conditions.mjs +745 -0
  41. package/src/dogpolicies/tools/route-stops.mjs +164 -81
  42. package/src/dogpolicies/tools/scope.mjs +52 -9
  43. package/src/dogpolicies/tools/search-places.mjs +198 -31
  44. package/src/dogpolicies/tools/subscribe-changes.mjs +294 -0
  45. package/src/dogpolicies/tools/tolerant.mjs +546 -0
  46. package/src/dogpolicies/trip.mjs +308 -0
  47. package/src/dogpolicies/vendor/closures.mjs +135 -0
  48. package/src/dogpolicies/vendor/match.mjs +25 -0
  49. package/src/dogpolicies/vendor/season.mjs +258 -0
  50. package/src/dogpolicies/vendor/trip-link.mjs +147 -0
  51. package/src/index.mjs +14 -0
  52. package/src/snapshot/build.mjs +29 -8
  53. package/types/index.d.ts +32 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,93 @@ The data inside the package has its own date (`as_of` in every result). A
10
10
  new package version ships a new snapshot; the server also refreshes from the
11
11
  site on its own when the network allows.
12
12
 
13
+ ## 0.5.0 - 2026-11-10
14
+
15
+ The Thanksgiving release (`docs/ROADMAP.md` in the data repository: R-04, R-05, R-11 to R-15, R-26, and slices of
16
+ R-20 and R-21). Plans an assistant can hand over, answers instead of refusals for the words people use, and the I-5
17
+ drive for the holiday.
18
+
19
+ Added
20
+
21
+ - `dogpolicies_plan_trip` returns the plan itself: `days` (for each night the stay, a morning beach, trail or
22
+ off-leash area, an afternoon park and a dinner patio, each a record with its rule, quote, source and verified date;
23
+ a slot the data cannot fill is null with the reason), `plan_stay` (the pet fee per night and in total with the
24
+ arithmetic, and whether the dog's weight and number fit), `plan_notes`, and with `save: true` a `trip_url` to a
25
+ page on dogpolicies.com that carries the whole plan in the link (nothing is stored). New inputs `start_date`,
26
+ `stay_id` and `save`.
27
+ - `dogpolicies_report_correction` answers with a public `ticket` and a `status_url`, and takes an optional `fact`
28
+ (which kind of fact is wrong). The ticket's status (filed, then verified or rejected) is public; what the reporter
29
+ wrote is not.
30
+ - `dogpolicies_changes_since` and `dogpolicies_changes_near` add `corrections`, `corrections_total` and
31
+ `corrections_note` (live on the hosted server; the stdio server answers an empty list with a note). Both are no
32
+ longer memoized.
33
+ - `dogpolicies_route_stops` and `dogpolicies_i5_corridor`: an I-5 rest area Caltrans reports fully closed carries
34
+ `closed_now` (reason, until, source, fetched_at), and the text names the first open stop.
35
+ `dogpolicies_plan_trip`'s I-5 leg skips closed rest areas and lists them as `closed_now_stops`.
36
+ - Airports as places: eighteen California and Nevada airports resolve by code, "<code> airport", name and common
37
+ names in `near`, `plan_trip`, `changes_near` and a `find_hotels` query, with a 5-mile default radius.
38
+ - `resolved_from` on any answer where a word was read as a canonical value ("hotel" as lodging, "NB" as north), and
39
+ `query_read` and `matched_terms` on `dogpolicies_search_places`.
40
+ - `dogpolicies_road_conditions`: chain controls, closures, road weather and sign text right now on I-80, US-50, I-15
41
+ or I-5 in California, by route, mile range, town or named stretch, with the nearest dog stop. Caltrans feed data,
42
+ not rules; stale after two hours, `unavailable` without a document.
43
+ - `dogpolicies_subscribe_changes`: Atom and JSON Feed links that follow a place, a town or a highway's stops for rule
44
+ changes, with 90-day counts and a sentence to hand over; nothing is stored. `dogpolicies_changes_near` takes
45
+ `place_id`, `route`, `from_mile` and `to_mile`, and adds `rule_changes`, `scope_kind` and `page_url`.
46
+ - `today` on place answers for places with seasonal rules (plover seasons, summer beach hours): what applies on the
47
+ server's date, until when, what starts within 14 days, with the source; while a seasonal rule applies it leads
48
+ `answer` and `citation`.
49
+ - `createRestApi`, `restOpenApi`, `operationSlug`, `parseQuery` and `wrapToolHandler`: the read-only tools as HTTP
50
+ operations with their OpenAPI 3.1 fragment, generated from the tool schemas, through the same wrapper every tool
51
+ call uses. `trustSnapshot`: an optional trusted-snapshot path for hosts that build their own data.
52
+
53
+ Changed
54
+
55
+ - Tool descriptions and the server instructions are rewritten around the question a traveler asks, when to call
56
+ each tool and when not to, the accepted input forms and what the answer carries; the prompts and the `about`
57
+ resource follow. Names and schemas are unchanged.
58
+ - Tools accept natural words for enums, booleans, lists, routes, brands, areas, points and dates. Arguments that
59
+ still fail the schema return `outcome: "bad_input"` with the `accepted` values instead of a protocol error. A
60
+ `limit` above the maximum is capped.
61
+ - `dogpolicies_search_places` reads a free-text query ("dog friendly hotels in Carmel") as kind words plus a place,
62
+ and falls back to a labeled partial match. `type` also accepts `rest_area` and `stop`.
63
+ - `dogpolicies_i5_conditions`: when the live read fails, it answers from the last reading, marked stale with its
64
+ age; `unavailable` only when there has never been one.
65
+ - A town name with hyphens ("Carmel-by-the-Sea") resolves.
66
+ - Text queries in `find_hotels` and `search_places` match words from their start: "Reno" no longer finds Moreno
67
+ Valley, while "carm" still finds Carmel.
68
+ - Answers that read live data (`route_stops`, `i5_corridor`, `plan_trip`) are cached five minutes (`cacheTtlMs`).
69
+ - A place outside California and Nevada answers `no_match` with code `out_of_coverage`, naming it, with the closest
70
+ covered towns near the state line; off-topic questions (flights, car rentals, weather) answer code `off_topic` with
71
+ two example questions.
72
+ - `changes_since` and `changes_near`: the corrections read has a two-second deadline.
73
+ - Closures: an end time no date can hold reads "end not set" instead of failing the call.
74
+ - Prompt argument completion offers "Carson City, NV", never "Carson City County, NV".
75
+ - A correction for a place the data does not hold gets no public ticket.
76
+
77
+ Hosted server (dogpolicies.com/mcp/)
78
+
79
+ - Answers no longer wait for the usage tally; a cold start skips a full snapshot validation. Per-tool latency (p50
80
+ and p95 from fixed buckets) is in the private operations summary.
81
+ - The read-only tools are also GET operations at `/api/v1/ask/<operation>`, described in `/api/v1/openapi.json`.
82
+ - `/status/` and `/api/v1/status.json`: the deployed version and commit, the data date, the I-5 conditions age, the
83
+ last re-check, open corrections and the 7-day call tally. The `about` resource links them.
84
+ - Correction tickets at `/corrections/status/<ticket>/` and `/api/v1/corrections.json`.
85
+ - Requests with `?probe=desk-eval` count as our own test traffic.
86
+ - The door: a wildcard, missing or other-case `Accept` gets the full one (was 406); a JSON body sent as `text/plain`,
87
+ with no Content-Type or as `application/json-rpc` is answered (was 415); a client that accepts only JSON gets
88
+ `application/json`; `DELETE /mcp/` (a client ending its session) is a 204 (was 405).
89
+ - Rate limits: Anthropic's published outbound addresses get their own, larger allowance, so Claude users behind the
90
+ proxy no longer share one; a 429 echoes the request id.
91
+ - A call in flight when the engine's Durable Object resets is retried once; a failure is a JSON-RPC 503 with CORS.
92
+ - Change feeds at `/feeds/changes/place|near|route/<scope>.atom` and `.json`, computed per request.
93
+ - Conditions documents for I-80, US-50 and I-15 beside I-5 (`/api/v1/conditions/<route>.json`), from one pass over
94
+ the Caltrans district feeds.
95
+
96
+ Data in this release: four I-5 answer pages for the Thanksgiving drive, four for I-15, I-80 and US-50, an airport
97
+ pet relief areas page, and new verified records (I-5 dog parks, independent I-5 hotels, airport relief areas,
98
+ restaurants that welcome dogs on the patio).
99
+
13
100
  ## 0.4.1 - 2026-11-08
14
101
 
15
102
  The first roadmap release (`docs/ROADMAP.md` in the data repository: R-01,
package/README.md CHANGED
@@ -1,14 +1,10 @@
1
1
  # DogPolicies MCP server
2
2
 
3
- **[dogpolicies.com](https://dogpolicies.com/)** · Verified dog rules for California and Nevada travel, for AI assistants. [Install guide and example](https://dogpolicies.com/mcp/about/).
3
+ **[dogpolicies.com](https://dogpolicies.com/)** · Verified dog rules for California and Nevada travel: hotel pet fees, trip plans, highway stops. [Install guide and example](https://dogpolicies.com/mcp/about/) · [Status](https://dogpolicies.com/status/)
4
4
 
5
- **Listed in Claude's connector directory** since November 4, 2026: [add DogPolicies in Claude](https://claude.ai/directory/dogpolicies) with nothing to install. DogPolicies is independent and not affiliated with Anthropic.
5
+ DogPolicies answers dog-travel questions for California and Nevada, and every fact it returns carries its official source (an agency page or the business's own published policy) and the date it was checked; Nevada coverage is still thin. It does the work a web page cannot: the pet-fee arithmetic for a specific dog, day-by-day trip plans, highway stops in driving order with Caltrans conditions on I-5 right now, what changed since a date, and corrections a person checks.
6
6
 
7
- Ask Claude, Cursor or any MCP client "can my 70 lb dog stay at a Monterey hotel for under $50?", "what can my dog do in Carmel?" or "plan three nights in Tahoe with two dogs" and get an answer with the official source, the date it was checked and a link to the record. No API key, no account, no configuration: the data ships inside the package.
8
-
9
- ```bash
10
- npx dogpolicies-mcp demo
11
- ```
7
+ **Listed in Claude's connector directory** since November 4, 2026: [add DogPolicies in Claude](https://claude.ai/directory/dogpolicies) with nothing to install. Also on npm and in the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.xultrax-web/dogpolicies-mcp). DogPolicies is independent and not affiliated with Anthropic.
12
8
 
13
9
  <!-- mcp-name: io.github.xultrax-web/dogpolicies-mcp -->
14
10
 
@@ -16,114 +12,104 @@ npx dogpolicies-mcp demo
16
12
  [![CI](https://github.com/xultrax-web/dogpolicies-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/xultrax-web/dogpolicies-mcp/actions/workflows/ci.yml)
17
13
  [![license: MIT code, CC BY 4.0 data](https://img.shields.io/badge/license-MIT%20%2B%20CC%20BY%204.0-blue)](#license-and-attribution)
18
14
  [![MCP 2026-07-28](https://img.shields.io/badge/MCP-2026--07--28-black)](https://modelcontextprotocol.io/specification/2026-07-28)
19
- [![Node 20+](https://img.shields.io/badge/node-%3E%3D20.19-brightgreen)](#install)
20
-
21
- ## What it answers
22
-
23
- - Whether dogs are allowed at 2,400+ parks, beaches, trails, hotels, campgrounds, cabin resorts and restaurant patios, with leash rules, restrictions, weight limits and pet fees.
24
- - Which hotel will take _your_ dog: weight, number of dogs, nights and a fee budget, with the fee arithmetic spelled out ("2 dogs x 3 nights x $25 per pet per night = $150, capped at $100 per stay").
25
- - A whole trip in one call: where to stay with this dog, what to do, where to eat, near any town or county.
26
- - Dog-friendly stops along I-5, US-101, Highway 1, I-15, I-80, US-50, US-95 and US-93, in driving order. On I-5 in California, every stop sits on the I-5 centerline (s meters from San Ysidro) with its side, elevation and stretch; the next family stop (restrooms and a pet area stated by the source) in N miles; paired exits; and Caltrans conditions right now.
27
- - Hotel chain pet policies (Motel 6, Red Roof, Kimpton and more) and which properties are exceptions.
28
- - Side-by-side comparisons, and what changed since a date, everywhere or near a town.
29
- - Areas the way travelers name them: East Bay, Lake Tahoe, Big Sur, Yosemite, Death Valley, the Mendocino Coast and the Bay Area's metros, as a filter, a place name in `near` and `plan_trip`, and a resource.
30
-
31
- Every fact comes from an official source (an agency page or the business's own policy) with the date it was checked. Every result starts with a one-line citation and ends with `DogPolicies, dogpolicies.com, CC BY 4.0, verified {date}`. When a source does not state something, the record says "not stated" instead of guessing.
15
+ [![Node 20+](https://img.shields.io/badge/node-%3E%3D20.19-brightgreen)](#connect)
32
16
 
33
- ## Install
17
+ ## Connect
34
18
 
35
- Pick the first one that fits; they all give the same server.
19
+ The hosted server is `https://dogpolicies.com/mcp/`: Streamable HTTP, no key, no account, nothing to install.
36
20
 
37
- ### 1. Claude (claude.ai or Claude Desktop): add the hosted connector, nothing to install
21
+ - **Claude** (claude.ai or Claude Desktop): open [DogPolicies in Claude's connector directory](https://claude.ai/directory/dogpolicies), add it and turn it on in the chat's tools menu. By hand: Settings → Connectors → **Add custom connector**, name **DogPolicies**, URL `https://dogpolicies.com/mcp/`.
22
+ - **Claude Code:** `claude mcp add --transport http dogpolicies https://dogpolicies.com/mcp/`
23
+ - **Cursor and VS Code:** [![Add to Cursor](https://img.shields.io/badge/Cursor-Add_DogPolicies-000000?logo=cursor&logoColor=white)](cursor://anysphere.cursor-deeplink/mcp/install?name=dogpolicies&config=eyJ1cmwiOiJodHRwczovL2RvZ3BvbGljaWVzLmNvbS9tY3AvIn0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_DogPolicies-0098FF?logo=visualstudiocode&logoColor=white)](vscode:mcp/install?%7B%22name%22%3A%22dogpolicies%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdogpolicies.com%2Fmcp%2F%22%7D) Both add the hosted URL; the app asks you to confirm.
24
+ - **Any other client** that connects to a remote MCP server: give it the URL above.
38
25
 
39
- Open [DogPolicies in Claude's connector directory](https://claude.ai/directory/dogpolicies) and add it, then turn it on in the chat's tools menu. Or by hand: Settings → Connectors → **Add custom connector** → name **DogPolicies**, URL `https://dogpolicies.com/mcp/` → Add. No Node.js, no file editing; works on every plan that has connectors.
26
+ To run it on your own machine over stdio instead (the data ships inside the package and works offline; Node.js 20.19 or newer):
40
27
 
41
- ### 2. Claude Desktop: one-click extension
42
-
43
- Download **dogpolicies-mcp-<version>.mcpb** from the [latest release](https://github.com/xultrax-web/dogpolicies-mcp/releases/latest) and open it (double-click, or Claude Desktop → Settings → Extensions → Install Extension). The data is inside; nothing else to install.
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "dogpolicies": { "command": "npx", "args": ["-y", "dogpolicies-mcp"] }
32
+ }
33
+ }
34
+ ```
44
35
 
45
- ### 3. One command, any client
36
+ On Windows write `"command": "cmd", "args": ["/c", "npx", "-y", "dogpolicies-mcp"]`, because clients start commands without a shell. Or let the installer write it:
46
37
 
47
38
  ```bash
48
- npx dogpolicies-mcp install # Claude Desktop (default)
49
- npx dogpolicies-mcp install --client cursor # or vscode | windsurf | claude-code, or --all
50
- npx dogpolicies-mcp install --hosted # the remote URL form instead of a local server
51
- npx dogpolicies-mcp install --dry-run # show what would change, change nothing
39
+ npx dogpolicies-mcp install # Claude Desktop; --client cursor | vscode | windsurf | claude-code, or --all
40
+ npx dogpolicies-mcp install --hosted --dry-run # the URL form instead, previewed without changing anything
41
+ claude mcp add dogpolicies -- npx -y dogpolicies-mcp # Claude Code (Windows: -- cmd /c npx -y dogpolicies-mcp)
52
42
  ```
53
43
 
54
- It finds the client's config on Windows, macOS and Linux, creates the file or the `mcpServers` key if missing, merges one entry without touching other settings, writes a timestamped backup first, refuses (and explains) a file it cannot parse, does nothing the second time, needs no admin rights, and prints the exact restart step. On Windows it writes the form that works (`cmd /c npx ...`). Requires Node.js 20.19 or newer.
44
+ The installer finds the client's config on Windows, macOS and Linux, backs it up, merges one entry without touching other settings, refuses a file it cannot parse and prints the restart step. Claude Desktop also takes the one-click extension, `dogpolicies-mcp-<version>.mcpb`, from the [latest release](https://github.com/xultrax-web/dogpolicies-mcp/releases/latest). `npx dogpolicies-mcp --http --port 3737` serves Streamable HTTP at `http://127.0.0.1:3737/mcp`.
55
45
 
56
- ### 4. One-click buttons (hosted server, no Node.js)
46
+ <details><summary>Config files, by hand</summary>
57
47
 
58
- [![Add to Cursor](https://img.shields.io/badge/Cursor-Add_DogPolicies-000000?logo=cursor&logoColor=white)](cursor://anysphere.cursor-deeplink/mcp/install?name=dogpolicies&config=eyJ1cmwiOiJodHRwczovL2RvZ3BvbGljaWVzLmNvbS9tY3AvIn0=)
59
- [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_DogPolicies-0098FF?logo=visualstudiocode&logoColor=white)](vscode:mcp/install?%7B%22name%22%3A%22dogpolicies%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdogpolicies.com%2Fmcp%2F%22%7D)
60
- [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_DogPolicies-24bfa5?logo=visualstudiocode&logoColor=white)](vscode-insiders:mcp/install?%7B%22name%22%3A%22dogpolicies%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdogpolicies.com%2Fmcp%2F%22%7D)
48
+ - Claude Desktop: Settings → Developer → Edit Config (`%APPDATA%\Claude\claude_desktop_config.json` on Windows, `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS), then fully quit and reopen it.
49
+ - Cursor: `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project; `{ "url": "https://dogpolicies.com/mcp/" }` for the hosted server.
50
+ - VS Code: `~/.copilot/mcp-config.json` with the same block, or `code --add-mcp '{"name":"dogpolicies","type":"stdio","command":"npx","args":["-y","dogpolicies-mcp"]}'`.
51
+ - Windsurf: `~/.codeium/windsurf/mcp_config.json`; `{ "serverUrl": "https://dogpolicies.com/mcp/" }` for the hosted server.
61
52
 
62
- Both buttons add the hosted server at `https://dogpolicies.com/mcp/`; the client asks you to confirm.
63
-
64
- ### 5. Claude Code
53
+ </details>
65
54
 
66
- ```bash
67
- claude mcp add dogpolicies -- npx -y dogpolicies-mcp # macOS, Linux
68
- claude mcp add dogpolicies -- cmd /c npx -y dogpolicies-mcp # Windows
69
- claude mcp add --transport http dogpolicies https://dogpolicies.com/mcp/ # hosted, any OS
70
- ```
55
+ ## What it does
71
56
 
72
- ### 6. By hand
57
+ The tools, by the job they do. Every one except `dogpolicies_report_correction` only reads.
73
58
 
74
- <details><summary>Claude Desktop</summary>
59
+ ### Fit and arithmetic
75
60
 
76
- Settings → Developer → Edit Config (the file is `%APPDATA%\Claude\claude_desktop_config.json` on Windows, `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS). If the file has no `mcpServers` key yet, add one:
61
+ - `dogpolicies_find_hotels`: which hotels take this dog, by weight, number of dogs, nights and a pet-fee budget. Each hotel is a match, a possible (call to confirm) or excluded, with the arithmetic spelled out ("2 dogs x 3 nights x $25 per pet per night = $150, capped at $100 per stay = $100"). Amounts are pet fees, never room rates.
62
+ - `dogpolicies_plan_trip`: a whole stay in one call. Stays that fit, with the pet fee for every night worked out, then the plan day by day: the stay, a morning beach, trail or off-leash area, an afternoon park and a dinner patio, each a real record with its source and date; a slot the data cannot fill is left empty with the reason. `start_date` dates each day, `stay_id` builds the plan on a chosen stay, and `save: true` returns a `https://dogpolicies.com/trips/#v1.…` link that carries the whole plan inside the link, so nothing is stored. Near I-5 it adds the drive leg.
63
+ - `dogpolicies_get_brand_policy`: a hotel chain's published pet policy (Best Western, Extended Stay America, Kimpton, La Quinta, Motel 6, Red Roof), its listed exceptions and how many properties carry it.
77
64
 
78
- ```json
79
- {
80
- "mcpServers": {
81
- "dogpolicies": { "command": "npx", "args": ["-y", "dogpolicies-mcp"] }
82
- }
83
- }
84
- ```
65
+ ### Routes and live state
85
66
 
86
- On Windows use `"command": "cmd", "args": ["/c", "npx", "-y", "dogpolicies-mcp"]`. Then fully quit Claude Desktop (tray icon → Quit on Windows, Cmd+Q on macOS) and reopen it.
67
+ - `dogpolicies_route_stops`: dog stops along a highway in driving order, each with its mile, side and distance off the road: I-5, US-101, Highway 1, I-15, I-80 and US-50 in California; I-15, I-80, US-50, US-95 and US-93 in Nevada. Rest areas with pet areas, travel stops with dog parks, hotels with the stay's pet fee, campgrounds, parks and beaches. On I-5 also family stops (restrooms and a pet area stated by the source) and paired exits.
68
+ - `dogpolicies_i5_corridor`: I-5 in California by named stretch (the Grapevine, the Westside, Shasta and the rest), a mile range or the next miles ahead of a point.
69
+ - `dogpolicies_i5_conditions`: Caltrans lane closures, chain controls, road weather and sign messages on I-5 right now, each placed on the road beside the nearest dog stop. Live state, not rules; it needs the network.
87
70
 
88
- </details>
71
+ A rest area Caltrans reports closed right now carries `closed_now` (Caltrans' reason and end time) in `route_stops`, `i5_corridor` and `plan_trip`, and is never offered as the next stop.
89
72
 
90
- <details><summary>Cursor</summary>
73
+ - `dogpolicies_road_conditions`: Caltrans chain controls, lane and ramp closures, road weather and sign messages right now on I-80, US-50, I-15 and I-5 in California (Donner Summit, Echo Summit, Cajon Pass, the Grapevine), by route, town or named stretch, each at its route mile beside the nearest dog stop. Live state, not rules; Nevada roads are not covered; it needs the network.
91
74
 
92
- `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in a project, same `mcpServers` block as above (Windows: the `cmd /c` form), or `{ "url": "https://dogpolicies.com/mcp/" }` for the hosted server.
75
+ ### Change
93
76
 
94
- </details>
77
+ - `dogpolicies_changes_since`: re-checks and rule changes since a date, newest first; on the hosted server also the corrections filed or decided since then, by ticket and status.
78
+ - `dogpolicies_changes_near`: the same around a town, region or point, for one place (`place_id`) or along a highway's stops (`route`, `from_mile`, `to_mile`), to re-check a trip before you go.
79
+ - `dogpolicies_subscribe_changes`: Atom and JSON Feed links that follow one place, a town or area, or a highway's stops for rule changes, with the last 90 days' counts and a sentence to hand to the traveler; it stores nothing and sends no email.
95
80
 
96
- <details><summary>VS Code</summary>
81
+ ### Comparison and citation
97
82
 
98
- `~/.copilot/mcp-config.json` (what the guided flow calls Global → Copilot Global) with the same `mcpServers` block, or from a terminal:
83
+ - `dogpolicies_near`: everything dog-related near a town, neighborhood, region or airport, nearest first by kind; the usual first call. Names as people say them ("Van Nuys", "the Mission", "Lake Tahoe", "SFO", "LAX airport"); small spelling slips are corrected and labeled.
84
+ - `dogpolicies_search_places`: one named place, or a filtered list by type, county, region, area, dogs allowed or off leash. Free text such as "dog friendly hotels in Carmel" is read as the kind and the place.
85
+ - `dogpolicies_browse_answers`: ready-made answers to common questions ("Which California state parks allow dogs?").
86
+ - `dogpolicies_get_place`: one place in full: every fact with its source URL, publisher, quote and date checked, the rule ids, and what the source does not state.
87
+ - `dogpolicies_compare_places`: two to six places side by side (dogs allowed, leash, where dogs may go, pet fee, weight limit, pets per room), with a citation for each.
88
+ - `dogpolicies_get_rule`: one rule by its stable id, with the quote, source, confidence and verified date.
99
89
 
100
- ```bash
101
- code --add-mcp '{"name":"dogpolicies","type":"stdio","command":"npx","args":["-y","dogpolicies-mcp"]}'
102
- ```
90
+ ### Action
103
91
 
104
- </details>
92
+ - `dogpolicies_report_correction`: files a correction for a person to check against the official source. The answer carries a ticket id and a public status page (`https://dogpolicies.com/corrections/status/<ticket>/`) that shows filed, then verified or rejected, with dates; what the traveler wrote is not shown. Nothing changes until it is verified. The only tool that writes.
93
+ - `dogpolicies_plan_trip` with `save: true`: a trip link to hand over (above).
105
94
 
106
- <details><summary>Windsurf</summary>
95
+ ## Every answer
107
96
 
108
- `~/.codeium/windsurf/mcp_config.json`, same `mcpServers` block, or `{ "serverUrl": "https://dogpolicies.com/mcp/" }`.
97
+ - Starts with a citation sentence and ends with `DogPolicies, dogpolicies.com, CC BY 4.0, verified {date}`. Every record carries `confidence` (stated, inferred_from_agency, inherited_brand), `freshness` (fresh, due, stale, unreadable), `verified_at`, `url` and `source_urls`. A fact the source does not state is listed as not stated, never filled in.
98
+ - Plain words work as arguments: "hotel", "NB", "Motel 6" or "yes" are read as the value the schema wants and labeled `resolved_from`. An argument that still does not fit comes back as `outcome: "bad_input"` with what is accepted, not a protocol error; a question the data cannot answer is `no_match` with `did_you_mean`, `nearest` and `next`. `isError` means the server itself failed or refused a write (`rate_limited`).
99
+ - Markdown by default, structured JSON with `response_format: "json"`, and an output schema on every tool. The full reference, generated from the code: [docs/tools.md](docs/tools.md).
100
+ - Resources attach a record without a tool call: `dogpolicies://place/{id}`, `brand/{id}`, `answer/{slug}`, `route/{id}` and `area/{id}` (with completion), plus `dogpolicies://about`, `answers`, `status` and `corridor/i-5`. Prompts for the slash menu: `plan_dog_trip`, `check_hotel_for_dog`, `road_trip_with_dog`, `drive_i5_with_dog`, `what_can_my_dog_do_here`, `cite_a_rule`.
109
101
 
110
- </details>
102
+ ## Not using MCP?
111
103
 
112
- ### Local HTTP
104
+ The read-only tools are also plain GET operations at `https://dogpolicies.com/api/v1/ask/<operation>`, run by the same engine with the same answers. The operation is the tool name without `dogpolicies_`, with hyphens (`near`, `find-hotels`, `plan-trip`, `route-stops`); arguments go in the query string, a point as `near.lat=…&near.lon=…`. The OpenAPI 3.1 description: https://dogpolicies.com/api/v1/openapi.json
113
105
 
114
106
  ```bash
115
- npx dogpolicies-mcp --http --port 3737 # http://127.0.0.1:3737/mcp
107
+ curl "https://dogpolicies.com/api/v1/ask/find-hotels?county=Monterey&dog_weight_lb=70&max_total_fee=50"
116
108
  ```
117
109
 
118
- ## Troubleshooting
110
+ ## Status and data
119
111
 
120
- - **It does not show up after installing.** Restart properly. Claude Desktop must be fully quit: right-click the tray icon (Windows) or Claude menu → Quit (macOS); closing the window leaves it running. Cursor: toggle the server in Settings → MCP. VS Code: MCP: List Servers → Start. Windsurf: Refresh in the MCP panel.
121
- - **Check the server itself.** `npx dogpolicies-mcp check` loads the data and calls every tool; `npx dogpolicies-mcp demo` prints a real answer. If these work, the problem is the client's config or restart.
122
- - **Where the client's logs are.** Claude Desktop: `%APPDATA%\Claude\logs\mcp.log` and `mcp-server-dogpolicies.log` (Windows), `~/Library/Logs/Claude/` (macOS). Cursor: Output panel → MCP Logs. VS Code: MCP: List Servers → Show Output. Claude Code: `claude mcp list`, or `--mcp-debug`.
123
- - **"spawn npx ENOENT" on Windows.** The client starts commands without a shell and `npx` is a `.cmd` file. Use `"command": "cmd", "args": ["/c", "npx", "-y", "dogpolicies-mcp"]` (the installer writes this), or the hosted connector.
124
- - **Node version.** `node --version` must be 20.19 or newer (`npx` comes with Node). The hosted connector and the Claude Desktop extension need no Node at all (the extension uses Claude Desktop's own).
125
- - **Behind a corporate proxy.** `npx` needs to reach registry.npmjs.org once to fetch the package; set `HTTPS_PROXY` (npm reads `npm config set proxy` too) or use the extension or the hosted connector, which need no npm. The server itself makes one background request to dogpolicies.com for newer data and works offline without it; set `DOGPOLICIES_OFFLINE=1` to never try.
126
- - **Still stuck?** Open an issue with the output of `npx dogpolicies-mcp check`, your OS and client: https://github.com/xultrax-web/dogpolicies-mcp/issues
112
+ [dogpolicies.com/status](https://dogpolicies.com/status/) shows the hosted server's version and commit, the data date, the last re-check, open corrections and the call tally; `https://dogpolicies.com/api/v1/status.json` is the same as JSON. The package ships a dated snapshot (`as_of` in every result), serves it at once, then checks `https://dogpolicies.com/data/mcp-snapshot-v1.json` in the background and swaps in a newer one when it exists. `DOGPOLICIES_OFFLINE=1` (or `--offline`) never uses the network. All options: [docs/configuration.md](docs/configuration.md).
127
113
 
128
114
  ## Try it in the terminal
129
115
 
@@ -137,46 +123,24 @@ The `demo` output is the exact text an assistant receives:
137
123
 
138
124
  ```
139
125
  - Coronado Dog Beach (Coronado, CA): Yes, with restrictions. Dogs may be off leash only on the
140
- designated Dog Beach area at 200 Ocean Boulevard ... Source: City of Coronado, checked
141
- 2026-10-26. Record: https://dogpolicies.com/places/coronado-dog-beach/ (CC BY 4.0; cite with link).
126
+ designated Dog Beach area at 200 Ocean Boulevard and must be leashed at all points before
127
+ reaching it. Source: City of Coronado, checked 2026-10-26. DogPolicies record:
128
+ https://dogpolicies.com/places/coronado-dog-beach/ (CC BY 4.0; cite with link).
142
129
  `coronado-dog-beach` · Coronado, San Diego County, California · 3 mi · freshness fresh
143
130
  ```
144
131
 
145
- ## Tools
146
-
147
- | Tool | What it does |
148
- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
149
- | `dogpolicies_search_places` | Search by name, type (beach, park, trail, lodging, campground, cabins, restaurant), county, state, region or a point and radius; filter to dogs allowed or off-leash. |
150
- | `dogpolicies_near` | Everything dog-related near a town, county or point, grouped by kind and sorted by distance. Takes a town name; no coordinates needed. |
151
- | `dogpolicies_get_place` | Full record for one place: every fact, its source with URL, date and quote, rule ids, and what the source does not state. |
152
- | `dogpolicies_compare_places` | Two to six places side by side: dogs allowed, leash, fee, weight limit, pets per room, freshness, who confirmed. |
153
- | `dogpolicies_plan_trip` | A stay in a town with this dog: stays that fit (fee for the whole stay worked out), beaches, parks, trails and patios nearby. |
154
- | `dogpolicies_find_hotels` | Hotels that take a specific dog: weight, number of dogs, nights, fee budget. Verdicts (match, possible, excluded), cheapest first, fee arithmetic shown. |
155
- | `dogpolicies_get_brand_policy` | A chain's published pet policy, its listed exceptions and property counts. |
156
- | `dogpolicies_browse_answers` | Ready-made answers to common questions ("Which California state parks allow dogs?"). |
157
- | `dogpolicies_route_stops` | Dog stops along a highway by mile and direction: rest areas with pet areas, hotels, campgrounds, parks, beaches. On I-5 in California: s meters from San Ysidro, side, elevation, family stops (restrooms and a pet area stated) and paired exits. |
158
- | `dogpolicies_i5_corridor` | I-5 in California as eleven stretches on the I-5 centerline, and the stops in a stretch, a mile range or a window ahead of a point. |
159
- | `dogpolicies_i5_conditions` | Caltrans closures, road weather, sign text and chain controls on I-5 right now, placed on the same axis; conditions, not rules. Needs the network. |
160
- | `dogpolicies_get_rule` | One rule by its stable id, with source, quote, confidence, verified date and freshness. |
161
- | `dogpolicies_changes_since` | Verification events and rule changes since a date, newest first. |
162
- | `dogpolicies_changes_near` | The same, limited to a radius around a town or point. |
163
- | `dogpolicies_report_correction` | Files a correction for a person to verify. Nothing is published automatically. The only tool that writes. |
164
-
165
- Every tool returns readable markdown by default and structured JSON (`response_format: "json"`), with an output schema. Every record carries `confidence` (stated, inferred_from_agency, inherited_brand), `freshness` (fresh, due, stale, unreadable, computed for today), `verified_at`, `url` and `source_urls`. There are no dead ends: when nothing matches, the result is a normal answer with `outcome` (`no_match`, `bad_input`, `partial`, `unavailable`), `code`, `message`, and whichever of `did_you_mean` (close matches), `nearest` (the nearest records anyway), `missing` and `next` (what to call) apply. `isError` is set only when the server itself failed (`internal`) or refused a write (`rate_limited`). The full reference, generated from the code, is [docs/tools.md](docs/tools.md).
166
-
167
- ### Resources and prompts
168
-
169
- Resources let a client attach a record without a tool call: `dogpolicies://place/{id}`, `dogpolicies://brand/{id}`, `dogpolicies://answer/{slug}`, `dogpolicies://route/{id}`, `dogpolicies://area/{id}` (all with completion), plus `dogpolicies://about`, `dogpolicies://answers`, `dogpolicies://status` and `dogpolicies://corridor/i-5` (the I-5 stretches and every stop by s). Prompts give a client's slash menu the common trips: `plan_dog_trip`, `check_hotel_for_dog`, `road_trip_with_dog`, `drive_i5_with_dog`, `what_can_my_dog_do_here`, `cite_a_rule`, with town-name completion.
170
-
171
- ## How the data stays current
132
+ ## Troubleshooting
172
133
 
173
- The package ships a dated snapshot (`as_of` in every result). On start it serves that snapshot immediately, then checks `https://dogpolicies.com/data/mcp-snapshot-v1.json` in the background and, when a newer one exists, swaps it in and caches it for next time. Until the site is deployed there, that check fails fast and silently and the bundled data serves on its own. Set `DOGPOLICIES_OFFLINE=1` (or pass `--offline`) to never use the network. All options: [docs/configuration.md](docs/configuration.md).
134
+ - **It does not show up.** Restart properly: fully quit Claude Desktop (tray icon or Claude menu → Quit; closing the window leaves it running); in Cursor toggle the server in Settings → MCP; in VS Code run MCP: List Servers → Start; in Windsurf press Refresh in the MCP panel.
135
+ - **Check the server itself.** `npx dogpolicies-mcp check` calls every tool; if it works, the problem is the client's config or restart. Logs: Claude Desktop `%APPDATA%\Claude\logs\mcp.log` and `mcp-server-dogpolicies.log` (Windows) or `~/Library/Logs/Claude/` (macOS); Cursor: Output → MCP Logs; VS Code: MCP: List Servers → Show Output; Claude Code: `claude mcp list`.
136
+ - **"spawn npx ENOENT" on Windows.** Use the `cmd /c npx` form above (the installer writes it) or the hosted URL.
137
+ - **Behind a proxy.** `npx` must reach registry.npmjs.org once (set `HTTPS_PROXY`); the hosted URL and the extension need no npm.
138
+ - **Still stuck?** Open an issue with the output of `npx dogpolicies-mcp check`, your OS and client: https://github.com/xultrax-web/dogpolicies-mcp/issues
174
139
 
175
140
  ## Privacy
176
141
 
177
142
  - **Nothing is collected.** No telemetry, analytics or crash reporting; tool arguments are never logged above `debug` level (stderr, your terminal).
178
- - **What leaves your machine:** one conditional GET for the data snapshot on start, and, only when you use `dogpolicies_report_correction`, the correction text you typed plus an optional contact you chose to give. Both go to dogpolicies.com over https and nowhere else. `--offline` stops both.
179
- - Threat model and controls: [docs/security.md](docs/security.md).
143
+ - **What leaves your machine** with the local package: one conditional GET for the data snapshot on start and, only when you file a correction, the text you typed plus an optional contact you chose to give. Both go to dogpolicies.com over https and nowhere else; `--offline` stops both. The hosted server counts calls by tool and client name, never questions or addresses. Threat model and controls: [docs/security.md](docs/security.md).
180
144
 
181
145
  ## License and attribution
182
146
 
@@ -184,14 +148,10 @@ The package ships a dated snapshot (`as_of` in every result). On start it serves
184
148
  - **Data:** [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Attribute "DogPolicies" with a link to https://dogpolicies.com/ and cite each record with its URL and verified date; every result includes a ready-made citation line. Chain-hotel names and locations come from OpenStreetMap under the [ODbL](https://www.openstreetmap.org/copyright) and say so in `record_license`.
185
149
  - The rules are a sourced, dated summary, not legal advice. Confirm with the agency or the business before you go, especially when a record says `stale`, `unreadable` or `inherited_brand`. Service animals are governed by the ADA, not these pet rules. Terms: https://dogpolicies.com/terms/
186
150
 
187
- ## Report a wrong rule
188
-
189
- Tell your assistant "that rule is wrong" and it can file a correction with `dogpolicies_report_correction`, or use the form on any record page. A person re-reads the official source, usually within a week; the record's verification history shows the result.
190
-
191
151
  ## For developers
192
152
 
193
153
  ```js
194
- import { createRuntime, createServer, connectInProcess } from "dogpolicies-mcp";
154
+ import { createRuntime, connectInProcess } from "dogpolicies-mcp";
195
155
 
196
156
  const ctx = createRuntime({ overrides: { offline: true } });
197
157
  const { client, close } = await connectInProcess(ctx);
@@ -205,4 +165,4 @@ await close();
205
165
 
206
166
  `createServer(ctx)` returns an `McpServer` from the official `@modelcontextprotocol/server` SDK for any transport. The reusable, dog-free core (`dogpolicies-mcp/core`) and how to build another server on it: [docs/architecture.md](docs/architecture.md). Versioning and deprecation: [docs/versioning.md](docs/versioning.md). Contributing: [CONTRIBUTING.md](CONTRIBUTING.md).
207
167
 
208
- Tests: `npm test` runs unit, contract, security, performance, surface, eval (33 real questions scored for tool selection and answer facts) and fuzz tests; `npm run test:e2e` packs the tarball and runs it over stdio. CI runs on Linux, macOS and Windows with Node 20, 22 and 24.
168
+ Tests: `npm test` runs unit, contract, security, performance, surface, eval and fuzz tests; `npm run test:e2e` packs the tarball and runs it over stdio. CI runs on Linux, macOS and Windows with Node 20, 22 and 24.
Binary file
@@ -66,7 +66,7 @@ export const myTool = (ctx) => ({
66
66
  name: "myserver_do_thing", // snake_case, server-prefixed, never renamed
67
67
  title: "Do the thing",
68
68
  description: "...written for a model choosing between tools, with examples",
69
- inputSchema: z.strictObject({ ... }), // strict: unknown fields are rejected
69
+ inputSchema: z.strictObject({ ... }), // strict: unknown fields fail it, and the failure is answered (bad_input, decision 111)
70
70
  outputSchema: z.looseObject({ ... }), // loose: fields may be added later
71
71
  annotations: READ_ONLY, // or WRITE_ONCE
72
72
  cache: true, // memoize by (data version, args)