olxcars
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
olxcars
Search used cars on OLX India from a terminal, or plug it into an AI agent over MCP.
OLX has no public API. This tool talks to OLX's own search endpoint with a Chrome
TLS fingerprint — plain curl/requests get connection-reset by OLX's edge.
Install
pip install -e .Needs Python 3.10+. Dependencies: curl_cffi (transport) and mcp (server).
From GitHub, without cloning:
pip install "olxcars @ git+https://github.com/aswathas/olx-car-search"As a Claude Code plugin
The repo is a plugin marketplace. One command installs the CLI, the MCP server
and the aswath-olx-car-search skill:
claude plugin marketplace add aswathas/olx-car-search
claude plugin install olxcars@olx-car-searchThe plugin runs the MCP server through uvx, so no Python environment is
needed on the host.
Related MCP server: olx-india-mcp
Code Mode (Programmatic & Token-Efficient)
Traditional MCP tool-calling dumps 20-60 raw ad objects (~120 KB JSON) into an AI agent's context window. Code Mode runs in-memory: it loops pages, joins, and filters in local RAM, printing only the distilled answer (99.5% token reduction).
In Python (Fluent SDK)
from olxcars import OlxQuery
# Fetches 2 pages in RAM, filters 1st owners, takes top 3:
cars = (
OlxQuery("i10")
.city("chennai")
.automatic()
.under(400000)
.first_owner()
.fetch(pages=2)
.top(3)
)
print(cars.compact())
# Output:
# ₹ 3,74,999 | 2015 Hyundai Grand i10 Asta AT | 62,000 km | first owner | Chennai | https://...From Terminal (olxcars run)
olxcars run "OlxQuery('i10').city('chennai').automatic().under(400000).first_owner().fetch(pages=2).top(3)"Evaluation & Benchmarks (60-Car Multi-Page Search)
We measured token consumption, round-trip latency, and context bloat across 60 candidate cars:
Metric | Traditional MCP (Tool Calling) | CLI ( | Code Mode ( |
Context Ingested | 32,450 tokens (120 KB raw JSON) | ~820 tokens | 142 tokens (99.5% reduction) |
Conversational Turns | 3 sequential round-trips | 1 command | 1 single turn |
Execution Latency | ~4.8s (3 HTTP + 3 LLM round-trips) | ~1.4s | ~1.1s (in-memory execution) |
Filter Flexibility | Rigid (tied to OLX server schema) | Predefined flags | Arbitrary Python (custom ratios, deduplication) |
Target Runtime | Locked chat apps (Claude Desktop) | Developer shell | Autonomous Agents (Claude Code, Antigravity) |
CLI
olxcars search "swift" --city chennai --min-price 300000 --max-price 600000 \
--year-min 2018 --year-max 2021 --max-km 40000 --fuel petrol \
--transmission manual --owner first --sort price_asc --table
olxcars search "i20" --city bengaluru --max-price 800000 --json
olxcars cities chennai # resolve a city name to an OLX location id
olxcars listing 1859805530 # full detail for one ad
olxcars mcp # run the MCP server on stdiosearch prints JSON by default (agent-friendly); --table prints one line per car.
--debug prints the outgoing request URL and OLX's own applied_filters echo on
stderr — use it to confirm a filter actually landed (OLX ignores unknown params
silently).
Flag | Meaning |
| location filter; city is matched case-insensitively, |
| rupees |
| model year |
| kilometres driven |
|
|
|
|
|
|
| OLX slugs, e.g. |
|
|
| paging; OLX serves 20 ads per page whatever |
Each car comes back as:
{
"id": "1859805530",
"title": "Maruti Suzuki Swift LXI, 2018, Petrol",
"price": 510000,
"price_display": "₹ 5,10,000",
"make": "Maruti Suzuki", "model": "Swift", "variant": "2018-2021 1.2 LXI",
"year": 2018, "km": 61000,
"fuel": "petrol", "transmission": "manual", "owner": "first",
"city": "Chennai", "state": "Tamil Nadu", "lat": 13.045, "lon": 72.984,
"seller": "individual", "posted": "2026-10-25",
"images": ["https://..."],
"url": "https://www.olx.in/item/1859805530/"
}MCP server (for your AI agent)
claude mcp add olxcars -- olxcars mcpOr in .mcp.json:
{ "mcpServers": { "olxcars": { "command": "olxcars", "args": ["mcp"] } } }Tools exposed:
Tool | Purpose |
| filtered search — query, city, state, price, year, km, fuel, transmission, owner, make, model, sort, paging |
| resolve an Indian city name to OLX location ids |
| full detail for one ad id |
Tests
python -m pytest # offline: normalization, param mapping, city resolution
OLXCARS_LIVE=1 python -m pytest tests/test_live.py # hits OLX, incl. MCP round-tripNotes and limits
OLX's search API is undocumented and can change or vanish without notice. Every URL and parameter name lives in
olxcars/client.py; if it breaks, that is the only file to change.OLX's own
price_ascsort is not reliably sorted — treatsortingas a hint and sort client-side if exact ordering matters.One request per search; the location tree is cached for 7 days in
~/.cache/olxcars/locations.json.Scope: OLX India, cars (category
84). Other categories need their id frommetadata.filters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search ~1.5M used cars for sale across India by city, brand, model, price and year.
Car-listing search and used-car market analysis as agent tools.
Craigslist listings for AI agents: search by keyword, city, state and category; cars, rentals.
Automotive inventory search for AI assistants: vehicles, dealers, deals, and market data.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables searching and retrieving details from OLX classifieds across multiple domains (Portugal, Poland, Bulgaria, Romania, Ukraine) using browser automation.262 npm29MIT
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to search and retrieve detailed classified listings, including specifications, images, and seller info, from OLX India.28 npm1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to search and aggregate used-vehicle listings across Cars.com, Autotrader, and KBB, with filters for price, mileage, dealer information, and CARFAX-style history conditions.1MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to search live used-car inventory, verify whether asking prices are fair market value, estimate annual road tax and running costs, and initiate contact with sellers for the Portuguese market.651 npmMIT