RDW MCP Server

Truy vấn dữ liệu đăng ký xe RDW Hà Lan để lấy thông tin xe, nhiên liệu và dữ liệu khí thải bằng API dữ liệu mở chính thức của RDW.

Tài liệu

RDW MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server for querying Dutch RDW (Rijksdienst voor het Wegverkeer) vehicle registration data. Given a license plate (kenteken), it returns vehicle specs, fuel/emissions data, APK/inspection history, registration/ownership history, axle and body specifications, defect codes, and open-recall status - all from the official RDW open data API. Run it locally via stdio/npx, or deploy it as a remote MCP server on Cloudflare Workers and connect it directly to claude.ai.

Quick Start

Choose your preferred method:

  • Global Install (recommended): npm install -g rdw-mcp-serverrdw-mcp
  • NPX (no install): npx rdw-mcp-server
  • Local Dev: Clone repo → npm installnpm run buildnode build/index.js
  • Remote (Cloudflare Workers): No local process at all - deploy once, connect from claude.ai as a custom connector. See Deploy as a Remote MCP Server.

Test the installation:

rdw-mcp        # if globally installed
# OR
npx rdw-mcp-server  # if using npx

(Press Ctrl+C to stop)

Add to Claude Desktop (see Configuration section below)

Start asking questions like:

  • "Look up license plate 12-ABC-3"
  • "Show me the APK history and any technical defects for kenteken 1-ABC-23"

Features

  • Complete License Plate Lookup: Get available vehicle information from RDW databases by Dutch license plate (kenteken)
  • Comprehensive Vehicle Data: Basic specs, technical details, weights, dimensions, and registration information
  • Integrated Fuel & Emissions: Detailed fuel type, emissions, environmental specifications, and sound levels
  • APK Inspection History: Periodic inspection report history and resulting APK expiry dates
  • Registration History: Ownership/registration change history
  • Technical Specifications: Axle loads, body types, and detailed technical data
  • Defect Records: Defect codes found during inspections
  • Open-Recall Status: Whether the vehicle currently has an open manufacturer recall
  • Real-time Data: Access up-to-date information from official RDW databases
  • Remote or Local: Run locally via stdio/npx, or deploy as a serverless remote MCP server on Cloudflare Workers - see Deploy as a Remote MCP Server

Installation

Global Installation (Recommended for CLI usage)

npm install -g rdw-mcp-server

After global installation, you can run the server directly:

rdw-mcp

Using NPX (Run without installing)

npx rdw-mcp-server

This runs the package directly without installing it globally.

From Source (Local Development)

git clone https://github.com/yourusername/rdw-mcp-server.git
cd rdw-mcp-server
npm install
npm run build
node build/index.js

Usage

As a Global Command

After global installation, start the MCP server:

Stdio Mode (Default):

rdw-mcp

HTTP Mode:

rdw-mcp --http          # Runs on port 3000
rdw-mcp --http --port=8080  # Custom port

The server supports both stdio and HTTP transports:

  • Stdio: For direct command-line and Claude Desktop integration
  • HTTP: For remote access, web integrations, and scalable deployments

HTTP Transport Features

When running in HTTP mode (--http), the server provides:

  • MCP Endpoint: POST /mcp - Main MCP protocol endpoint
  • Health Check: GET /health - Server status and version info
  • CORS Support: Cross-origin requests enabled for web integrations
  • Stateless Design: No session management, perfect for scaling
  • Error Handling: Proper HTTP status codes and JSON-RPC error responses

Example HTTP Usage:

# Start HTTP server
rdw-mcp --http --port=3000

# Health check
curl http://localhost:3000/health

# MCP requests (requires proper JSON-RPC format)
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

In MCP Client Configuration (VS Code)

VS Code's MCP support (.vscode/mcp.json) uses a servers key with an explicit type:

Using global installation (recommended):

{
  "servers": {
    "rdw": {
      "type": "stdio",
      "command": "rdw-mcp"
    }
  }
}

Using npx (alternative):

{
  "servers": {
    "rdw": {
      "type": "stdio",
      "command": "npx",
      "args": ["rdw-mcp-server"]
    }
  }
}

For Claude Desktop, use the mcpServers key shown in Configuration for Claude Desktop below instead.

Local Development Mode

For local development from source:

