Skip to main content
Glama

SVV-MCP-unofficial

⚠️ Unofficial project. This is a community-built MCP server and is not created, operated by, or affiliated with Statens vegvesen (SVV) in any way. "SVV" in the name only describes which data source the server uses. The data served is retrieved from Statens vegvesen's own open DATEX II endpoints, and use is subject to their terms (see License).

MCP server (Model Context Protocol) that gives an LLM access to Statens vegvesen's open real-time data via DATEX II:

  • 🌡️ Weather measurements from the road administration's weather stations (road surface temperature, air temperature, wind, dew point), with automatic warnings about slippery road surfaces

  • 🌦️ Weather forecasts (hour by hour, 24h ahead)

  • 📷 Web cameras along the road network

  • 🚗 Travel times in real time on main stretches

  • ⚠️ Traffic messages (accidents, roadworks, closures, landslides/floods, etc.)

  • 🔧 A built-in troubleshooting tool that shows the raw XML structure, since NPRA's schema can change

All DATEX endpoints require a registered user account with Statens vegvesen (free). Request access here →


Contents


Related MCP server: aria-mcp-trafik-dk

Get started locally

Requires Python 3.10+.

git clone https://github.com/<ditt-brukernavn>/svv-mcp-unofficial.git
cd svv-mcp-unofficial
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

cp .env.example .env
# rediger .env og fyll inn DATEX_USERNAME / DATEX_PASSWORD

export $(grep -v '^#' .env | xargs)   # eller bruk python-dotenv
python server.py

Without PORT set in the environment, the server starts over stdio — convenient for local testing with MCP Inspector:

npx @modelcontextprotocol/inspector python server.py

Set up the GitHub repository

  1. Create a new (empty) repository on GitHub, e.g. svv-mcp-unofficial.

  2. Push the code:

    cd svv-mcp-unofficial
    git init
    git add .
    git commit -m "Initial commit: svv-mcp-unofficial server"
    git branch -M main
    git remote add origin https://github.com/<ditt-brukernavn>/svv-mcp-unofficial.git
    git push -u origin main
  3. Important: .env is already in .gitignore — double-check that you never commit actual DATEX usernames/passwords. Instead, add .env.example (without values), which is already in the repository.

Login mode: shared account vs. per user

The server supports two modes, controlled by whether SVV_MCP_PUBLIC_URL is set:

Shared account

Multi-user (OAuth)

Environment variables

DATEX_USERNAME / DATEX_PASSWORD

SVV_MCP_PUBLIC_URL, CREDENTIAL_ENCRYPTION_KEY

Whose DATEX account is used

Yours, shared by everyone

Each user's own

Onboarding for new users

None

Logs in with their own DATEX password the first time

Requires Railway volume

No

Yes (stores encrypted credentials)

Multi-user mode lets you share a single Railway URL with others without them needing their own server: when someone adds the connector in Claude, they are sent to a login page hosted by the server itself (/login), where they paste in their own DATEX username/password and see a link for how to obtain one. Credentials are stored encrypted (Fernet) in a SQLite file on a Railway volume, tied to a token the MCP server issues to Claude.

