car-price-mcp
Provides read-only tools for querying a SQLite database of finished used-car auctions, including listing models, searching comparable sales, estimating prices, and summarising market trends. Supports custom SQLite database files via --db or CAR_PRICE_DB.
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., "@car-price-mcp What would a 2016 Skoda Octavia diesel with 190,000 km sell for?"
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.
car-price-mcp
A small Model Context Protocol server that lets an AI agent look up used-car auction prices. It gives Claude Code, or any other MCP client, four read-only tools over a SQLite database of finished auctions. With them the agent can find comparable sales, estimate what a car would sell for and summarise how a model is trading.
I co-run a small used-car business in Finland and we price cars from auction results every week. This is the lookup part of that work pulled out into its own server, so the agent can run the comparables search itself instead of me pasting tables into a chat.
The data in this repo is synthetic. The schema follows my private auction database (without plates,
VINs or listing text), but every row comes from sample_data.py with
a fixed seed. Don't use the numbers to price a real car.
30-second demo
You need Python 3.10 or newer and Claude Code.
git clone https://github.com/macte02/car-price-mcp
cd car-price-mcp
python -m venv .venv
.venv/bin/pip install -e .
claude mcp add car-prices -- "$PWD/.venv/bin/car-price-mcp"On Windows the last two lines are .venv\Scripts\pip install -e . and
claude mcp add car-prices -- "$PWD\.venv\Scripts\car-price-mcp.exe" in PowerShell.
Start claude, check with /mcp that car-prices is connected, and ask something like
What would a 2016 Skoda Octavia diesel with 190,000 km go for at auction?
Claude calls estimate_price and gets this back (cut down to two of the five closest sales)
{
"make": "Skoda",
"model": "Octavia",
"year": 2016,
"mileage_km": 190000,
"estimate_eur": 5900,
"range_eur": [4200, 7650],
"comparables": 14,
"match": "close match",
"criteria": "model year 2015-2017, 165,000-215,000 km, same fuel",
"confidence": "medium",
"closest_sales": [
{"ad_id": "demo-01774", "end_time": "2026-07-08", "year": 2016, "mileage_km": 195000,
"engine": "2.0 TDI", "transmission": "manual", "sold_price": 6850, "bid_count": 5, "...": "..."},
{"ad_id": "demo-01089", "end_time": "2026-09-18", "year": 2016, "mileage_km": 178000,
"engine": "1.6 TDI", "transmission": "manual", "sold_price": 3600, "bid_count": 24, "...": "..."}
],
"method": "Median of accepted auction prices for similar cars. The range is the middle half (25th to 75th percentile)."
}If you'd rather not clone anything, uv can run it straight from GitHub.
claude mcp add car-prices -- uvx --from git+https://github.com/macte02/car-price-mcp car-price-mcpOther MCP clients such as Claude Desktop and Cursor take the same command in their JSON config.
{
"mcpServers": {
"car-prices": {
"command": "/path/to/car-price-mcp/.venv/bin/car-price-mcp"
}
}
}Related MCP server: SQLite MCP Server
What the agent gets
Tool | What it does |
| Makes and models in the data with auction counts and the model years covered. Useful when the agent isn't sure how a name is spelled. |
| Finished auctions that match the filters, newest first, plus how many matched in total. |
| Median of similar accepted sales, the middle-half price range, how many sales it used, how far it had to widen the search and the five closest sales. |
| Number of auctions, how often sellers accept the top bid, price quartiles, fuel and gearbox mix, and median price by model year and by month. |
There is also a resource, cars://schema, that describes the table and what the dataset covers, and a
prompt, value_a_car, that asks for an estimate backed by the closest sales.
How the estimate works
It starts with accepted sales of the same model within 1 model year and 25,000 km of the car, and with the same fuel and gearbox if you give them. If that finds fewer than 5 sales it widens to 2 years and 50,000 km, and then to 3 years and 80,000 km without the fuel and gearbox filters. If even the widest search has fewer than 3 sales it returns an error saying so instead of guessing.
The answer says which step it stopped at, and gives a confidence level from the number of sales and how spread out their prices are. A median of comparables is deliberately simple. It's how we price cars by hand, and the agent can show the sales behind the number so a person can check it.
A few design choices
Read-only. A database file is opened with SQLite's
mode=roand every tool carries the MCPreadOnlyHintannotation, so a client knows none of them change anything.Errors the model can act on. A typo like "Octavai" comes back as a tool error that says "Did you mean Skoda Octavia?" rather than an empty list. "VW" and "Merc" work as makes.
Structured output. Tools return JSON objects, so clients get
structuredContentand the model sees the same data as text.No MCP code in the logic.
market.pyis plain Python and SQL.server.pyis a thin layer that registers it with the SDK, which keeps the tests quick and the queries easy to reuse elsewhere.
Using your own data
car-price-mcp --db path/to/cars.dbor set CAR_PRICE_DB. The file needs a sales table with the columns listed in the cars://schema
resource. Without either, the server builds the synthetic sample in memory on startup, which takes well
under a second. To get the sample as a file you can open in a SQLite browser, run
python -m car_price_mcp.sample_data --out cars.db.
Tests
pip install -e ".[dev]"
pytestThe query tests run on 15 hand-written auctions where every median and count can be worked out on paper. Other tests check that the generator is deterministic and its cars make sense (newer and lower-mileage ones sell for more), and talk to the server through the SDK's MCP client, both in-process and over stdio as a subprocess. GitHub Actions runs everything on Python 3.10 to 3.13.
Layout
src/car_price_mcp/
server.py MCP tools, resource and prompt
market.py queries and the estimate logic, no MCP imports
sample_data.py table schema and the synthetic data generator
tests/
.github/workflows/tests.ymlBuilt on the official MCP Python SDK 2.x, where
FastMCP is now called MCPServer. MIT licensed.
Available Tools
4 toolsestimate_priceEstimate auction priceARead-onlyIdempotent
Estimate what a car would sell for at auction from the median of similar accepted sales.
Starts with cars within 1 model year and 25,000 km and widens the search until it has at least 5 sales. The answer says which match level it used and how confident it is.
Inputs: make (required), year (required), model (required), mileage_km (required), +2 more. Returns: object
list_modelsList makes and modelsARead-onlyIdempotent
List the makes and models in the data with how many auctions and accepted sales each has.
Inputs: make. Returns: object
search_comparablesSearch comparable salesBRead-onlyIdempotent
Find finished auctions of a make and model, filtered by model year, mileage, fuel and gearbox.
Inputs: make (required), model (required), fuel, limit, +6 more. Returns: object
summarise_marketSummarise a model's marketARead-onlyIdempotent
Summarise the market for one model: volume, acceptance rate, price spread, and median price by model year and by month.
Inputs: make (required), model (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: discovery (list_models), raw comparable lookup (search_comparables), price estimation (estimate_price), and aggregate market analysis (summarise_market). Although estimate_price relies on comparable sales conceptually, its output and intent are clearly different from search_comparables.
All tool names follow a consistent snake_case verb_noun pattern: list_models, search_comparables, estimate_price, summarise_market. The convention is predictable and readable throughout.
Four tools are well-scoped for a focused car auction pricing server. Each tool earns its place by covering a distinct step in the workflow without unnecessary surface area.
The tool set covers model discovery, comparable auction search, price estimation, and market summarisation, which are the core needs for this domain. Minor gaps might include direct retrieval of individual auction details or broader filtering, but agents can work around these through the existing tools.
Related MCP Connectors
Car-listing search and used-car market analysis as agent tools.
Automotive data for AI agents: VIN decode, listings, specs, build data, recalls, payments, taxes.
Collector-car auction history, live listings, bid trails, and market statistics for AI agents.
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a retail cars database using SQL queries. Supports adding new car advertisements and searching existing cars based on user preferences through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to perform complete database operations on SQLite databases, including creating tables, executing queries, and managing data through CRUD operations with schema inspection capabilities.MIT
- AlicenseAqualityCmaintenanceEnables coding agents to query and modify a SQLite database through twelve SQL-based tools, with safety enforced server-side via statement policies, protected tables, result caps, and snapshots. It also provides an append-only, hash-chained memory log with checkpoints so agents can record events and resume context across sessions.12MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to answer questions about Austrian passenger car registrations from an SQLite database, with tools for market overview, brand trends, brand rankings, and top models.MIT