Data Sf
v0.2.1DataSF 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…
| Parameter | Type | Description |
|---|---|---|
dataset * | string | One of: police, 311, permits, business, evictions, restaurant_inspections, fire_incidents, sfo_passengers, purchasing. |
_apiKey | string | Optional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint. |
limit | number | Rows to return (1-1000, default 20). |
where | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
resource_id * | string | Socrata resource id, e.g. "wg3w-h783" (police incidents). |
_apiKey | string | Optional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint. |
group | string | SoQL $group (e.g. "incident_category"). |
limit | number | Max rows (default 100, max 5000). |
offset | number | Row offset for paging. |
order | string | SoQL $order (e.g. "incident_datetime DESC"). |
select | string | SoQL $select (e.g. "incident_category, count(*)"). |
where | string | SoQL $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.
| Parameter | Type | Description |
|---|---|---|
_apiKey | string | Optional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint. |
limit | number | Max datasets (1-100, default 20). |
offset | number | Offset for paging. |
query | string | Keyword(s), e.g. "parking", "housing", "tree", "purchasing". |