git clone https://github.com/yourusername/rdw-mcp-server.git
cd rdw-mcp-server
npm install
npm run build
node build/index.js

Development Mode

For development with auto-rebuild:

npm run dev

Deploy as a Remote MCP Server (Cloudflare Workers)

This repo also includes a Cloudflare Worker entry point (src/worker.ts) that exposes the same rdw-license-plate-lookup tool as a remote MCP server - no local process, no tunnel, no container. Since this tool only proxies public RDW open data (no secrets, no user data), it can be added to claude.ai without OAuth.

This is entirely additive: the existing npx rdw-mcp-server / Claude Desktop stdio setup described above is unaffected.

Option A: Deploy via the Cloudflare dashboard (no local CLI required)

  1. Fork or push this repo to your own GitHub account.
  2. In the Cloudflare dashboard: Workers & Pages → Create → Import a Git repository.
  3. Authorize Cloudflare's GitHub App (one-time OAuth click) and select your repo.
  4. Cloudflare auto-detects wrangler.jsonc and pre-fills the build/deploy command. Click Save and Deploy.
  5. Cloudflare runs npm install + wrangler deploy in the cloud and gives you a live URL, e.g. https://rdw-mcp-worker.<your-subdomain>.workers.dev.
  6. Every future push to the connected branch automatically rebuilds and redeploys.

Option B: Deploy locally with Wrangler

npm install
npm run cf:dev          # local Worker at http://localhost:8787

Verify locally with the MCP Inspector:

npx @modelcontextprotocol/inspector
# connect to http://localhost:8787/mcp (Streamable HTTP) or http://localhost:8787/sse (SSE)

Then deploy:

npx wrangler login   # first time only
npm run deploy

Add it to claude.ai

  1. claude.ai → Settings → Connectors → Add custom connector.
  2. Paste your deployed URL with the /mcp path, e.g. https://rdw-mcp-worker.<your-subdomain>.workers.dev/mcp.
  3. Leave the OAuth Client ID/Secret fields blank - this server is authless.
  4. Click Add, then enable it via + → Connectors in a conversation.
  5. Try: "Look up license plate 12-ABC-3".

Notes

  • The Worker is public once deployed - anyone with the URL can call the RDW lookup through it. That's fine given it only proxies already-public RDW data with no auth on the RDW side either, but keep it in mind before adding write actions or private data in the future (at that point, add an OAuth provider).
  • The Worker uses McpAgent (from the agents package), which is Durable-Object-backed and exposes both /mcp (Streamable HTTP) and /sse (legacy SSE) for broad client compatibility.

Available Tool

rdw-license-plate-lookup

Look up vehicle information from RDW databases by Dutch license plate.

Parameters:

  • kenteken (string): Dutch license plate to look up

Returns:

  • Vehicle information from RDW databases including:
    • Basic Details: Brand, model, color, type, variant, version
    • Technical Specifications: Engine, power, dimensions, cylinders, displacement
    • Weight & Capacity: Empty weight, curb weight, towing capacity, axle loads
    • Registration Data: First registration, registration/ownership-change history, type approval
    • Inspection Records: APK expiry date, periodic inspection report history, defect codes found
    • Fuel & Emissions: Fuel type, emissions levels, CO2 class, sound levels
    • Safety Information: Open-recall status (RDW's open data doesn't expose per-vehicle recall history, only whether a recall is currently open)
    • Body Specifications: Carrosserie type, European classifications
    • Financial Data: Catalog price, BPM tax information
    • Status Indicators: Export status, taxi indicator, insurance status

Example: Look up license plate "12-ABC-3" for complete RDW database information

Requirements

  • Node.js: Version 18.0.0 or higher
  • npm: Version 8.0.0 or higher (comes with Node.js)
  • Internet connection: Required for accessing RDW API

Configuration for Claude Desktop

To use this MCP server with Claude Desktop, add the following to your claude_desktop_config.json:

Using Global Installation (Recommended)

If you installed globally with npm install -g rdw-mcp-server:

{
  "mcpServers": {
    "rdw": {
      "command": "rdw-mcp"
    }
  }
}

Using NPX (Alternative)

If you prefer not to install globally:

{
  "mcpServers": {
    "rdw": {
      "command": "npx",
      "args": ["rdw-mcp-server"]
    }
  }
}

Development Mode Only

