Aleva data in your AI assistant
Every published endpoint is also a tool over the Model Context Protocol. The assistant finds the right dataset, asks it, and gets the answer with its source and licence.
Connect
The server speaks Streamable HTTP at:
https://api.aleva.se/mcp You need no account and no key. Add the address as an MCP server or custom connector in your client. Everything is read-only: the tools never change anything.
Clients
Claude
In the Claude app, add a custom connector with the address above. In Claude Code:
claude mcp add --transport http aleva https://api.aleva.se/mcp ChatGPT
Add a custom connector or app with the address above (developer mode needs to be on in ChatGPT settings).
Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"aleva": {
"url": "https://api.aleva.se/mcp"
}
}
} VS Code
.vscode/mcp.json
{
"servers": {
"aleva": {
"type": "http",
"url": "https://api.aleva.se/mcp"
}
}
} Other clients work the same way: all they need is the address.
Limits and keys
A tool call counts as a normal API call to the same endpoint, with the same limits. Without a key: 10 cost units a minute and 200 a day per IP address. With a key, the key's limits apply. Send it as a header in the client's configuration:
{
"mcpServers": {
"aleva": {
"url": "https://api.aleva.se/mcp",
"headers": {
"Authorization": "Bearer alv_…"
}
}
}
} Responses carry their source and licence. When you show data from a tool, credit the source as you would for the API. More about responses.
Tools
Two tools help the assistant find its way: search_catalogue searches the datasets, and describe_endpoint describes the fields, licence and freshness of one. Then there is one tool per endpoint:
| Tool | What it returns | REST |
|---|---|---|
airport_passengers | Passengers per airport and year | /v1/aviation/airports |
air_passengers_monthly | Air passengers in Sweden per month | /v1/aviation/passengers/monthly |
court_rulings | Published court rulings | /v1/courts/rulings |
court_rulings_by_court | Rulings per court | /v1/courts/rulings/by-court |
domains_dropped | Dropped .se and .nu domains on a date | /v1/domains/dropped |
domains_expiring | Domains about to be released | /v1/domains/expiring |
domains_valuable | Domains about to be released, with a value score | /v1/domains/expiring/valuable |
domain_lookup | One domain in the latest zone | /v1/domains/{name} |
domains_new | New .se and .nu domains on a date | /v1/domains/new |
debt_restructuring | Debt restructuring applications per month | /v1/economy/debt-restructuring |
debt_restructuring_by_age | Debt restructuring per year and age | /v1/economy/debt-restructuring/by-age |
electricity_balance | Electricity production and use per year | /v1/energy/electricity/balance |
electricity_forecast | Electricity production per source with forecast | /v1/energy/electricity/by-source |
foods | Foods and nutrients per 100 g | /v1/foods |
job_ads | Open job ads per day | /v1/jobs/ads |
job_ads_national | Open job ads in Sweden per day | /v1/jobs/ads/national |
medicine_shortages | Medicine shortages | /v1/medicines/shortages |
medicine_shortages_by_group | Ongoing shortages per ATC group | /v1/medicines/shortages/by-group |
medicine_shortages_monthly | New medicine shortages per month | /v1/medicines/shortages/monthly |
municipal_figures | Key figures per municipality and year (Kolada) | /v1/municipalities/figures |
municipal_figures_latest | Key figures per municipality, latest year | /v1/municipalities/figures/latest |
riksbank_rates | Policy rate and exchange rates per day | /v1/rates/riksbank |
swestr | Swestr per day | /v1/rates/swestr |
party_agreement | How often the parties vote alike | /v1/riksdag/party-agreement |
party_attendance | Votes and absence per party | /v1/riksdag/party-attendance |
stats_dnssec | DNSSEC adoption per zone and day | /v1/stats/dnssec |
stats_nameservers | Name server operators and market share | /v1/stats/nameservers |
consumer_prices | Consumer price index per month | /v1/sweden/cpi |
house_prices | House price index | /v1/sweden/house-prices |
population | Population per region and year | /v1/sweden/population |
population_latest | Population in the latest year and change | /v1/sweden/population/latest |
guest_nights | Guest nights per month | /v1/tourism/guest-nights |
guest_nights_by_country | Foreign guest nights per country and year | /v1/tourism/guest-nights/by-country |
guest_nights_by_county | Guest nights per county and year | /v1/tourism/guest-nights/by-county |
train_punctuality | Train punctuality per station and day | /v1/trains/punctuality |
train_punctuality_daily | Train punctuality in Sweden per day | /v1/trains/punctuality/daily |
weather_history | Weather per hour and station | /v1/weather/history |
weather_now | Current weather per SMHI station | /v1/weather/now |