nyc-restroom-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nyc-restroom-mcpFind a public restroom near Union Square that's open right now."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nyc-restroom-mcp
Ask Claude "where's the nearest public bathroom?" and get a real answer.
This is an MCP server, a small plugin that gives an AI assistant (like Claude Desktop or Claude Code) new abilities. This one lets it search New York City's official public restroom data, live from NYC Open Data. Once installed, you can ask things like:
"Find a public restroom near Union Square that's open right now."
"Which restrooms near me are wheelchair accessible?"
"Is the bathroom at Jaime Campiz Playground actually clean?" (it looks up the latest NYC Parks inspection report)
It adds two tools:
Tool | What it does |
| Lists open public restrooms near a location, closest first, with hours, accessibility, and changing-station info. |
| Looks up one restroom by name or coordinates, including its most recent NYC Parks inspection rating, where one exists. |
If you don't give it a location, it can detect yours automatically (details below). Everything is read-only: it only ever fetches public city data.
Install
You need Node.js 20 or newer. No download or setup beyond the snippet for your app.
Claude Code (one command):
claude mcp add nyc-restroom -- npx -y nyc-restroom-mcpClaude Desktop: go to Settings -> Developer -> Edit Config and add this to
claude_desktop_config.json:
{
"mcpServers": {
"nyc-restroom": {
"command": "npx",
"args": ["-y", "nyc-restroom-mcp"]
}
}
}Any other MCP client works the same way: have it launch
npx -y nyc-restroom-mcp as a local (stdio) server.
Related MCP server: Winnipeg City MCP Server
Good to know
Automatic location. If you ask for nearby restrooms without saying where you are, the server tries to figure it out: first from your device (macOS only, if you
brew install corelocationcliand grant it Location Services access), otherwise a rough guess from your IP address. If neither works, or you're outside NYC, it simply asks for explicit coordinates instead of guessing wrong.Privacy. Location detection only happens when you omit coordinates, and your location is never written to logs. Pass explicit coordinates and no location lookup happens at all.
Live data. Every answer comes straight from NYC Open Data (with a short-lived in-memory cache), so results are as current as the city's own records. Inspection reports only exist for restrooms run by NYC Parks; library and other restrooms will honestly say no inspection data exists.
More detail. The docs/ directory covers the full tool reference, location detection, data sources, configuration, and security model. The reasoning behind every design decision lives in DECISIONS.md.
Optional settings
Set these as environment variables if you need them (most people don't):
Variable | Purpose |
| A free NYC Open Data app token, for higher rate limits. |
|
|
A few more exist for testing and advanced setups; see docs/configuration.md.
Contributing
Issues and pull requests are welcome at DanielOrtiz0220/nyc-restroom-mcp.
Development uses Bun (1.1+):
git clone https://github.com/DanielOrtiz0220/nyc-restroom-mcp.git
cd nyc-restroom-mcp
bun install
bun test # full unit + end-to-end suite, runs completely offline
bun run typecheck # tsc --noEmit
bun run lint # eslint, zero warnings allowed
bun run build # compile src/ to dist/ (what the npm package ships)To run your local copy inside an MCP client instead of the published package:
claude mcp add nyc-restroom -- bun "$(pwd)/src/index.ts"Useful extras: bun run test:live runs one smoke test against the real NYC
Open Data API (needs network), and bun test --coverage reports coverage
(85%+ lines required on src/lib/). Before opening a PR, please make sure
bun test, bun run typecheck, and bun run lint all pass. The full
development guide (test architecture, project structure, invariants to
preserve) is in docs/development.md, and
DECISIONS.md explains why things work the way they do.
License
Available Tools
2 toolsfind_restroomsFind nearby NYC public restroomsARead-only
Finds operational NYC public restrooms near a given point, sorted by distance ascending. latitude/longitude may both be omitted to search from your current location, detected automatically (precise on-device location if available, otherwise an approximate IP-based guess) - only used when that location is within New York City, otherwise this tool returns an error asking for explicit coordinates instead. Radius defaults to 800m and is clamped to a 5000m maximum. Set open_now to filter to restrooms currently open (restrooms with unparseable hours are kept, marked "unknown", rather than guessed at).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of restrooms to return, sorted by distance ascending. | |
| latitude | No | Latitude of the search center. Omit both latitude and longitude to search from your current location, detected automatically. | |
| open_now | No | When true, drop restrooms that are confidently closed right now. Restrooms with unparseable hours are kept and marked "unknown" rather than guessed at. | |
| longitude | No | Longitude of the search center. Omit both latitude and longitude to search from your current location, detected automatically. | |
| radius_meters | No | Search radius in meters. Defaults to 800; values above 5000 are clamped to 5000. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint and openWorldHint annotations, the description discloses significant behavioral details: automatic location detection with fallback to IP, an error condition when location is outside NYC, radius clamping to 5000m, and the conservative handling of unparseable hours for open_now. These go beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with the core purpose front-loaded. Each sentence earns its place, covering location, radius, and open_now behavior without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description fully covers parameter behavior, defaults, clamps, error handling, and edge cases for a search tool. It's sufficient for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% description coverage for all five parameters, and the description largely reiterates the schema (radius default/clamp, coordinate omission). It adds minor context about IP-based location detection, but overall it doesn't significantly augment the parameter semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Finds operational NYC public restrooms near a given point, sorted by distance ascending' – a specific verb and resource. This clearly differentiates from sibling get_restroom_status, which targets status of a specific restroom rather than discovery/search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on how to use the tool, including optional coordinates for auto-location, radius clamping, and open_now filtering. It doesn't explicitly name the sibling or state when to prefer this over get_restroom_status, but the distinct purpose is implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_restroom_statusGet a specific NYC restroom and its latest inspection statusARead-only
Looks up one NYC public restroom by name or by nearest coordinates, and - where NYC Parks inspection data is available for it - reports its most recent condition ratings. Only restrooms operated by NYC Parks are covered by inspection data; other operators (libraries, automated public toilets, private operators) will report status "no_inspection_data".
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | No | Latitude to find the nearest restroom to. Requires longitude as well. | |
| longitude | No | Longitude to find the nearest restroom to. Requires latitude as well. | |
| restroom_name | No | Restroom facility name to look up (case-insensitive substring match). Provide either this or a latitude/longitude pair, not both. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare the tool as read-only and open-world, so the safety profile is established. The description adds valuable context beyond this: that only NYC Parks restrooms have inspection data, and others will return 'no_inspection_data'. This clarifies expected behavior in edge cases. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and includes only essential caveats. There is no fluff or repetition. It efficiently conveys purpose, mode of lookup, and important coverage limitation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple read-only lookup tool with a well-specified schema. The description covers the main behavior, the search modes, and the critical data-availability caveat. Since there is no output schema, mentioning 'condition ratings' sufficiently indicates the return type. The description is complete for this tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameters are fully documented. The description does not add meaningful new meaning beyond what the schema already provides, aside from restating the two lookup modes (by name or coordinates). It appropriately avoids redundancy, earning the baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool's function: looking up one specific NYC public restroom by name or nearest coordinates and reporting its most recent condition ratings. The singular focus distinguishes it from sibling tool find_restrooms, which likely handles multiple results. The title reinforces this specific purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (when you need a single restroom's status, either by name or location). It also clarifies the scope of inspection data (NYC Parks only) and what to expect for other operators. However, it does not explicitly mention the alternative find_restrooms or state a 'use this instead of' rule, so it falls short of full guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.1- First observed
find_restrooms - First observed
get_restroom_status
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: find_restrooms discovers restrooms by proximity and open status, while get_restroom_status looks up a single restroom's detailed condition. No overlap or ambiguity.
Both tools follow a consistent verb_noun snake_case pattern: find_restrooms and get_restroom_status. This is perfectly predictable.
With only 2 tools, the server sits at the borderline lower end of the scale. The narrow domain could justify it, but the small surface area feels thin compared to typical MCP servers.
The two tools cover the essential workflow of finding restrooms and checking their status. A few minor gaps exist, such as no way to list all restrooms or filter by amenities, but these are not core dead ends for the stated purpose.
Maintenance
Related MCP Connectors
Resolve any government entity worldwide and submit service requests. Open civic data for AI agents.
Provides access to Civic Plus - See Click Fix, allowing you to interact with your data via an LLM.…
Agent-ready NYC public records. Hosted, source-backed civic data organized around durable anchors.
Live Google Maps business search, review, and photo data for AI agents over MCP.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables AI assistants to search, validate, and edit OpenStreetMap data through natural language commands and built-in safety protections. It supports discovery of nearby amenities, geographic data exploration, and secure map editing via OAuth authentication.284MIT
- AlicenseAqualityDmaintenanceProvides access to real-time Winnipeg Transit data and 311 City Services, enabling AI assistants to plan trips, check bus arrivals, and search for reported city issues. It allows users to interact with city infrastructure data and transit schedules through natural language.8MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying NYC Open Data datasets using natural language, with tools to search datasets, run SoQL queries, and retrieve metadata, all without an API key.6MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to query structured NYC family data, including neighborhoods, schools, admissions, safety, health, family resources, kids' activities, and neighborhood comparisons.-