For development with local source code:

Windows

{
  "mcpServers": {
    "rdw": {
      "command": "node",
      "args": ["C:\\ABSOLUTE\\PATH\\TO\\rdw-mcp\\build\\index.js"]
    }
  }
}

macOS/Linux

{
  "mcpServers": {
    "rdw": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/rdw-mcp/build/index.js"]
    }
  }
}

Data Sources

This server uses official RDW (Dutch vehicle authority) open data APIs, verified live against opendata.rdw.nl:

  • Base API: https://opendata.rdw.nl/resource/
  • Vehicle Registration: Dataset m9d7-ebf2 - Basic vehicle information and specifications
  • Fuel & Emissions: Dataset 8ys7-d773 - Fuel types, emissions, and environmental data
  • APK / Inspection Reports: Dataset sgfe-77wx ("Meldingen Keuringsinstantie") - Periodic inspection report history and resulting APK expiry dates
  • Registration History: Dataset db8s-mw3u ("Kenteken-tenaamstelling") - Registration/ownership-change history
  • Axle Specifications: Dataset 3huj-srit - Technical axle load specifications
  • Body Types: Dataset vezc-m2t6 - Carrosserie and body type classifications
  • Technical Defects: Dataset a34c-vvps ("Geconstateerde Gebreken") - Defect codes found during inspections

Note: RDW's open data does not expose a per-vehicle recall dataset (only a general recall-campaign catalog with no license-plate field) or a separate per-vehicle color history dataset - colors are already covered by the base vehicle record. Open-recall status comes from a flag on the base vehicle record instead.

All data is retrieved in real-time from official government sources and is publicly available.

Privacy & Data Usage

  • No Data Storage: This server does not store any vehicle data locally
  • Real-time Queries: All requests are forwarded directly to RDW APIs
  • Public Data Only: Only publicly available registration data is accessed
  • No Authentication: No personal or sensitive data is required or processed

Rate Limiting

The RDW API may impose rate limits. If you encounter rate limiting:

  • Wait a few seconds between requests
  • Avoid making bulk requests in quick succession
  • Consider implementing delays in your application logic

Example Queries

Once connected to an MCP client like Claude Desktop, you can ask questions like:

Complete Vehicle Information:

  • "Look up license plate 12-ABC-3"
  • "What information is available for kenteken XYZ-123?"
  • "Tell me about the vehicle with plate 1-ABC-23"
  • "Show me all data for license plate ABC-12-D"
  • "Get complete RDW information for kenteken DEF-456"

Specific Information Requests:

  • "What are the emissions data for kenteken ABC-12-D?"
  • "Show me the APK history for license plate XYZ-456"
  • "Are there any recalls for vehicle 12-ABC-3?"
  • "What's the registration history of kenteken DEF-456?"
  • "Show me technical defects for license plate GHI-789"

Technical & Safety Details:

  • "What's the towing capacity of vehicle 12-ABC-3?"
  • "Show me axle specifications for kenteken XYZ-456"
  • "Are there any open recalls for license plate ABC-12-D?"
  • "What defects were found during inspections for kenteken DEF-456?"
  • "Show me the complete inspection history for license plate GHI-789"

Technical Details

  • Language: TypeScript
  • Runtime: Node.js (stdio / HTTP) or Cloudflare Workers (remote MCP)
  • Protocol: Model Context Protocol (MCP)
  • Transport: Standard I/O (stdio), Streamable HTTP, or SSE (Cloudflare Workers deployment)
  • Validation: Zod schemas for input validation
  • API: RESTful calls to RDW open data endpoints

Error Handling

The server includes comprehensive error handling for:

  • Invalid license plates (wrong format or non-existent)
  • Network connectivity issues
  • API rate limiting and timeouts
  • Missing or malformed data from RDW API
  • Invalid search parameters

Troubleshooting

Common Issues

Server not starting:

  • Ensure Node.js version is 18.0.0 or higher: node --version
  • Try reinstalling: npm uninstall -g rdw-mcp-server && npm install -g rdw-mcp-server

No data returned:

  • Check your internet connection
  • Verify the license plate format (Dutch plates: XX-XXX-X, XXX-XX-X, etc.)
  • Some older vehicles may not have complete data in the RDW database