Set up multi-user mode on Railway

  1. Add a volume to the service, mounted at /data (Railway dashboard: Settings → Volumes → New Volume, mount path /data).

  2. Generate an encryption key:

    python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
  3. Set the variables on the service:

    • SVV_MCP_PUBLIC_URL = your Railway URL (e.g. https://svv-mcp-unofficial-production.up.railway.app)

    • CREDENTIAL_ENCRYPTION_KEY = the key from step 2

    • SVV_MCP_DB_PATH = /data/svv_mcp.db

    • Do not set DATEX_USERNAME/DATEX_PASSWORD in this mode

  4. Redeploy. /mcp now requires OAuth; /login is the self-hosted login page.

Test the OAuth flow before sharing the URL further

This is the most complex part of the project and should be tested manually once:

npx @modelcontextprotocol/inspector

Point Inspector at https://<your-domain>/mcp, choose authentication, and go through the entire flow (you are sent to /login, fill in test values, are sent back, tool calls work). Check the Railway logs if anything fails — the authorization server code in auth.py uses the SDK's OAuthAuthorizationServerProvider interface, which may have differing field names between SDK versions; the logs will show exactly which method/field does not match.

Deploy to Railway

Option A — via the Railway dashboard (easiest):

  1. Log in to railway.appNew ProjectDeploy from GitHub repo.

  2. Select your svv-mcp-unofficial repository. Railway finds the Dockerfile automatically.

  3. Go to Variables on the service and enter the variables for the desired mode (see the table above).

  4. Railway sets PORT automatically — the server then starts in Streamable HTTP mode and listens on 0.0.0.0:$PORT.

  5. Under Settings → Networking, click Generate Domain to get a public URL (e.g. https://svv-mcp-unofficial-production.up.railway.app).

  6. The MCP endpoint then becomes: https://<your-domain>/mcp

Option B — via the Railway CLI:

npm i -g @railway/cli
railway login
railway init
railway up
railway variables --set "DATEX_USERNAME=..." --set "DATEX_PASSWORD=..."
railway domain

The server uses Streamable HTTP (not SSE), which is the recommended transport for external MCP servers in the current specification.

Connect to the server

Claude.ai / Claude app (custom connector)

  1. Go to Settings → Connectors → Add custom connector.

  2. Paste in your Railway URL, e.g. https://<your-domain>/mcp

  3. Give it a name, e.g. "Statens vegvesen".

  4. Turn it on in your conversation under tools/connectors.

Shared account mode: no extra steps — DATEX_USERNAME/DATEX_PASSWORD are on the server, not in the conversation.

Multi-user mode: Claude automatically sends you to the /login page on the server the first time you connect. Enter your own DATEX username/password there (the page also shows how to get one if you don't have it yet, and which tools DATEX access actually gives you). If you don't want to get DATEX access, you can choose "Continue without account" — then you only get hent_apen_vegdata (NVDB, no login required).

Claude Desktop (stdio, local)

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "vegvesen": {
      "command": "python",
      "args": ["/full/path/til/svv-mcp-unofficial/server.py"],
      "env": {
        "DATEX_USERNAME": "...",
        "DATEX_PASSWORD": "..."
      }
    }
  }
}

(Multi-user mode requires HTTP and does not work over stdio.)

Other MCP clients

Any client that supports Streamable HTTP can point directly at https://<your-domain>/mcp.

Available tools

Tool

Description

hent_vaermalinger

Real-time weather measurements from road stations, with slippery road surface warnings

hent_vaerstasjoner

Location (coordinates/road/name) of weather stations

hent_vaerprognose

Hourly weather forecast, 24h ahead

hent_vaerprognose_punkter

Location of forecast points

hent_webkamera

Overview of web cameras along the road network

hent_reisetider

Real-time travel times on main stretches

hent_reisetid_strekninger

Geometry/name of stretches with measured travel times

hent_trafikkmeldinger

Accidents, roadworks, closures, landslides/floods, etc.

inspiser_datex_publikasjon

Troubleshooting: shows the raw tag structure from a given DATEX endpoint

hent_apen_vegdata

Open road data from NVDB (speed limits, rest areas, AADT, etc.) — does not require DATEX login

All "hent" tools take the same parameters:

  • sokeord (optional) — filters on all field values, e.g. "E18", "Hemsedal"

  • maks_antall (default 10) — maximum number of records in the response

  • format"markdown" (readable) or "json" (structured)

Troubleshooting

  • "401 Unauthorized"DATEX_USERNAME/DATEX_PASSWORD are missing or incorrect on the server (shared account mode), or the user needs to reconnect to log in (multi-user mode).

  • Empty/unexpected results → run inspiser_datex_publikasjon against the relevant publication (see the table of DATEX_ENDPOINTS keys in server.py) to see exactly which XML tags NPRA is sending right now, and adjust candidate_tags in the relevant tool as needed.

  • Timeout → NPRA's DATEX node may be temporarily down; try again in a bit, or check operational notices on vegvesen.no.

  • OAuth error when connecting (multi-user mode) → see the Railway logs and the "Test the OAuth flow" section above.

License

The data is available under the Norwegian Licence for Open Government Data (NLOD). Credit Statens vegvesen as the source when using the data, as NPRA requests.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to query Norges Bank's open data API for exchange rates, policy rates, government securities, money market data, bank liquidity, and regional network survey data.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides access to real-time Danish road traffic events, roadworks, and queues via public data from Vejdirektoratet, enabling AI assistants to check road conditions without any API keys.
    3
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time access to Swedish road weather, traffic cameras, road conditions, and traffic flow data from Trafikverket (Swedish Transport Administration). Enables users to query weather stations, cameras, traffic situations, and flow data through natural language.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides access to Norway's nationwide public transport data (all modes) via the Entur API, enabling queries about routes, stops, and departures through natural language.
    6
    MIT

View all related MCP servers

Related MCP Connectors

  • Norwegian transport (Entur) and geodata (Kartverket): trips, departures, addresses, elevation.

  • Entur MCP — Norway public transport, nationwide, all modes (developer.entur.org)

  • Weather forecasts from MET Norway (Yr): geocoding plus hourly forecasts worldwide.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mythso/svv-mcp-unofficial'

If you have feedback or need assistance with the MCP directory API, please join our Discord server