Data source: DMI (Danish Meteorological Institute)
Overview
DMI Weather Warnings (Denmark) wraps DMI (Danish Meteorological Institute), handling authentication, pagination, and rate limits for you. This tutorial covers all 3 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-dmi-warnings": {
"url": "https://context.gnist.ai/mcp/dmi-warnings/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (3)
get_weather_warnings
Get current DMI weather warnings for Denmark. Returns active weather warnings from the Danish Meteorological Institute (DMI). Warnings cover meteorological events including wind, rain, snow, thunderstorms, fog, black ice, heat, and flooding. Warning severity types: 1 (Low/risk notice), 2 (Moderate), 3 (Severe), 4 (Dangerous). Returns: List of warnings with severity, affected areas, and time periods.
| Parameter | Type | Required | Description |
|---|---|---|---|
severity | any | optional | Filter by minimum warning type: 1=Low, 2=Moderate, 3=Severe, 4=Dangerous. Omit for all levels. |
cause | any | optional | Filter by warning cause code: regn, vind, sne, konvektion, isslag, tage, temperatur, forvand. Omit for all types. |
curl -X POST "https://context.gnist.ai/mcp/dmi-warnings/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_weather_warnings", "arguments": {"severity": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dmi-warnings/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'severity': 'example'},
'name': 'get_weather_warnings'}},
)
print(resp.json())
get_warning_causes
List DMI warning cause types and severity levels. Returns the full set of warning cause codes (regn, vind, sne, etc.) and severity levels (1-4) used in Danish weather warnings. Useful for understanding the classification system before querying active warnings. Returns: Warning causes and severity levels with descriptions.
curl -X POST "https://context.gnist.ai/mcp/dmi-warnings/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_warning_causes", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dmi-warnings/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'get_warning_causes'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/dmi-warnings/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dmi-warnings/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
FAQ
What data does DMI Weather Warnings (Denmark) provide?
Danish weather warnings from DMI — current national warnings with severity levels (Low/Moderate/Severe/Dangerous) covering rain, wind, snow, thunderstorms, fog, black ice, heat, and flooding. It exposes 3 tools: get_weather_warnings, get_warning_causes, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the DMI Weather Warnings (Denmark) API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.