Overview
Purpose: Smithery-compatible TypeScript MCP server exposing a tool to find the nearest Citi Bike stations by distance and ebike/classic availability.
Data: Citi Bike GBFS feeds:
station_status.jsonandstation_information.json.
Quickstart (Smithery)
Prereq: Node.js 18+ and a Smithery account/API key.
Dev (requires Smithery CLI):
npm run dev(port-forwards to Smithery Playground)Deploy: Push to GitHub, then use https://smithery.ai/new to deploy the repo.
Local Build
Install deps:
npm installBuild:
npm run build
Entry Point
Smithery loads
src/index.tswhich exports a defaultcreateServerfunction returning an MCP server instance.
Tool
nearest_citibikes: Returns nearest stations with distances and availability.Input:
{ lat: number, lon: number, limit?: number }Output: JSON with
stations[]including:name,station_id,lat,lon,distance_mavailable_ebikes,available_classic_bikes,available_total_bikesavailable_docks,capacity_total_docks,is_renting,is_returning,last_reported
Notes
available_classic_bikesusesnum_bikes_available_types.mechanicalwhen present; else derives asnum_bikes_available - num_ebikes_available.Results are Haversine-sorted by distance.
limitdefaults to 5 (1–50 allowed).