Vehicle Intelligence MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Vehicle Intelligence MCP Server Look up VIN JTDBT923601123456 with evidence and revision history."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Vehicle Intelligence MCP Server
A read-only MCP server for evidence-preserving access to audited New Zealand vehicle records.
A canonical value is not enough when the underlying sources disagree. This server gives MCP clients the value, provenance, confidence, conflicts, revision history, and source observations needed to inspect the result.
The server is a typed integration layer over the NZ Vehicle Data Pipeline. The upstream pipeline is a deterministic data integration service that captures conflicting vehicle records across disparate sources (VPIC specifications, dealer feeds, fleet data, and risk registers), normalizes them, reconciles competing candidate values with field-level provenance and confidence scoring, and publishes immutable canonical revisions.
This MCP server exposes that evidence through six focused MCP tools without duplicating the pipeline's decision logic or connecting directly to the underlying database.
What the server provides
Evidence with every result: Canonical fields retain provenance, confidence, conflict state, and synthetic-data notices.
Explicit uncertainty:
UNKNOWN,UNRESOLVED, and absent values remain distinct.Point-in-time audit: Clients can inspect monotonic history and retrieve an exact immutable revision.
Controlled source access: Raw payloads appear only through an explicit source-observation lookup.
Transport parity: The same tool catalog and behavior are available over stdio and Streamable HTTP.
Defensive boundaries: Strict schemas, bounded responses, timeouts, retries, safe errors, and loopback-first HTTP defaults protect each trust boundary.
Related MCP server: ECRVSP Documentos: Baixar Veículo
Architecture
MCP client
│
├── stdio
└── Streamable HTTP http://127.0.0.1:8080/mcp
│
▼
Vehicle Intelligence MCP Server
├── strict tool-input validation
├── evidence-preserving result projection
├── stable error translation
└── typed asynchronous pipeline client
│
▼ HTTP /v1
NZ Vehicle Data Pipeline API
├── canonical records
├── reconciliation and confidence
├── immutable revisions
└── source observationsThe MCP server has no database and no application cache. All vehicle-data reads pass through one typed asynchronous HTTP client.
Quick start
Prerequisites
Git
Python 3.12
uv 0.5.26 or later
Docker with Docker Compose
curl
Run the verified demonstration
The smoke script starts both services, seeds deterministic scenarios, exercises both MCP transports, and removes its containers when complete.
mkdir vehicle-intelligence-demo
cd vehicle-intelligence-demo
git clone https://github.com/sovorn-c/nz-vehicle-data-pipeline.git
git -C nz-vehicle-data-pipeline checkout ea49e71075118d6cdc3ed2426cb3620f69792cf6
git clone https://github.com/sovorn-c/vehicle-mcp-server.git
cd vehicle-mcp-server
uv sync --frozen
PIPELINE_DIR="../nz-vehicle-data-pipeline" bash scripts/smoke-local.shA successful run demonstrates:
catalog discovery from five seeded vehicles
clean, risky, unknown, and conflicting evidence states
immutable revision history
exact source-observation retrieval
identical stdio and Streamable HTTP outcomes
Run the server
The upstream pipeline API must be available before the MCP server starts. Its default address is http://localhost:8000.
Start the upstream pipeline (manual testing)
If you are running the MCP server directly or interactively, start and seed the upstream NZ Vehicle Data Pipeline first:
cd /path/to/nz-vehicle-data-pipeline
docker compose up -d --build api
docker compose --profile tools run --rm seed
docker compose --profile tools run --rm seed python -m nz_vehicle_data_pipeline.cli.seed --manifest fixtures/manifest.json --phase2Verify backend readiness:
curl -s http://localhost:8000/ready
# Output: {"status":"ready","database":"connected"}stdio
VEHICLE_MCP_PIPELINE_BASE_URL="http://localhost:8000" \
uv run vehicle-mcp-serverStandard output is reserved for MCP protocol messages. Server diagnostics use standard error.
Streamable HTTP
VEHICLE_MCP_TRANSPORT="http" \
VEHICLE_MCP_HTTP_HOST="127.0.0.1" \
VEHICLE_MCP_HTTP_PORT="8080" \
VEHICLE_MCP_PIPELINE_BASE_URL="http://localhost:8000" \
uv run vehicle-mcp-serverThe MCP endpoint is http://127.0.0.1:8080/mcp.
Docker Compose
PIPELINE_BASE_URL="http://host.docker.internal:8000" \
docker compose up -d --buildDocker Compose publishes the MCP endpoint on loopback at 127.0.0.1:8080.
Container image
Version tags publish a linux/amd64 image to GitHub Container Registry. .github/workflows/release.yml builds it, attaches a build-provenance attestation, and refuses to publish unless the tag, pyproject.toml, and package version agree.
docker pull ghcr.io/sovorn-c/vehicle-mcp-server:0.4.1
gh attestation verify oci://ghcr.io/sovorn-c/vehicle-mcp-server:0.4.1 --owner sovorn-cRun it against a pipeline on the host, publishing the endpoint on loopback only:
docker run --rm -p 127.0.0.1:8080:8080 \
-e VEHICLE_MCP_PIPELINE_BASE_URL="http://host.docker.internal:8000" \
ghcr.io/sovorn-c/vehicle-mcp-server:0.4.1Behind a public hostname, also set VEHICLE_MCP_ALLOWED_HOSTS and VEHICLE_MCP_ALLOWED_ORIGINS (comma-separated) to that hostname. Deployments should pin the image digest rather than the tag.
Connect an MCP client
The server is model- and client-agnostic. Any MCP client that supports stdio or Streamable HTTP can use the same six tools.
Public ready-to-test demo
A hosted Streamable HTTP endpoint is available for a quick evaluation without running the services locally:
https://vehicle-mcp.chhlatbot.com/mcpVerified live on 2026-09-01. Add it to the Codex CLI:
codex mcp add vehicle-intelligence-public \
--url https://vehicle-mcp.chhlatbot.com/mcpStart Codex, run /mcp to confirm vehicle-intelligence-public is connected, then try:
Use vehicle-intelligence-public to list the available vehicles. Report their makes and total count.The hosted endpoint contains synthetic demonstration data only and has no uptime SLA. If it is unavailable, use the local stdio setup below, which remains the primary supported setup.
OpenAI Codex (local stdio)
Register the stdio server with the Codex CLI. Replace /path/to/vehicle-mcp-server with the local repository path.
codex mcp add vehicle-intelligence \
--env VEHICLE_MCP_TRANSPORT=stdio \
--env VEHICLE_MCP_PIPELINE_BASE_URL=http://localhost:8000 \
-- uv run --directory /path/to/vehicle-mcp-server vehicle-mcp-serverVerify the shared Codex CLI and IDE-extension configuration:
codex mcp listSee the official Codex MCP configuration guide for UI and config.toml alternatives.
Claude Desktop
Add this entry to claude_desktop_config.json. Replace /path/to/vehicle-mcp-server with the local repository path.
{
"mcpServers": {
"vehicle-intelligence": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/vehicle-mcp-server",
"vehicle-mcp-server"
],
"env": {
"VEHICLE_MCP_TRANSPORT": "stdio",
"VEHICLE_MCP_PIPELINE_BASE_URL": "http://localhost:8000"
}
}
}
}MCP Inspector
Test and inspect tool schemas and queries interactively in your browser with the official MCP Inspector:
# stdio transport (spawns the server as a subprocess)
npx @modelcontextprotocol/inspector uv run vehicle-mcp-server
# Streamable HTTP transport (start the HTTP server first)
npx @modelcontextprotocol/inspector http://127.0.0.1:8080/mcpOther MCP clients
Use these connection values in clients that provide their own MCP configuration interface:
Transport | Connection |
stdio | Command: |
Streamable HTTP | URL: |
Tool catalog
Tool | Main input | Purpose |
|
| Return one bounded page of canonical vehicle summaries for discovery. |
|
| Return the current canonical record with provenance, conflicts, confidence, and revision metadata. |
|
| Explain whether one field is |
|
| Return bounded revision history in newest-first order. |
|
| Return one exact immutable canonical revision. |
|
| Return one exact source observation and its verified raw payload. |
Catalog pagination accepts limit values from 1 through 100 and an offset of zero or more. An offset beyond the catalog returns an empty page, not an error.
Discovery-to-audit workflow
Call
list_vehiclesto discover available records and identify conflicts or later revisions.Call
lookup_vehicleto inspect the current canonical state and its audit metadata.Call
explain_vehicle_fieldto inspect a resolved, unresolved, or absent field.Call
get_vehicle_historyandget_vehicle_revisionto compare point-in-time states.Call
get_source_observationwith a provenance identifier to inspect the original evidence.
This workflow moves from a bounded summary to raw evidence without placing full payloads in every result.
Engineering decisions
Decision | Reason |
Keep reconciliation in the pipeline | One system owns candidate selection, confidence, conflicts, and revision publication. |
Use one typed pipeline client | All upstream reads share validation, timeout, retry, response-size, and error rules. |
Validate both inputs and responses | The MCP boundary rejects invalid calls and fails closed on upstream contract drift. |
Preserve uncertain states | The integration layer does not turn incomplete evidence into a definitive claim. |
Keep tools transport-independent | stdio and Streamable HTTP expose the same schemas and behavior. |
Avoid local persistence | The server cannot return a silent stale fallback when the pipeline is unavailable. |
Security and limitations
The server never connects directly to the pipeline database.
VINs, observation identifiers, tool arguments, and pipeline responses are treated as untrusted input.
Pipeline responses have a configurable size ceiling. Transient idempotent reads use bounded retries.
Raw exceptions, stack traces, credentials, and upstream payload values do not enter public errors or diagnostics.
Streamable HTTP enables DNS-rebinding protection with loopback Host and Origin allowlists.
Non-loopback binding requires the explicit
VEHICLE_MCP_ALLOW_INSECURE_BIND=trueoverride.Raw source payloads are available only through
get_source_observation.Synthetic records retain a visible
synthetic_notice.The project does not claim live access to NZTA, PPSR, Police, insurer, or other restricted registers.
The current HTTP mode is for local or private use. Add authentication, authorization, and rate limiting before public deployment.
Configuration
Environment variable | Default | Purpose |
|
| Pipeline API base URL. |
|
| Select |
|
| Streamable HTTP bind host. |
|
| Streamable HTTP bind port. |
|
| Permit a non-loopback bind for a controlled container network. |
|
| Pipeline connection timeout in seconds. |
|
| Connection-pool timeout in seconds. |
|
| Pipeline read timeout in seconds. |
|
| Pipeline write timeout in seconds. |
|
| Maximum attempts for transient reads. Valid range: 1 through 5. |
|
| Maximum pipeline response size. Valid range: 10 KiB through 10 MiB. |
Project layout
src/vehicle_mcp_server/
├── client.py # typed asynchronous pipeline boundary
├── config.py # immutable environment configuration
├── models.py # strict tool and upstream contracts
├── server.py # MCP catalog and transport application
└── tools.py # tool behavior and safe error translation
tests/
├── acceptance/ # public documentation and delivery contracts
├── integration/ # live pipeline contract checks
└── test_*.py # unit, transport, security, and parity testsVerification
Run the complete local preflight:
bash scripts/check.shThe preflight runs Ruff, formatting checks, strict mypy, pytest, a package build, and a Docker build.
Individual developer checks
Check | Command |
Test suite (unit, contract, mock integration) |
|
Strict type checking |
|
Linting |
|
Format verification |
|
Package build |
|
Container build |
|
Standalone demonstration client
With the upstream pipeline running at http://localhost:8000 (and optionally the MCP HTTP server on http://127.0.0.1:8080):
uv run python -m vehicle_mcp_server.demoRun the cross-repository behavior check:
PIPELINE_DIR="../nz-vehicle-data-pipeline" bash scripts/smoke-local.shThe CI workflow repeats the preflight stages and runs the smoke check against the pinned compatible pipeline revision.
Deployers can call .github/workflows/public-smoke.yml as a reusable workflow with a target_url and an optional direct_origin_host. It runs the six-tool journey and the negative security probes against that URL.
Project status
Release 0.4.1 provides six read-only tools over stdio and Streamable HTTP with hardened public deployment and edge rate-limiting contracts, attested GHCR container images, and a reusable post-deploy smoke workflow.
Available Tools
6 toolsexplain_vehicle_fieldB
Explain one vehicle field outcome (RESOLVED, UNRESOLVED, or ABSENT) using current evidence.
Inputs: vin (required), field_name (required). Returns: Deterministic projection of one vehicle field's current evidence state.
get_source_observationA
Retrieve one exact immutable source observation by ID, including verified raw payload.
Inputs: observation_id (required). Returns: Exact immutable source observation containing raw source evidence.
get_vehicle_historyB
Retrieve historical canonical revisions for a vehicle in newest-first order.
Inputs: vin (required), limit, before_revision. Returns: result
get_vehicle_revisionA
Retrieve one exact immutable canonical revision for a vehicle by revision number.
Inputs: vin (required), revision_number (required). Returns: Canonical vehicle revision representation validated at the upstream boundary.
list_vehiclesB
List a bounded page of canonical vehicle summaries from the catalog for discovery.
Inputs: limit, offset. Returns: Paginated collection of canonical vehicle summaries.
lookup_vehicleA
Retrieve the current canonical record and audit metadata for one validated VIN.
Inputs: vin (required). Returns: Canonical vehicle revision representation validated at the upstream boundary.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: browsing, current lookup, revision history, exact revision, raw observation, and field explanation. The closest pair is lookup_vehicle and get_vehicle_revision, but their current-vs-immutable distinction is clear from descriptions.
Names follow a mostly consistent verb_noun snake_case pattern with list_* for collections and get_* for individual records. lookup_vehicle breaks the get_* convention slightly, but it is still readable and predictable.
Six tools is well within the ideal range and each tool addresses a distinct part of vehicle intelligence. The set feels neither thin nor bloated.
The read-only workflow is well covered: discover vehicles, retrieve current and historical canonical states, fetch raw evidence, and explain field outcomes. A minor gap is the lack of a way to enumerate source observations for a vehicle directly rather than by known observation ID.
Maintenance
Related MCP Connectors
Read-only MCP for Copart and IAA/IAAI search, history, filters, locations, shipping, and usage.
Identity-first automotive intelligence for vehicle resolution, specs, safety and efficiency.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Look up vehicle identity, safety, fuel economy, and recorded market history by VIN.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables searching current used car, truck, and motorcycle parts in the US, resolving vehicles via VIN, and retrieving part listings with source attribution, through read-only MCP tools.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables consultation of vehicle documents from an official source via a single read-only tool, with prepaid per-query pricing and compatibility across MCP clients.MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying vehicle registration information (BIN RENAVAM) from the official ECRVSP source. Read-only, prepaid per use, works with any MCP client.MIT
- AlicenseNot gradedqualityBmaintenanceProvides read-only access to open, verified vehicle brand, model, and specification data (Italy first, later EU) through MCP tools, enabling AI agents and apps to query the dataset programmatically.1Apache 2.0