encarapi-mcp 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +10 -5
  2. package/package.json +2 -2
  3. package/src/server.js +38 -7
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [Model Context Protocol](https://modelcontextprotocol.io) server for
4
4
  [EnCarAPI](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-mcp). Lets Claude, Cursor, ChatGPT and other MCP clients search
5
5
  **live used car listings from South Korea** (Encar, KB Chachacha, K Car) and **China**
6
- (Dongchedi, Che168), and pull full details, inspection reports and accident records.
6
+ (Dongchedi, Che168), and pull full details, inspection reports, Encar diagnoses and accident records.
7
7
 
8
8
  > **An API key is required.** Get one (5-day trial) at [encarapi.com](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-mcp).
9
9
  > Chinese data works with a [ChinaCarAPI](https://chinacarapi.com/?utm_source=readme&utm_medium=encarapi-mcp) key or an EnCarAPI key
@@ -18,19 +18,24 @@
18
18
  | `search_korean_trucks` | Search Korean trucks, buses and special vehicles (body type, payload in tons, use, region; Business/Scale key) |
19
19
  | `find_korean_car_by_vin` | All Encar / K Car listings of one VIN, incl. removed ones (Business/Scale key) |
20
20
  | `get_korean_truck` | Full record for one truck: detail, inspection report, cargo box, VIN and plate (Business/Scale key) |
21
- | `get_korean_car` | Full detail for one listing (specs, options, photos, price history, seller; `lang`: en, ru or de) |
21
+ | `get_korean_car` | Full detail for one listing (specs, options, photos, price history, seller, `diagnosisReport` on Encar listings; `lang`: en, ru or de) |
22
22
  | `get_korean_inspection` | Official Korean inspection report |
23
+ | `get_korean_diagnosis` | Encar diagnosis (엔카진단): which outer panels were replaced, inspector verdict incl. frame result (Encar listings only) |
23
24
  | `get_korean_accident_record` | Insurance accident history and ownership changes |
24
25
  | `find_korean_models` | Model name autocomplete across brands |
25
26
  | `korean_filter_values` | Valid filter values |
26
- | `search_chinese_cars` | Search Chinese listings (brand, model, model year, registration year, price in CNY, mileage, power, city, fuel, source, export-ready) |
27
- | `get_chinese_car` | Full record for one Chinese listing |
28
- | `get_chinese_car_by_url` | Full record by Che168/Dongchedi listing link (desktop, mobile or app) |
27
+ | `search_chinese_cars` | Search Chinese listings (brand, model, model year, registration year, price in CNY, mileage, power, city, fuel, source, export-ready; `lang`: en, zh or ru) |
28
+ | `get_chinese_car` | Full record for one Chinese listing (`lang`: en, zh or ru) |
29
+ | `get_chinese_car_by_url` | Full record by Che168/Dongchedi listing link (desktop, mobile or app; `lang`: en, zh or ru) |
29
30
  | `get_chinese_inspection` | Chinese inspection report (accident, flood, fire, EV battery) |
30
31
  | `get_chinese_specs` | Autohome specification sheet of a Che168 trim (cc, kW, hp, torque, emission standard, weights, EV battery) |
31
32
  | `chinese_filter_values` | Valid makes, fuels, cities and sources with listing counts |
32
33
  | `chinese_models` | Models of a brand with listing counts |
33
34
 
35
+ Chinese `lang`: `zh` returns the original Chinese values, `ru` Russian values for the fixed fields (fuel,
36
+ transmission, drivetrain, colours, seller type, condition, vehicle class), city names and equipment names;
37
+ make, model and trim names stay Latin.
38
+
34
39
  All tools are read-only.
35
40
 
36
41
  ## Option 1: hosted (no install)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "encarapi-mcp",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "MCP server for EnCarAPI and ChinaCarAPI: live Korean (Encar, KB Chachacha, K Car) and Chinese (Dongchedi, Che168) used car listings for Claude, Cursor and other AI assistants.",
5
5
  "type": "module",
6
6
  "main": "src/server.js",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@modelcontextprotocol/sdk": "^1.32.0",
52
- "encarapi": "^1.5.0",
52
+ "encarapi": "^1.8.0",
53
53
  "express": "^5.2.1",
54
54
  "zod": "^4.1.0"
55
55
  }
package/src/server.js CHANGED
@@ -4,7 +4,7 @@ import encarapi from "encarapi";
4
4
 
5
5
  const { KoreaClient, ChinaClient } = encarapi;
6
6
 
7
- export const VERSION = "1.6.2";
7
+ export const VERSION = "1.7.0";
8
8
  const MAX_TEXT = 40000;
9
9
 
10
10
  const asText = (data) => {
@@ -80,6 +80,17 @@ const chinaItem = (c) => ({
80
80
 
81
81
  const readOnly = { readOnlyHint: true, openWorldHint: true };
82
82
 
83
+ // China response language. "ru" (API since 2026-10-22) translates the fixed fields,
84
+ // city names and equipment names; make, model and trim names stay Latin.
85
+ const chinaLang = z
86
+ .enum(["en", "zh", "ru"])
87
+ .optional()
88
+ .describe(
89
+ "Language of the returned values: en (default), zh = the original Chinese values, ru = Russian values for the fixed fields " +
90
+ "(fuel, transmission, drivetrain, colours, seller type, condition, vehicle class), city names and equipment names; " +
91
+ "make, model and trim names stay Latin"
92
+ );
93
+
83
94
  const chinaSource = z
84
95
  .enum(["dongchedi", "che168"])
85
96
  .optional()
@@ -297,7 +308,9 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
297
308
  "get_korean_car",
298
309
  {
299
310
  title: "Get a Korean car",
300
- description: "Full details for one Korean listing: specs, options, photos, price history, seller. Id: Encar id, 'kbc:<id>' or 'kcar:<id>'.",
311
+ description:
312
+ "Full details for one Korean listing: specs, options, photos, price history, seller. Id: Encar id, 'kbc:<id>' or 'kcar:<id>'. " +
313
+ "Encar listings also carry diagnosisReport: Encar's own outer-panel diagnosis (see get_korean_diagnosis), null when Encar has no diagnosis for the car.",
301
314
  inputSchema: {
302
315
  id: z.string().describe("Listing id from search_korean_cars"),
303
316
  lang: z.enum(["en", "ru", "de"]).optional().describe("Language of the spec, category and option names: en (default), ru = Russian, de = German"),
@@ -318,6 +331,24 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
318
331
  run(({ id }) => needKorea().inspection(id))
319
332
  );
320
333
 
334
+ server.registerTool(
335
+ "get_korean_diagnosis",
336
+ {
337
+ title: "Get an Encar diagnosis",
338
+ description:
339
+ "Encar's own body diagnosis (엔카진단) for one Encar listing, done at an Encar center: the 8 outer panels " +
340
+ "(doors, front fenders, hood, trunk lid; resultCode NORMAL or REPLACEMENT) plus the inspector's verdict " +
341
+ "CHECKER_COMMENT (also states the frame result; Encar does not diagnose cars with a damaged frame) and " +
342
+ "OUTER_PANEL_COMMENT, both Korean free text. About three in four active Encar listings have one; it is " +
343
+ "separate from the official inspection report. A 404 with diagnosisAvailable false means Encar has no " +
344
+ "diagnosis for the car, detailPending true means not collected yet. Encar ids only (no kbc:/kcar:). " +
345
+ "get_korean_car carries the same data as diagnosisReport.",
346
+ inputSchema: { id: z.string().describe("Encar listing id from search_korean_cars") },
347
+ annotations: readOnly,
348
+ },
349
+ run(({ id }) => needKorea().diagnosis(id))
350
+ );
351
+
321
352
  server.registerTool(
322
353
  "get_korean_accident_record",
323
354
  {
@@ -386,7 +417,7 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
386
417
  export_ready: z.boolean().optional().describe("Only cars that can be exported now"),
387
418
  has_report: z.boolean().optional().describe("Only cars with an inspection report"),
388
419
  sort: z.enum(["newest", "price_asc", "price_desc", "mileage_asc", "year_desc"]).optional(),
389
- lang: z.enum(["en", "zh"]).optional().describe("'zh' returns the original Chinese values; default English"),
420
+ lang: chinaLang,
390
421
  limit: z.number().int().min(1).max(50).optional().describe("Results per page, default 10"),
391
422
  page: z.number().int().min(1).optional(),
392
423
  },
@@ -403,10 +434,10 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
403
434
  {
404
435
  title: "Get a Chinese car",
405
436
  description: "Full record for one Chinese listing: price history, photos, seller, export status, same car on the other marketplace.",
406
- inputSchema: { id: z.string().describe("Listing id from search_chinese_cars"), source: chinaSource },
437
+ inputSchema: { id: z.string().describe("Listing id from search_chinese_cars"), source: chinaSource, lang: chinaLang },
407
438
  annotations: readOnly,
408
439
  },
409
- run(({ id, source }) => needChina().vehicle(id, { source }))
440
+ run(({ id, source, lang }) => needChina().vehicle(id, { source, lang }))
410
441
  );
411
442
 
412
443
  server.registerTool(
@@ -414,10 +445,10 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
414
445
  {
415
446
  title: "Get a Chinese car by link",
416
447
  description: "Same full record as get_chinese_car, looked up by a Che168 or Dongchedi listing link (desktop, mobile site or app, also inside a pasted share text). Short links are not resolved.",
417
- inputSchema: { url: z.string().describe("Listing link, e.g. https://m.che168.com/cardetail/index?infoid=60234085") },
448
+ inputSchema: { url: z.string().describe("Listing link, e.g. https://m.che168.com/cardetail/index?infoid=60234085"), lang: chinaLang },
418
449
  annotations: readOnly,
419
450
  },
420
- run(({ url }) => needChina().vehicleByUrl(url))
451
+ run(({ url, lang }) => needChina().vehicleByUrl(url, { lang }))
421
452
  );
422
453
 
423
454
  server.registerTool(