sf_query
Pack: data-sf · Endpoint: https://gateway.pipeworx.io/data-sf/mcp
Run a raw SoQL query against any San Francisco open-data resource (data.sfgov.org) by its Socrata id (8-char like “wg3w-h783”). Full SoQL: where/select/group/order/limit/offset. Use sf_datasets to find a resource id, or sf_recent for the common ones.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resource_id | string | yes | Socrata resource id, e.g. “wg3w-h783” (police incidents). |
where | string | no | SoQL $where filter (e.g. “incident_year=2025”). |
select | string | no | SoQL $select (e.g. “incident_category, count(*)”). |
group | string | no | SoQL $group (e.g. “incident_category”). |
order | string | no | SoQL $order (e.g. “incident_datetime DESC”). |
limit | number | no | Max rows (default 100, max 5000). |
offset | number | no | Row offset for paging. |
Example call
curl -X POST https://gateway.pipeworx.io/data-sf/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"sf_query","arguments":{}}}'
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"data-sf": {
"url": "https://gateway.pipeworx.io/data-sf/mcp"
}
}
}
See Getting Started for client-specific install steps.