Government
Data source: CKAN Open Data Portals
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/opendata/
claude_desktop_config.json
{
"mcpServers": {
"gnist-opendata": {
"url": "https://context.gnist.ai/mcp/opendata/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/opendata/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_datasets", "arguments": {"query": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/opendata/
5 endpoints available:
GET /rest/opendata/search_datasetsGET /rest/opendata/get_datasetGET /rest/opendata/list_organizationsGET /rest/opendata/get_organizationGET /rest/opendata/report_feedback
Shell
curl "https://context.gnist.ai/rest/opendata/search_datasets?query=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/opendata/search_datasets",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"query": "example"
},
)
print(resp.json())
Command Line
Command
gc opendata
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
search_datasetsSearch government open data datasets across US (data.gov), UK (data.gov.uk), or Canada (open.canada.ca).
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search query for datasets (e.g. "climate change", "transportation safety", "public health spending"). |
portal | string | optional | Portal to search: 'us' (data.gov, 290K+ datasets), 'uk' (data.gov.uk, 55K+), 'ca' (open.canada.ca, 115K+). Default 'us'. (default: "us") |
limit | integer | optional | Number of results (1-50, default 20). (default: 20) |
offset | integer | optional | Result offset for pagination (default 0). (default: 0) |
get_datasetGet full details for a single government dataset by its name or ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
dataset_id | string | required | Dataset name or ID (e.g. 'annual-enterprise-survey-2021'). Found in search_datasets results. |
portal | string | optional | Portal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us") |
list_organizationsList government organizations that publish open data on a portal.
| Parameter | Type | Required | Description |
|---|---|---|---|
portal | string | optional | Portal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us") |
limit | integer | optional | Number of results (1-50, default 20). (default: 20) |
get_organizationGet details for a specific government data-publishing organization.
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | string | required | Organization name or ID (e.g. 'nasa-gov', 'department-of-energy'). Found in list_organizations results. |
portal | string | optional | Portal: 'us', 'uk', or 'ca'. Default 'us'. (default: "us") |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |