
chester-2026/gov-stat-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
많은 국가의 Govs에서 Fetching Data를 위한 중앙 집중식 MCP 서버
개요
AI 대리인을 시키는 모형 Context 의정서 (MCP) 서버. 미국, 영국, 캐나다 및 호주 전역에 통합된 도구 인터페이스는 공통 어댑터 레이어 뒤에 흡수됩니다. 일반적인 에이전트 워크플로를 위해 내장 : "X에 대한 정부 데이터 세트가 있습니까?" → 후보자를 찾습니다 → 파일 → 미리보기 행을 검사하거나 다운로드 링크를 잡고 이동합니다. - 미국 (data.gov v4 / DCAT), 영국 (data.gov.uk / CKAN), 캐나다 (open.canada.ca / CKAN), 호주 (data.gov.au / CKAN + DataStore). - 설명은 HTML-stripped 및 truncated, 검색 결과는 컴팩트 한 요약이며, 큰 파일은 사고로 줄이지 않습니다. - CKAN DataStore(호주)를 사용하며, 다른 곳에서 CSV/TSV 파일의 머리를 읽으려면 투명하게 떨어졌습니다. - 오류는 동작 가능한 텍스트로 반환됩니다 ("use get download link 대신", "dataset id와 복원", "사용 가능한 포털 : ...") - 절대 원시 추적.
개요(AI 번역)
A Model Context Protocol (MCP) 서버는 AI Agent search, 탐구 및 공식 정부 데이터 포털에서 데이터를 열 수 있습니다. 미국, 영국, 캐나다 및 호주 전역에 통합된 도구 인터페이스는 공통 어댑터 레이어 뒤에 흡수됩니다.
일반적인 에이전트 워크플로를 위해 내장: “나는 정부 데이터 세트 X?” → 후보자를 찾을 수 있습니다 → 파일 → 미리보기 행을 검사하거나 다운로드 링크를 잡고 이동합니다.
키 기능
- ** 국가 포털, 하나의 인터페이스. ** 미국 (data.gov v4 / DCAT), 영국 (data.gov.uk / CKAN), 캐나다 (open.canada.ca / C), 호주 (data.gov.au / CKAN + DataStore).
- 토큰 광고 디자인. 설명은 HTML-stripped 및 truncated, 검색 결과는 컴팩트 한 요약이며, 큰 파일은 사고로 줄 수 없습니다.
- Row-level 미리보기. CKAN DataStore 사용 가능 (호주), 투명하게 다른 곳에서 CSV/TSV 파일의 머리를 읽기 위해 돌아갑니다.
- **Agent-friendly 실패 모드.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
GovData MCP
A Model Context Protocol (MCP) server that lets AI agents search, explore, and fetch open datasets from official government data portals. One unified tool interface across the United States, United Kingdom, Canada, and Australia — with per-portal quirks (API migrations, auth walls, bilingual metadata, stale DataStore flags) absorbed behind a common adapter layer.
Built for the typical agent workflow: “Is there a government dataset for X?” → find candidates → inspect the files → preview rows or grab a download link and move on.
Key Features
- Four national portals, one interface. US (data.gov v4 / DCAT), UK (data.gov.uk / CKAN), Canada (open.canada.ca / CKAN), Australia (data.gov.au / CKAN + DataStore).
- Token-frugal by design. Descriptions are HTML-stripped and truncated, search results are compact summaries, and large files are never inlined by accident.
- Row-level preview. Uses CKAN DataStore where available (Australia), and transparently falls back to reading the head of CSV/TSV files everywhere else.
- Agent-friendly failure modes. Errors are returned as actionable text (“use
get_download_linkinstead”, “retry withdataset_id”, “available portals: …”) — never raw tracebacks. - Extensible registry. Adding another CKAN-based portal is a single config entry; non-CKAN portals plug in via a small adapter class.
- Dual transport.
stdiofor local clients (Claude Desktop etc.), statelessstreamable-httpfor serverless deployment (Google Cloud Run).
Supported Portals
| Code | Portal | API | Search | Explore | Row Preview | Notes |
|---|---|---|---|---|---|---|
us |
data.gov | data.gov v4 (DCAT) | ✅ | ✅ | CSV fallback | Requires free api.data.gov key |
uk |
data.gov.uk | CKAN | ✅ | ✅ | CSV fallback | Resource lookups need the parent dataset_id |
ca |
open.canada.ca | CKAN | ✅ | ✅ | CSV fallback | Bilingual titles normalized to English |
au |
data.gov.au | CKAN + DataStore | ✅ | ✅ | ✅ DataStore | Full row queries with text filtering |
Requirements
- Python 3.11+
- An api.data.gov API key for the US portal (free; other portals need no credentials)
Installation
git clone https://github.com/YOUR_ORG/Gov-Stat-MCP-Server.git
cd Gov-Stat-MCP-Server
# pip
pip install -e ".[dev]"
# or conda
conda env create -f environment.yml
conda activate opendata-mcp
Copy .env.example to .env and set your key:
DATAGOV_API_KEY=your-api-data-gov-key
Getting Started
Standard config for most MCP clients (stdio transport):
{
"mcpServers": {
"govdata": {
"command": "govdata-mcp",
"env": {
"DATAGOV_API_KEY": "your-api-data-gov-key"
}
}
}
}
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"govdata": {
"command": "govdata-mcp",
"env": {
"DATAGOV_API_KEY": "your-api-data-gov-key"
}
}
}
}