SF Permits MCP Server

SF Permits MCP Server

Provides access to San Francisco public permitting, business, and property data through the Socrata SODA API. Users can search permit details, aggregate statistics, and look up property assessments using natural language.

Category
访问服务器

README

SF Permits MCP Server

MCP server that exposes San Francisco public permitting data to Claude. Built with FastMCP and the Socrata SODA API.

Phase 1 of a larger project that will add fraud detection (social network analysis of permit actors) and permit facilitation.

Tools

Tool Description
search_permits Search building permits by neighborhood, type, status, cost, date, address, or description
get_permit_details Get full details for a specific permit by permit number
permit_stats Aggregate statistics grouped by neighborhood, type, status, month, or year
search_businesses Search registered business locations in SF
property_lookup Look up property assessments by address or block/lot

Data Sources

All data from DataSF (San Francisco Open Data) via the Socrata SODA API. 22 datasets cataloged covering:

  • Permits: Building (1.3M), Plumbing (513K), Electrical (344K), Boiler (152K), Street-Use (1.2M)
  • Contacts: Building Permits Contacts (1M records, 11 actor types), Electrical Contacts (340K), Plumbing Contacts (503K)
  • Violations: Building Inspections (671K), DBI Complaints (326K), Notices of Violation (509K)
  • Enrichment: Business Locations (354K), Property Tax Rolls (3.7M), Development Pipeline, Housing Production

See datasets/CATALOG.md for the full catalog and docs/contact-data-report.md for the contact/actor data analysis.

Setup

# Clone
git clone https://github.com/tbrennem-source/sf-permits-mcp.git
cd sf-permits-mcp

# Install dependencies
pip install -e ".[dev]"

# Optional: set SODA app token for higher rate limits
export SODA_APP_TOKEN="your_token_here"

# Run the MCP server
python -m src.server

Architecture

Claude (claude.ai / Claude Code)
    ↓ MCP tool call
SF Permits MCP Server (FastMCP)
    ↓ HTTP GET (SoQL)
data.sfgov.org SODA API
    ↓ JSON response
MCP Server formats + returns
    ↓ structured results
Claude renders for user

Key Files

src/
├── server.py           # FastMCP entry point, tool registration
├── soda_client.py      # Async SODA API client (httpx)
├── formatters.py       # Response formatting for Claude consumption
└── tools/
    ├── search_permits.py
    ├── get_permit_details.py
    ├── permit_stats.py
    ├── search_businesses.py
    └── property_lookup.py

Tests

# Run integration tests (hits live API)
pytest tests/ -v

Performance

Benchmarks run against the live SODA API (see benchmarks/RESULTS.md):

  • Single lookups: ~500ms
  • Filtered searches: ~600-720ms
  • Aggregations: ~600ms warm cache, 10-14s cold cache on large datasets
  • Full-text search: ~600ms-1.4s (most datasets)

The API is sufficient for interactive use. Aggregation results should be cached for production.

Project Phases

  • [x] Phase 1: MCP server + dataset catalog + benchmarks ← you are here
  • [ ] Phase 2: Local storage decision, contacts data ingestion
  • [ ] Phase 3: Fraud detection prototype (social network analysis using Mehri model)
  • [ ] Phase 4: Predictive analytics, Railway deployment

Decisions

See docs/DECISIONS.md for architecture decisions including:

  • Why we built from scratch vs. forking existing Socrata MCP servers
  • Custom SODA client vs. sodapy
  • NIXPACKS deployment strategy

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选