Claude Desktop connection issues:

  • Verify your configuration matches the installation method (global vs npx)
  • If using global installation, ensure rdw-mcp command works in terminal
  • If using npx, ensure npx rdw-mcp-server works in terminal
  • Restart Claude Desktop after configuration changes
  • For development setups, ensure the absolute path and build directory are correct

Getting Help

If you encounter issues:

  1. Check the console output for error messages
  2. Verify your license plate format matches Dutch standards
  3. Test with known valid license plates
  4. Ensure you have an active internet connection

License

MIT

Contributing

Contributions are welcome! This MCP server can be extended with additional RDW datasets or functionality.

Development Setup

  1. Clone the repository:

    git clone https://github.com/jodur/rdw-mcp-server.git
    cd rdw-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build and test:

    npm run build
    npm start
    

Available RDW Datasets

The RDW provides many more datasets that could be integrated, beyond what's already used above:

  • Taxi and bus registrations
  • Fuel-specific technical variants
  • Import/export vehicle history

Code Style

  • Use TypeScript with strict typing
  • Follow existing code patterns
  • Add JSDoc comments for all functions
  • Use Zod for input validation
  • Include proper error handling

Changelog

Version 2.3.0

  • NEW: Remote MCP server on Cloudflare Workers: Added src/worker.ts, deployable via the Cloudflare dashboard (Git integration, no CLI needed) or wrangler deploy. Exposes /mcp (Streamable HTTP) and /sse, authless - connect it directly from claude.ai as a custom connector.
  • Shared tool logic: Extracted the RDW lookup tool into src/rdw-lib.ts, imported unchanged by both the Node entry point and the Worker - no duplicated logic, no behavior change to the existing stdio/HTTP distribution.
  • Fixed data gap: The tool previously claimed to return APK history, recalls, ownership history, and defects but never actually fetched them (endpoint doesn't exist assumptions that turned out to be wrong). Verified live against opendata.rdw.nl and wired up the real datasets for APK/inspection history (sgfe-77wx), registration/ownership history (db8s-mw3u), and defects found (a34c-vvps).
  • Corrected claims: Tool description and README no longer claim recall-history or per-vehicle color-history data that RDW's open API doesn't actually expose - recall status is now accurately described as an open/closed flag, not a history.

Version 2.1.0

  • NEW TRANSPORT: Added Streamable HTTP transport support (stateless)
  • SDK Compliance: Updated to modern MCP TypeScript SDK patterns
  • HTTP Features: Express.js server with /mcp endpoint and /health check
  • Command Line: Added --http and --port=N arguments for HTTP mode
  • CORS Support: Cross-origin requests enabled for web integrations
  • Stateless Design: New server instance per request, perfect for scaling
  • Modern API: Updated from deprecated server.tool() to server.registerTool()
  • Enhanced Structure: Better code organization with separated functions
  • Dual Transport: Supports both stdio (default) and HTTP transports

Version 2.0.0

  • MAJOR ENHANCEMENT: Now queries ALL available RDW databases in a single lookup
  • Added APK inspection history and records
  • Added vehicle recall and safety action information
  • Added complete registration/ownership history
  • Added axle load specifications and technical data
  • Added body type and carrosserie classifications
  • Added technical defect records and inspection findings
  • Added additional color information
  • Enhanced parallel data fetching for improved performance
  • Comprehensive vehicle data from 8+ RDW datasets
  • Updated tool description and documentation

Version 1.1.0

  • BREAKING CHANGE: Simplified to single comprehensive lookup tool
  • Integrated all fuel and emissions data into main license plate lookup
  • Removed separate fuel/emissions and vehicle search tools
  • Enhanced fuel/emissions data display with emission codes and soot emissions
  • Improved data completeness in single query

Version 1.0.2

  • Comprehensive README improvements for npm users
  • Enhanced installation and usage instructions
  • Added troubleshooting and privacy sections
  • Improved example queries and development setup
  • Fixed package.json references to removed test files

Version 1.0.1

  • Enhanced vehicle data output
  • Improved license plate normalization
  • Added comprehensive error handling
  • Enhanced documentation

Version 1.0.0

  • Initial release
  • Basic license plate lookup
  • Fuel and emissions data
  • Vehicle search by brand/model

Disclaimer

This server uses public RDW data and is not affiliated with the official RDW organization. Always verify critical vehicle information through official channels.