encarapi-mcp 1.2.0 → 1.3.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.
- package/README.md +7 -7
- package/package.json +2 -2
- package/src/brand.js +2 -2
- package/src/server.js +9 -5
- package/src/stdio.js +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# EnCarAPI MCP server: Korean and Chinese used car data for AI assistants
|
|
2
2
|
|
|
3
3
|
[Model Context Protocol](https://modelcontextprotocol.io) server for
|
|
4
|
-
[EnCarAPI](https://encarapi.com). Lets Claude, Cursor, ChatGPT and other MCP clients search
|
|
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
6
|
(Dongchedi, Che168), and pull full details, inspection reports and accident records.
|
|
7
7
|
|
|
8
|
-
> **An API key is required.** Get one (5-day trial) at [encarapi.com](https://encarapi.com).
|
|
9
|
-
> Chinese data works with a [ChinaCarAPI](https://chinacarapi.com) key or an EnCarAPI key
|
|
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
|
+
> Chinese data works with a [ChinaCarAPI](https://chinacarapi.com/?utm_source=readme&utm_medium=encarapi-mcp) key or an EnCarAPI key
|
|
10
10
|
> with the China add-on. ChinaCarAPI customers: see [For ChinaCarAPI customers](#for-chinacarapi-customers).
|
|
11
11
|
|
|
12
12
|
## Tools
|
|
13
13
|
|
|
14
14
|
| Tool | What it does |
|
|
15
15
|
|---|---|
|
|
16
|
-
| `search_korean_cars` | Search Korean listings (brand, model, year, price in 10,000 KRW, mileage, fuel, accident-free, source: encar / kbc / kcar / all) |
|
|
16
|
+
| `search_korean_cars` | Search Korean listings (brand, model, year, price in 10,000 KRW, mileage, fuel, accident-free, seller region and city, source: encar / kbc / kcar / all) |
|
|
17
17
|
| `get_korean_car` | Full detail for one listing (specs, options, photos, price history, seller) |
|
|
18
18
|
| `get_korean_inspection` | Official Korean inspection report |
|
|
19
19
|
| `get_korean_accident_record` | Insurance accident history and ownership changes |
|
|
@@ -50,7 +50,7 @@ claude mcp add --transport http encarapi https://mcp.encarapi.com/mcp
|
|
|
50
50
|
|
|
51
51
|
The key is checked once and is not stored on the server: it is encrypted into the token
|
|
52
52
|
your client receives. To disconnect, remove the server in your client; to cut off access
|
|
53
|
-
everywhere, rotate your key at [encarapi.com](https://encarapi.com).
|
|
53
|
+
everywhere, rotate your key at [encarapi.com](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-mcp).
|
|
54
54
|
|
|
55
55
|
### Alternative: send the key yourself
|
|
56
56
|
|
|
@@ -181,8 +181,8 @@ self-contained values (AES-256-GCM) that carry the key. Consequences:
|
|
|
181
181
|
|
|
182
182
|
## Links
|
|
183
183
|
|
|
184
|
-
- EnCarAPI: https://encarapi.com
|
|
185
|
-
- ChinaCarAPI: https://chinacarapi.com
|
|
184
|
+
- EnCarAPI: [encarapi.com](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-mcp)
|
|
185
|
+
- ChinaCarAPI: [chinacarapi.com](https://chinacarapi.com/?utm_source=readme&utm_medium=encarapi-mcp)
|
|
186
186
|
- SDKs: [Node.js](https://github.com/ThatMojo/encarapi-node), [Python](https://github.com/ThatMojo/encarapi-python)
|
|
187
187
|
|
|
188
188
|
EnCarAPI is an independent service and not affiliated with Encar, KB Chachacha, K Car,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "encarapi-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"claude",
|
|
35
35
|
"cursor"
|
|
36
36
|
],
|
|
37
|
-
"homepage": "https://encarapi.com",
|
|
37
|
+
"homepage": "https://encarapi.com/?utm_source=npm&utm_medium=encarapi-mcp",
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "git+https://github.com/ThatMojo/encarapi-mcp.git"
|
package/src/brand.js
CHANGED
|
@@ -7,7 +7,7 @@ export const BRANDS = {
|
|
|
7
7
|
id: "korea",
|
|
8
8
|
product: "EnCarAPI",
|
|
9
9
|
otherProduct: "ChinaCarAPI",
|
|
10
|
-
signupUrl: "https://encarapi.com",
|
|
10
|
+
signupUrl: "https://encarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=signin#pricing",
|
|
11
11
|
signupText: "https://encarapi.com",
|
|
12
12
|
resourceName: "EnCarAPI MCP server",
|
|
13
13
|
// Form field names: the main field is auto-detected, the second one is for a
|
|
@@ -20,7 +20,7 @@ export const BRANDS = {
|
|
|
20
20
|
id: "china",
|
|
21
21
|
product: "ChinaCarAPI",
|
|
22
22
|
otherProduct: "EnCarAPI",
|
|
23
|
-
signupUrl: "https://chinacarapi.com
|
|
23
|
+
signupUrl: "https://chinacarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=signin#pricing",
|
|
24
24
|
signupText: "chinacarapi.com",
|
|
25
25
|
resourceName: "ChinaCarAPI MCP server",
|
|
26
26
|
mainField: "chinacarapi_key",
|
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.
|
|
7
|
+
export const VERSION = "1.3.0";
|
|
8
8
|
const MAX_TEXT = 40000;
|
|
9
9
|
|
|
10
10
|
const asText = (data) => {
|
|
@@ -46,6 +46,8 @@ const koreaItem = (c) => ({
|
|
|
46
46
|
transmission: c.Transmission,
|
|
47
47
|
powerPs: c.PowerPs,
|
|
48
48
|
color: c.Color,
|
|
49
|
+
region: c.Region || undefined,
|
|
50
|
+
city: c.City || undefined,
|
|
49
51
|
duplicateOf: c.IsDuplicate ? c.DuplicateOf : undefined,
|
|
50
52
|
url: c.Url,
|
|
51
53
|
photo: firstPhoto(c.Photos),
|
|
@@ -92,7 +94,7 @@ const SERVER_INFO = {
|
|
|
92
94
|
"Live used car listings from South Korea (Encar, KB Chachacha, K Car) and China (Dongchedi, Che168). " +
|
|
93
95
|
"Korean prices are in KRW, Chinese prices in CNY with USD/EUR conversions. " +
|
|
94
96
|
"Use find_korean_models or korean_filter_values to get exact names before filtering. " +
|
|
95
|
-
"Requires an API key from https://encarapi.com (China: https://chinacarapi.com).",
|
|
97
|
+
"Requires an API key from https://encarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=instructions (China: https://chinacarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=instructions).",
|
|
96
98
|
},
|
|
97
99
|
china: {
|
|
98
100
|
info: { name: "chinacarapi", title: "ChinaCarAPI - Chinese & Korean used car data", version: VERSION },
|
|
@@ -101,7 +103,7 @@ const SERVER_INFO = {
|
|
|
101
103
|
"Chinese prices are in CNY with USD/EUR conversions, Korean prices in KRW. " +
|
|
102
104
|
"Use chinese_filter_values (makes, fuels, cities) and chinese_models to get exact values before filtering " +
|
|
103
105
|
"search_chinese_cars; for Korea use find_korean_models or korean_filter_values. " +
|
|
104
|
-
"Requires an API key from https://chinacarapi.com (Korea: https://encarapi.com).",
|
|
106
|
+
"Requires an API key from https://chinacarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=instructions (Korea: https://encarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=instructions).",
|
|
105
107
|
},
|
|
106
108
|
};
|
|
107
109
|
|
|
@@ -119,11 +121,11 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
|
|
|
119
121
|
const korea = apiKey ? new KoreaClient(apiKey, { fetch: fetchImpl }) : null;
|
|
120
122
|
const china = chinaKey || apiKey ? new ChinaClient(chinaKey || apiKey, { fetch: fetchImpl }) : null;
|
|
121
123
|
const needKorea = () => {
|
|
122
|
-
if (!korea) throw new Error("No EnCarAPI key configured (ENCARAPI_KEY). Get one at https://encarapi.com");
|
|
124
|
+
if (!korea) throw new Error("No EnCarAPI key configured (ENCARAPI_KEY). Get one at https://encarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=error");
|
|
123
125
|
return korea;
|
|
124
126
|
};
|
|
125
127
|
const needChina = () => {
|
|
126
|
-
if (!china) throw new Error("No ChinaCarAPI key configured (CHINACARAPI_KEY). Get one at https://chinacarapi.com");
|
|
128
|
+
if (!china) throw new Error("No ChinaCarAPI key configured (CHINACARAPI_KEY). Get one at https://chinacarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=error");
|
|
127
129
|
return china;
|
|
128
130
|
};
|
|
129
131
|
const run = (fn) => async (args) => {
|
|
@@ -162,6 +164,8 @@ export function createServer({ apiKey, chinaKey, fetchImpl, transport = "stdio",
|
|
|
162
164
|
frame_clean: z.boolean().optional().describe("Only cars with an accident-free chassis frame"),
|
|
163
165
|
no_damage_cost: z.boolean().optional().describe("Only cars with zero insurance-reported repair cost"),
|
|
164
166
|
has_inspection: z.boolean().optional().describe("Only cars with an official inspection report"),
|
|
167
|
+
region: z.string().optional().describe("Seller region code, comma = OR: seoul, gyeonggi, incheon, busan, daegu, daejeon, ulsan, gwangju, sejong, gangwon, chungbuk, chungnam, jeonbuk, jeonnam, gyeongbuk, gyeongnam, jeju. Encar listings only: leave source unset"),
|
|
168
|
+
city: z.string().optional().describe("Seller city, e.g. suwon, gangnam (values in korean_filter_values -> city). Encar listings only: leave source unset"),
|
|
165
169
|
sort: z.enum(["newest", "price_asc", "price_desc", "mileage_asc", "mileage_desc", "year_desc", "year_asc"]).optional(),
|
|
166
170
|
limit: z.number().int().min(1).max(50).optional().describe("Results per page, default 10"),
|
|
167
171
|
page: z.number().int().min(1).optional(),
|
package/src/stdio.js
CHANGED
|
@@ -7,7 +7,7 @@ const chinaKey = process.env.CHINACARAPI_KEY;
|
|
|
7
7
|
|
|
8
8
|
if (!apiKey && !chinaKey) {
|
|
9
9
|
console.error(
|
|
10
|
-
"encarapi-mcp: set ENCARAPI_KEY (Korea, https://encarapi.com) and/or CHINACARAPI_KEY (China, https://chinacarapi.com)."
|
|
10
|
+
"encarapi-mcp: set ENCARAPI_KEY (Korea, https://encarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=error) and/or CHINACARAPI_KEY (China, https://chinacarapi.com/?utm_source=mcp&utm_medium=encarapi-mcp&utm_content=error)."
|
|
11
11
|
);
|
|
12
12
|
process.exit(1);
|
|
13
13
|
}
|