Data.gov Catalog Search MCP Server
Pricing
from $10.00 / 1,000 price for completing a tool calls
Data.gov Catalog Search MCP Server
MCP server exposing search over catalog.data.gov (dataset search, organization/publisher/keyword/place suggestions, dataset detail).
Pricing
from $10.00 / 1,000 price for completing a tool calls
Rating
0.0
(0)
Developer
R.L.
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
Data.gov Catalog Search MCP Server
An MCP server that exposes dataset search on catalog.data.gov to AI agents as tools — full-text dataset search plus organization, publisher, keyword, and geographic-area filtering, matching the catalog.data.gov search form. Built on FastMCP and deployed as an Apify Actor in Standby mode, so it runs as a persistent HTTP endpoint rather than a one-shot batch job.
Why use this?
catalog.data.gov has no public dataset-search API — its /api/3/action/* CKAN endpoints are disabled. Anyone wanting to search it programmatically has to hand-roll HTML scraping and reverse-engineer its filter form. This server does that work once: it wraps the site's search results, its internal autocomplete endpoints (organization, publisher, keyword, place), and per-dataset detail pages into MCP tools an agent can call directly. Running it on Apify gives you a hosted, always-on endpoint with API-token auth and usage-based billing, instead of self-hosting a scraper.
How to use
- If you don't have one, create a free Apify account and grab your API token from console.apify.com/settings/integrations.
- Open this Actor's page in Apify Console and copy its MCP endpoint URL from the API tab (it looks like
https://rl1987--datagov-catalog-mcp-server.apify.actor/mcp). - Connect your MCP client (Claude Code, Claude Desktop, an agent framework, etc.) to that URL over Streamable HTTP, passing your Apify API token as a Bearer token — see Connect to Claude Code below for the exact command.
- Call
search_datasets,get_dataset, or one of thesuggest_*tools from your agent. You're billed per completed tool call — see Pricing.
Connect to Claude Code
With the Actor's MCP endpoint URL and your Apify API token from above, run:
claude mcp add --transport http datagov-catalog https://rl1987--datagov-catalog-mcp-server.apify.actor/mcp \--header "Authorization: Bearer <YOUR_APIFY_API_TOKEN>"
Replace <YOUR_APIFY_API_TOKEN> with your own Apify API token — not the Actor owner's.
This adds the server at local scope (private, current project only). Add --scope user instead to make it available in every project on your machine.
Verify it connected: run claude mcp list, or type /mcp in an interactive Claude Code session — datagov-catalog should show as connected with 10 tools.
Try it: ask Claude "find EPA drinking-water datasets in California" or "what keywords does data.gov use for water-quality datasets?" — it will call the tools directly.
Remove it later with claude mcp remove datagov-catalog.
If you're on a team and want everyone to pick up this server automatically, commit a .mcp.json with just the URL (never the token) to your repo root:
{"mcpServers": {"datagov-catalog": {"type": "http","url": "https://rl1987--datagov-catalog-mcp-server.apify.actor/mcp"}}}
Each teammate then runs the claude mcp add ... --scope local command above once with their own token, which layers on top of the shared .mcp.json config without ever touching the repo.
Input
No Actor input is required to start the server — it runs in Standby mode and accepts MCP tool calls directly over HTTP.
Tools
- search_datasets — search datasets by free-text query plus organization, organization type, publisher, keyword, and geographic-area filters. Cursor-paginated.
- get_dataset — fetch full detail for one dataset (schema.org JSON-LD plus resource/download links) by its dataset id/slug.
- suggest_organizations — autocomplete publishing organizations by name, for use as
search_datasets(organization_slug=...). - suggest_publishers — autocomplete publishers by name, for use as
search_datasets(publisher=...). - suggest_keywords — autocomplete keywords/tags, for use in
search_datasets(keywords=[...]). - suggest_places — autocomplete geographic places (states, counties, etc.), resolving a place name to the
location_idused bysearch_datasets(location_id=...). - list_organization_types — the fixed set of organization-type values (e.g.
Federal Government). - list_metrics_organizations — the organizations selectable in the data.gov/metrics/ dropdown, for use as
organization_sluginget_organization_metrics. - get_sitewide_metrics — data.gov's sitewide usage metrics (pageviews, device breakdown, most downloaded files, most clicked outbound links, datasets/harvest-sources per organization), with every table's CSV download link and per-row links.
- get_organization_metrics — one organization's usage metrics (most viewed dataset pages, most downloaded files, most clicked outbound links), e.g. from data.gov/metrics/organization/fcc/index.html.
Output
Each tool returns structured JSON. Example search_datasets output:
{"results": [{"title": "Drinking Water - Public Water System Information","url": "https://catalog.data.gov/dataset/drinking-water-public-water-system-information","dataset_id": "drinking-water-public-water-system-information","organization": "State of California","organization_slug": "california","last_updated": "August 22, 2024 at 03:39 PM","description": "Curated dataset of information for all public water systems (PWS) in California...","formats": ["CSV", "PDF"],"search_relevance": 85.33}],"total_matches": 10000,"total_is_lower_bound": true,"next_cursor": "Wzc4LjMwODM5NSwwLC...","has_more": true}
Pricing
This Actor uses Pay Per Event pricing: a flat fee per completed tool call (see .actor/pay_per_event.json). There is no charge for failed calls or for connecting/idling.
Tips
- Resolve human-typed filter values first with
suggest_organizations/suggest_places/suggest_publishers/suggest_keywords, then pass the returned slug/id intosearch_datasets— don't guess the exact organization or place name. - The first page of
search_datasets(nocursor) always returns up to 20 results regardless ofper_page; pass the returnednext_cursorback in to page further, whereper_pagetakes effect. total_matchescomes back withtotal_is_lower_bound: trueabove roughly 10,000 matches — the site itself only reports "Found over 10000 datasets" rather than an exact count at that scale.
FAQ
This Actor only reads publicly published search results and JSON endpoints from catalog.data.gov — it performs no authentication and stores no personal data. There is no public dataset-search API on catalog.data.gov, so search_datasets parses the site's own server-rendered search-results HTML; a future redesign of that page could require an update here. Report issues via the Actor's Issues tab.