encarapi-mcp 1.6.2 → 1.6.3
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.
- package/README.md +7 -3
- package/package.json +1 -1
- package/src/server.js +17 -6
package/README.md
CHANGED
|
@@ -23,14 +23,18 @@
|
|
|
23
23
|
| `get_korean_accident_record` | Insurance accident history and ownership changes |
|
|
24
24
|
| `find_korean_models` | Model name autocomplete across brands |
|
|
25
25
|
| `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) |
|
|
26
|
+
| `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) |
|
|
27
|
+
| `get_chinese_car` | Full record for one Chinese listing (`lang`: en, zh or ru) |
|
|
28
|
+
| `get_chinese_car_by_url` | Full record by Che168/Dongchedi listing link (desktop, mobile or app; `lang`: en, zh or ru) |
|
|
29
29
|
| `get_chinese_inspection` | Chinese inspection report (accident, flood, fire, EV battery) |
|
|
30
30
|
| `get_chinese_specs` | Autohome specification sheet of a Che168 trim (cc, kW, hp, torque, emission standard, weights, EV battery) |
|
|
31
31
|
| `chinese_filter_values` | Valid makes, fuels, cities and sources with listing counts |
|
|
32
32
|
| `chinese_models` | Models of a brand with listing counts |
|
|
33
33
|
|
|
34
|
+
Chinese `lang`: `zh` returns the original Chinese values, `ru` Russian values for the fixed fields (fuel,
|
|
35
|
+
transmission, drivetrain, colours, seller type, condition, vehicle class), city names and equipment names;
|
|
36
|
+
make, model and trim names stay Latin.
|
|
37
|
+
|
|
34
38
|
All tools are read-only.
|
|
35
39
|
|
|
36
40
|
## Option 1: hosted (no install)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "encarapi-mcp",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
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",
|
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.
|
|
7
|
+
export const VERSION = "1.6.3";
|
|
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()
|
|
@@ -386,7 +397,7 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
|
|
|
386
397
|
export_ready: z.boolean().optional().describe("Only cars that can be exported now"),
|
|
387
398
|
has_report: z.boolean().optional().describe("Only cars with an inspection report"),
|
|
388
399
|
sort: z.enum(["newest", "price_asc", "price_desc", "mileage_asc", "year_desc"]).optional(),
|
|
389
|
-
lang:
|
|
400
|
+
lang: chinaLang,
|
|
390
401
|
limit: z.number().int().min(1).max(50).optional().describe("Results per page, default 10"),
|
|
391
402
|
page: z.number().int().min(1).optional(),
|
|
392
403
|
},
|
|
@@ -403,10 +414,10 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
|
|
|
403
414
|
{
|
|
404
415
|
title: "Get a Chinese car",
|
|
405
416
|
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 },
|
|
417
|
+
inputSchema: { id: z.string().describe("Listing id from search_chinese_cars"), source: chinaSource, lang: chinaLang },
|
|
407
418
|
annotations: readOnly,
|
|
408
419
|
},
|
|
409
|
-
run(({ id, source }) => needChina().vehicle(id, { source }))
|
|
420
|
+
run(({ id, source, lang }) => needChina().vehicle(id, { source, lang }))
|
|
410
421
|
);
|
|
411
422
|
|
|
412
423
|
server.registerTool(
|
|
@@ -414,10 +425,10 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
|
|
|
414
425
|
{
|
|
415
426
|
title: "Get a Chinese car by link",
|
|
416
427
|
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") },
|
|
428
|
+
inputSchema: { url: z.string().describe("Listing link, e.g. https://m.che168.com/cardetail/index?infoid=60234085"), lang: chinaLang },
|
|
418
429
|
annotations: readOnly,
|
|
419
430
|
},
|
|
420
|
-
run(({ url }) => needChina().vehicleByUrl(url))
|
|
431
|
+
run(({ url, lang }) => needChina().vehicleByUrl(url, { lang }))
|
|
421
432
|
);
|
|
422
433
|
|
|
423
434
|
server.registerTool(
|