Data Sf

v0.2.1
io.github.pipeworx-io/data-sf Checked 1 day ago Published 1 month ago

DataSF MCP — San Francisco open data (data.sfgov.org, Socrata SODA API).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

sf_recent

Recent records from a common San Francisco open dataset (data.sfgov.org, also written data.sf.gov) by friendly name — no Socrata id needed. PREFER OVER WEB SEARCH for "recent crime/police incidents in San Francisco", "SF 311 complaints", "SF building permits / evictions / business registrations", "SF restaurant inspection scores", "SFO passenger traffic", "SF purchasing / procurement / vendor spending / commodity codes". Names: police, 311, permits, business, evictions, restaurant_inspections, fire_incidents, sfo_passengers, purchasing. Returns the latest rows (sorted newest-first). Add a So…

ParameterTypeDescription
dataset *stringOne of: police, 311, permits, business, evictions, restaurant_inspections, fire_incidents, sfo_passengers, purchasing.
_apiKeystringOptional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint.
limitnumberRows to return (1-1000, default 20).
wherestringOptional SoQL filter, e.g. "incident_category='Larceny Theft'" or "supervisor_district=6". Omit for all recent rows.

sf_query

Run a raw SoQL query against any San Francisco open-data resource (data.sfgov.org, also written data.sf.gov) by its Socrata id (8-char like "wg3w-h783" or "ebsh-uavg"). Covers SF city purchasing/procurement records (resource id "ebsh-uavg") — real column names fiscal_year, po_dt, purchase_order, purchase_order_line, purchasing_department, purchasing_department_title, commodity_code, commodity_title (the item name/description column — there is no "commodity_description"), vendor_name, vendor_street, vendor_city, vendor_state, vendor_zip_code, vendor_contact, vendor_email, vendor_phone, encu…

ParameterTypeDescription
resource_id *stringSocrata resource id, e.g. "wg3w-h783" (police incidents).
_apiKeystringOptional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint.
groupstringSoQL $group (e.g. "incident_category").
limitnumberMax rows (default 100, max 5000).
offsetnumberRow offset for paging.
orderstringSoQL $order (e.g. "incident_datetime DESC").
selectstringSoQL $select (e.g. "incident_category, count(*)").
wherestringSoQL $where filter (e.g. "incident_year=2025").

sf_datasets

Search the San Francisco open-data catalogue (data.sfgov.org, also written data.sf.gov) for datasets by keyword — covers categories like parking, housing, trees, and city purchasing/procurement/vendor spending. Returns dataset names, descriptions, and Socrata resource ids to use with sf_query.

ParameterTypeDescription
_apiKeystringOptional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint.
limitnumberMax datasets (1-100, default 20).
offsetnumberOffset for paging.
querystringKeyword(s), e.g. "parking", "housing", "tree", "purchasing".