US government public data portal (data.gov) API Model Context Protocol (MCP) servers.
- What is MCP?
- Why US Public Data MCP Servers?
- Available MCP Servers
- Installation & Setup
- Usage for Each Server
- Developer Guide
- Contributing
- License
Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
MCP servers are lightweight programs that expose specific functionality through the Model Context Protocol. AI tools like Claude Desktop, Cline, Cursor, and Windsurf can communicate with these servers as MCP clients.
The US government's data.gov portal provides access to thousands of datasets from various federal agencies through APIs. This project wraps these APIs as MCP servers, enabling AI tools to easily access and utilize US public data.
- Standardized Access: Use various public APIs through a unified MCP interface
- AI Tool Integration: Direct access to public data from Claude, Cline, and other AI assistants
- Easy Installation: Install via pip or uv
- Type Safety: Strong type validation using Pydantic
- Developer Friendly: Template-based rapid server creation
us-data-mcp.census-data
US Census Bureau demographic and economic data
us-data-mcp.sec-edgar
SEC EDGAR company filings and financial information
us-data-mcp.fda-drugs
FDA drug approvals, recalls, and safety information
us-data-mcp.bls-labor
Bureau of Labor Statistics employment and economic data
us-data-mcp.epa-airquality
EPA air quality and environmental monitoring
us-data-mcp.usa-spending
Federal spending, contracts, and grants
# Census data server
uv pip install us-data-mcp.census-data
# SEC EDGAR server
uv pip install us-data-mcp.sec-edgar
# FDA drugs server
uv pip install us-data-mcp.fda-drugs
# BLS labor statistics server
uv pip install us-data-mcp.bls-labor
# EPA air quality server
uv pip install us-data-mcp.epa-airquality# Census data server
pip install us-data-mcp.census-data
# SEC EDGAR server
pip install us-data-mcp.sec-edgar
# FDA drugs server
pip install us-data-mcp.fda-drugs
# BLS labor statistics server
pip install us-data-mcp.bls-labor
# EPA air quality server
pip install us-data-mcp.epa-airqualityAdd MCP servers to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"us-data-mcp.census-data": {
"command": "uvx",
"args": ["us-data-mcp.census-data@latest"],
"env": {
"CENSUS_API_KEY": "your-api-key-here"
}
},
"us-data-mcp.sec-edgar": {
"command": "uvx",
"args": ["us-data-mcp.sec-edgar@latest"]
},
"us-data-mcp.fda-drugs": {
"command": "uvx",
"args": ["us-data-mcp.fda-drugs@latest"]
},
"us-data-mcp.bls-labor": {
"command": "uvx",
"args": ["us-data-mcp.bls-labor@latest"],
"env": {
"BLS_API_KEY": "your-api-key-here"
}
},
"us-data-mcp.epa-airquality": {
"command": "uvx",
"args": ["us-data-mcp.epa-airquality@latest"],
"env": {
"EPA_AQS_EMAIL": "your-email@example.com",
"EPA_AQS_KEY": "your-api-key-here"
}
}
}
}Note: Using @latest ensures you always run the latest version.
Configure MCP servers in VS Code's Cline extension:
.vscode/cline_mcp_settings.json:
{
"mcpServers": {
"us-data-mcp.census-data": {
"command": "python",
"args": ["-m", "us_data_mcp.census_data.server"],
"env": {
"CENSUS_API_KEY": "your-api-key-here"
}
}
}
}Access US Census Bureau demographic and economic data.
export CENSUS_API_KEY="your-api-key-here" # Get from https://api.census.gov/data/key_signup.htmlsearch_population: Search population data by geography
Parameters:
year: Year of data (e.g., 2020)state: State FIPS code (2 digits)county: County FIPS code (3 digits, optional)variables: List of census variables to retrieve
search_economic: Search economic indicators
Parameters:
year: Year of datadataset: Dataset name (e.g., "acs/acs5")variables: List of economic variablesgeography: Geographic level (state, county, etc.)
"Get population data for California in 2020"
"Find median household income for New York County"
"Show employment statistics for Texas"
Access SEC company filings and financial information.
No API key required - uses public SEC EDGAR API.
search_company: Search for companies by name, ticker, or CIK
Parameters:
query: Company name, ticker symbol, or CIK
get_company_facts: Get company financial facts (XBRL data)
Parameters:
cik: Central Index Key
get_insider_trades: Get recent insider trading reports (Form 4)
Parameters:
cik: Central Index Keylimit: Number of trades to retrieve (default: 20)
get_form_types: Get reference list of SEC form types
"Find recent 10-K filings for Apple"
"Search for company with ticker MSFT"
"Get financial facts for CIK 0000320193"
"Show recent insider trades for Tesla"
Access FDA drug approvals, recalls, and safety information.
No API key required - uses public openFDA API.
search_drugs: Search drug database
Parameters:
brand_name: Brand name of drug (optional)generic_name: Generic name (optional)application_number: FDA application number (optional)limit: Max results (default: 10)
search_recalls: Search drug recalls
Parameters:
product_description: Product descriptionclassification: Recall classification (I, II, III)status: Recall status (ongoing, completed)limit: Max results (default: 10)
search_adverse_events: Search adverse event reports
Parameters:
drug_name: Drug namereaction: Specific reaction/side effect (optional)limit: Max results (default: 10)
search_devices: Search for medical devices
Parameters:
device_name: Device namelimit: Max results (default: 10)
search_all_recalls: Search all FDA recalls (food, drug, device)
Parameters:
category: Category (food, drug, device)product_description: Product name or keywordslimit: Max results (default: 10)
"Find FDA approval info for Lipitor"
"Search for recent food recalls"
"Get information on heart valve devices"
"Get adverse event reports for aspirin"
Access Bureau of Labor Statistics employment and economic data.
export BLS_API_KEY="your-api-key-here" # Get from https://www.bls.gov/developers/api_signature_v2.htmget_series_data: Fetch data for BLS series IDs
Parameters:
series_ids: List of series IDs (e.g., ["LNS14000000"])start_year: Start yearend_year: End year
get_common_series: Get reference list of common series IDs
"Get national unemployment rate from 2020 to 2023"
"Find CPI data for inflation analysis"
"Show total nonfarm employment statistics"
Access EPA Air Quality System (AQS) environmental data.
export EPA_AQS_EMAIL="your-email@example.com"
export EPA_AQS_KEY="your-api-key-here" # Get from https://aqs.epa.gov/data/api/signupget_daily_air_quality: Fetch daily air quality summaries
Parameters:
param_code: Pollutant parameter code (e.g., "44201" for Ozone)bdate: Begin date (YYYYMMDD)edate: End date (YYYYMMDD)state: 2-digit State FIPS codecounty: 3-digit County FIPS code (optional)
get_common_aqs_parameters: Get reference list of pollutant codes
"Get Ozone levels in California for July 2023"
"Find PM2.5 levels in Los Angeles County"
"Show common air pollutant codes for EPA data"
# Clone repository
git clone https://github.com/sechan9999/us-data-mcp-servers.git
cd us-data-mcp-servers
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync --devThe fastest way is to use the provided template generation script:
# Run interactive script
uv run python scripts/create_mcp_server.pyThe script will guide you through the process step-by-step and generate a new MCP server in minutes.
# Install Cookiecutter (if needed)
uv pip install cookiecutter
# Create new server from template
uv run cookiecutter template/ -o src/For detailed template usage, see TEMPLATE_USAGE.md.
For the complete developer guide, see CONTRIBUTING.md.
# Run all tests
uv run pytest
# Run tests for specific server
uv run pytest src/census-data/tests/| Service | API Key Required | Documentation/Sign Up Link |
|---|---|---|
| Census Bureau | Recommended | Census API Key |
| SEC EDGAR | No | SEC EDGAR API |
| FDA openFDA | No | openFDA API |
| BLS | Yes | BLS API Key |
| EPA AQS | Yes | EPA AQS Sign Up |
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.
Inspired by the Korean data.go.kr MCP servers project.