@scavio/mcp-server 0.37.0 → 0.39.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 +63 -5
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.js +7 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/tcgplayer.d.ts +3 -0
- package/dist/tools/tcgplayer.js +141 -0
- package/dist/tools/tcgplayer.js.map +1 -0
- package/dist/tools/vinted.d.ts +3 -0
- package/dist/tools/vinted.js +110 -0
- package/dist/tools/vinted.js.map +1 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources.
|
|
6
|
+
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources. 399 tools across 63 platforms plus Extract, map, crawl and batch, one API key.
|
|
7
7
|
|
|
8
|
-
**The 22 platforms added in 0.13.0 are opt-in.** Registering all
|
|
8
|
+
**The 22 platforms added in 0.13.0 are opt-in.** Registering all 399 tools puts ~437KB of tool definitions — roughly 90k tokens — into every session before you type anything. So the default is the platform set 0.12.x already had, plus Extract: 142 tools, 112KB. Upgrading never removes a tool you were using. Everything else is one env var away: see [Choosing which tools load](#choosing-which-tools-load).
|
|
9
9
|
|
|
10
10
|
## Remote MCP Server
|
|
11
11
|
|
|
@@ -207,7 +207,7 @@ Add to settings (`Cmd+,`):
|
|
|
207
207
|
|
|
208
208
|
## Choosing which tools load
|
|
209
209
|
|
|
210
|
-
Scavio exposes
|
|
210
|
+
Scavio exposes 399 tools. Loading all of them costs ~437KB of `tools/list` —
|
|
211
211
|
roughly 90k tokens of context in every session before the user has said anything,
|
|
212
212
|
and more tools than some clients will accept at all. So the server registers a
|
|
213
213
|
curated subset by default and lets you pick the rest. The sizes below are
|
|
@@ -218,7 +218,7 @@ measured, not estimated: `npm run toolslist` reproduces them.
|
|
|
218
218
|
| Value | Registers |
|
|
219
219
|
|-------|-----------|
|
|
220
220
|
| *(unset)* or `default` | Every platform 0.12.x had, plus `extract` — **142 tools, 112KB** |
|
|
221
|
-
| `all` | every platform — **
|
|
221
|
+
| `all` | every platform — **399 tools, ~437KB** |
|
|
222
222
|
| `extract,sec,g2` | just those platforms — 18 tools, 21KB |
|
|
223
223
|
| `default,zillow,metaads` | the default set plus two more — 148 tools, 120KB |
|
|
224
224
|
| `default,chatgpt,gemini` | the default set plus ChatGPT and Gemini — 144 tools, 115KB |
|
|
@@ -233,7 +233,7 @@ tells you to call to check the server works.
|
|
|
233
233
|
|
|
234
234
|
**Platform keys:** `extract`, `google`, `chatgpt`, `gemini`, `youtube`, `tiktok`, `instagram`,
|
|
235
235
|
`reddit`, `x`, `linkedin`, `threads`, `kuaishou`, `amazon`, `walmart`, `ebay`,
|
|
236
|
-
`target`, `homedepot`, `costco`, `heb`, `kroger`, `decathlon`, `specs`, `lowes`, `samsclub`, `canadiantire`, `dollargeneral`, `sephora`, `ulta`, `aldi`, `microcenter`, `walgreens`, `cvs`, `wholefoods`, `harborfreight`, `petsmart`, `petco`, `iherb`, `chewy`, `menards`, `nordstrom`, `nordstromrack`, `bestbuy`, `mercadolibre`, `tiktok-shop`, `booking`, `airbnb`,
|
|
236
|
+
`target`, `homedepot`, `costco`, `heb`, `kroger`, `decathlon`, `specs`, `lowes`, `samsclub`, `canadiantire`, `dollargeneral`, `sephora`, `ulta`, `aldi`, `microcenter`, `walgreens`, `cvs`, `wholefoods`, `harborfreight`, `petsmart`, `petco`, `iherb`, `chewy`, `menards`, `nordstrom`, `nordstromrack`, `bestbuy`, `tcgplayer`, `vinted`, `mercadolibre`, `tiktok-shop`, `booking`, `airbnb`,
|
|
237
237
|
`tripadvisor`, `yelp`, `zillow`, `redfin`, `realtor`, `rightmove`, `indeed`, `glassdoor`,
|
|
238
238
|
`appstore`, `googleplay`, `g2`, `capterra`, `trustpilot`, `googleads`, `metaads`, `sec`, `companieshouse`
|
|
239
239
|
|
|
@@ -1069,6 +1069,64 @@ Best Buy publishes a quantity only when it shows "only N left" (`limited`), so
|
|
|
1069
1069
|
`quantity` is null for `in_stock`. Availability takes 5-20s. An unknown SKU is
|
|
1070
1070
|
a 404 and is not billed.
|
|
1071
1071
|
|
|
1072
|
+
### TCGplayer
|
|
1073
|
+
|
|
1074
|
+
| Tool | Description |
|
|
1075
|
+
|------|-------------|
|
|
1076
|
+
| `search_tcgplayer` | Search TCGplayer (US, USD) cards and sealed products across every game (Pokemon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana and 60+ more), up to 50 per page: market, median and lowest price, listing count, set, rarity, card number and up to 3 featured listings; filter by game, set, rarity or cards vs sealed; sort by relevance, best selling, name or market price; plus facets with counts |
|
|
1077
|
+
| `get_tcgplayer_product` | One product by id or URL: images, card attributes, market / median / lowest listing price, listing and seller counts, and every SKU (condition x printing x language) with its market price and the recent sale range (lowest and highest sale price, sale count) |
|
|
1078
|
+
| `get_tcgplayer_listings` | Every live seller offer on a product, up to 50 per page, filtered by condition, printing, language, verified sellers or Direct, sorted by price plus shipping or price, with seller rating percent, sales band, gold star and location |
|
|
1079
|
+
| `get_tcgplayer_price_history` | Up to a year of sales history per SKU (month, quarter, semi_annual, annual): per bucket market price, quantity sold, transaction count and the low and high sale price |
|
|
1080
|
+
| `get_tcgplayer_sales` | The 5 most recent sales of a product: date, condition, printing, quantity, price and shipping |
|
|
1081
|
+
| `get_tcgplayer_games` | Every game (product line) on TCGplayer, 70+, with the url_name the other tools accept |
|
|
1082
|
+
| `get_tcgplayer_sets` | Every set of one game, newest first, with the set_id the price guide takes |
|
|
1083
|
+
| `get_tcgplayer_price_guide` | A whole set's price table, cards or sealed, up to 500 rows per page: market and low price per card per condition and printing |
|
|
1084
|
+
| `get_tcgplayer_suggestions` | The tcgplayer.com search-box autocomplete: products, sets and games |
|
|
1085
|
+
| `get_tcgplayer_trending` | Trending searches right now, overall or for Pokemon, Magic or Yu-Gi-Oh! |
|
|
1086
|
+
| `get_tcgplayer_seller` | A seller's profile by seller key, with the 365-day feedback summary and rating percent |
|
|
1087
|
+
| `get_tcgplayer_seller_feedback` | Individual feedback rows on a seller from the last 365 days, filterable by star rating or with a comment; buyers appear only as the site's masked nickname |
|
|
1088
|
+
| `get_tcgplayer_seller_products` | A seller's catalogue with their own listings of each product, filtered by keywords or game |
|
|
1089
|
+
|
|
1090
|
+
Platform key `tcgplayer`. 1 credit per call, every tool. US marketplace,
|
|
1091
|
+
prices in USD. Product, listings, price history and sales take `product_id`
|
|
1092
|
+
or a tcgplayer.com `/product/<id>/` URL; an unknown id is a 404 and is not
|
|
1093
|
+
billed. SKU sale fields on `get_tcgplayer_product` (`lowest_sale_price`,
|
|
1094
|
+
`highest_sale_price`, `sale_count`) are recent SALE statistics, not live
|
|
1095
|
+
listings; use `get_tcgplayer_listings` for offers. `get_tcgplayer_sales`
|
|
1096
|
+
returns only the 5 newest sales; for sold volume use
|
|
1097
|
+
`get_tcgplayer_price_history`, whose low and high sale prices are null in a
|
|
1098
|
+
bucket with no sales. Seller tools take the 8-character `seller.key` from a
|
|
1099
|
+
listing. No store locator, product reviews or buylist prices.
|
|
1100
|
+
|
|
1101
|
+
### Vinted
|
|
1102
|
+
|
|
1103
|
+
| Tool | Description |
|
|
1104
|
+
|------|-------------|
|
|
1105
|
+
| `search_vinted` | Search second-hand listings on any of 27 Vinted country sites by keywords, category, brand, condition, size, color, material and price range, sorted by relevance, newest or price: 96 items per page, pages 1-10, with price, the Vinted fee, total price, brand, size, condition, favourites, photos and the seller id |
|
|
1106
|
+
| `get_vinted_product` | One listing by item id or URL: description, price in the seller's currency, brand, size, condition, color, material, category path, all photos, reserved and sold state, and the seller's login, feedback count and rating |
|
|
1107
|
+
| `get_vinted_seller` | A member's public seller profile: feedback count and rating, positive / neutral / negative counts, listed item count, verification, response time, holiday mode, last seen |
|
|
1108
|
+
| `get_vinted_seller_products` | The items one member has listed, newest first, cheapest first or by relevance, up to 96 per page |
|
|
1109
|
+
| `get_vinted_seller_feedback` | Reviews left for a member, newest first, up to 50 per page: rating 1-5, text, date, automatic flag and the member's reply; no reviewer identity |
|
|
1110
|
+
| `get_vinted_brands` | Find brands by name: brand id (for search's `brand_ids`), listing count, luxury flag and whether Vinted authenticity-checks it |
|
|
1111
|
+
| `get_vinted_suggestions` | The Vinted search-box autocomplete in the site's language, up to 10 suggestions with their type |
|
|
1112
|
+
| `get_vinted_filters` | The options of one search filter (size, condition, color, material) with live item counts, optionally for a query and category |
|
|
1113
|
+
| `get_vinted_categories` | The category tree in the site's language (9 top-level, about 3,000 in all), or one category's subtree with its path |
|
|
1114
|
+
|
|
1115
|
+
Platform key `vinted`. 1 credit per call, every tool. Every tool takes an
|
|
1116
|
+
optional `country`: `fr` (default), `be`, `lu`, `es`, `nl`, `lt`, `de`, `at`,
|
|
1117
|
+
`it`, `uk`, `pt`, `us`, `cz`, `sk`, `pl`, `se`, `ro`, `hu`, `dk`, `fi`, `hr`,
|
|
1118
|
+
`gr`, `ie`, `ee`, `lv`, `si`, `au`. Category, condition and filter names come
|
|
1119
|
+
back in that site's language. The EU sites share one cross-border listing
|
|
1120
|
+
pool, priced in the site's currency (vinted.pl shows the same EU listings in
|
|
1121
|
+
PLN); `uk` (GBP), `us` (USD) and `au` (AUD) are separate catalogs. A product
|
|
1122
|
+
is priced in the SELLER's currency, which can differ from the site's.
|
|
1123
|
+
`service_fee` is the Vinted fee the buyer pays on top of the price (formerly
|
|
1124
|
+
the Buyer Protection fee). Search serves at most 10 pages of 96
|
|
1125
|
+
(`total_is_capped` is true past 960 matches), and price sorts surface loosely
|
|
1126
|
+
matching cheap listings, so pair them with a category or price range. Live
|
|
1127
|
+
listings only: no sold-item search, shipping prices, pickup points or similar
|
|
1128
|
+
items. Seller data is limited to public buyer-relevant fields.
|
|
1129
|
+
|
|
1072
1130
|
### Kroger
|
|
1073
1131
|
|
|
1074
1132
|
| Tool | Description |
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare const PLATFORM_KEYS: string[];
|
|
|
4
4
|
/**
|
|
5
5
|
* What registers when SCAVIO_PLATFORMS is unset.
|
|
6
6
|
*
|
|
7
|
-
* Registering everything is not an option any more. The full surface is
|
|
8
|
-
* tools, which serialises to
|
|
7
|
+
* Registering everything is not an option any more. The full surface is 399
|
|
8
|
+
* tools, which serialises to 437KB of tools/list (measured with
|
|
9
9
|
* `npm run toolslist`, not estimated) — roughly 90k tokens pushed into the
|
|
10
10
|
* context of EVERY session before the user has typed anything, and past the
|
|
11
11
|
* hard tool-count ceiling some clients enforce. The default set below is 142
|
|
@@ -27,7 +27,7 @@ export declare const DEFAULT_PLATFORMS: string[];
|
|
|
27
27
|
* Turn a SCAVIO_PLATFORMS value into the canonical platform keys to register.
|
|
28
28
|
*
|
|
29
29
|
* Accepts a comma-separated list of platform keys, plus three keywords:
|
|
30
|
-
* all — every platform (
|
|
30
|
+
* all — every platform (399 tools)
|
|
31
31
|
* default — expands to DEFAULT_PLATFORMS, so `default,sec,g2` is additive
|
|
32
32
|
* none — no platform tools at all, leaving only get_usage
|
|
33
33
|
*
|
package/dist/tools/index.js
CHANGED
|
@@ -40,6 +40,8 @@ import { registerMenardsTools } from "./menards.js";
|
|
|
40
40
|
import { registerNordstromTools } from "./nordstrom.js";
|
|
41
41
|
import { registerNordstromRackTools } from "./nordstromrack.js";
|
|
42
42
|
import { registerBestBuyTools } from "./bestbuy.js";
|
|
43
|
+
import { registerTcgplayerTools } from "./tcgplayer.js";
|
|
44
|
+
import { registerVintedTools } from "./vinted.js";
|
|
43
45
|
import { registerMercadoLibreTools } from "./mercadolibre.js";
|
|
44
46
|
import { registerTiktokShopTools } from "./tiktok-shop.js";
|
|
45
47
|
import { registerBookingTools } from "./booking.js";
|
|
@@ -123,6 +125,8 @@ const PLATFORMS = {
|
|
|
123
125
|
nordstrom: registerNordstromTools,
|
|
124
126
|
nordstromrack: registerNordstromRackTools,
|
|
125
127
|
bestbuy: registerBestBuyTools,
|
|
128
|
+
tcgplayer: registerTcgplayerTools,
|
|
129
|
+
vinted: registerVintedTools,
|
|
126
130
|
mercadolibre: registerMercadoLibreTools,
|
|
127
131
|
"tiktok-shop": registerTiktokShopTools,
|
|
128
132
|
// Travel and local
|
|
@@ -157,8 +161,8 @@ export const PLATFORM_KEYS = Object.keys(PLATFORMS);
|
|
|
157
161
|
/**
|
|
158
162
|
* What registers when SCAVIO_PLATFORMS is unset.
|
|
159
163
|
*
|
|
160
|
-
* Registering everything is not an option any more. The full surface is
|
|
161
|
-
* tools, which serialises to
|
|
164
|
+
* Registering everything is not an option any more. The full surface is 399
|
|
165
|
+
* tools, which serialises to 437KB of tools/list (measured with
|
|
162
166
|
* `npm run toolslist`, not estimated) — roughly 90k tokens pushed into the
|
|
163
167
|
* context of EVERY session before the user has typed anything, and past the
|
|
164
168
|
* hard tool-count ceiling some clients enforce. The default set below is 142
|
|
@@ -215,7 +219,7 @@ function warnOnce(message) {
|
|
|
215
219
|
* Turn a SCAVIO_PLATFORMS value into the canonical platform keys to register.
|
|
216
220
|
*
|
|
217
221
|
* Accepts a comma-separated list of platform keys, plus three keywords:
|
|
218
|
-
* all — every platform (
|
|
222
|
+
* all — every platform (399 tools)
|
|
219
223
|
* default — expands to DEFAULT_PLATFORMS, so `default,sec,g2` is additive
|
|
220
224
|
* none — no platform tools at all, leaving only get_usage
|
|
221
225
|
*
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
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KAAK,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,qBAAqB,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9G,OAAO,UAAU,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAiB,EACjB,SAA6B,EAC7B,eAAmC,GAAG,CAAC,gBAAgB;IAEvD,MAAM,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,SAAS;QAAE,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAClE,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleApiError } from "../lib/tool-error.js";
|
|
3
|
+
import { trimResponse } from "../lib/trim-response.js";
|
|
4
|
+
// Shapes mirror backend/src/routes/tcgplayer.ts (tcgplayer.com, US
|
|
5
|
+
// marketplace, USD). Cross-field rules the backend enforces and zod here does
|
|
6
|
+
// not: product, listings, price history and sales take product_id OR url;
|
|
7
|
+
// search needs a query unless game or set is given. No zod `.default()`: the
|
|
8
|
+
// MCP SDK would post a defaulted field on every call.
|
|
9
|
+
const SEARCH_SORTS = ["relevance", "best_match", "best_selling", "name_asc", "price_asc", "price_desc"];
|
|
10
|
+
const LISTING_SORTS = ["price_shipping", "price"];
|
|
11
|
+
const HISTORY_RANGES = ["month", "quarter", "semi_annual", "annual"];
|
|
12
|
+
const PRODUCT_TYPES = ["cards", "sealed"];
|
|
13
|
+
const TRENDING_GAMES = ["all", "pokemon", "magic", "yugioh"];
|
|
14
|
+
const CONDITIONS = "Near Mint, Lightly Played, Moderately Played, Heavily Played, Damaged, Unopened (or NM, LP, MP, HP, DM, U)";
|
|
15
|
+
const PRODUCT_FIELDS = "product id, name, URL, image, game, set name, code and id, card number, rarity, product type, sealed and foil-only flags, release date, market price, median price, lowest price, lowest price with shipping and listing count";
|
|
16
|
+
const productId = () => z.union([z.number().int().positive(), z.string().regex(/^\d{1,10}$/)]).optional()
|
|
17
|
+
.describe("TCGplayer product id, the number after /product/ in a tcgplayer.com URL (a search result's product_id), e.g. 219058.");
|
|
18
|
+
const productUrl = () => z.string().min(1).max(600).optional()
|
|
19
|
+
.describe("A tcgplayer.com product URL (/product/<id>/...). Used when product_id is not given.");
|
|
20
|
+
const game = () => z.string().min(1).max(80).optional()
|
|
21
|
+
.describe("Game (product line) url_name from get_tcgplayer_games: pokemon, magic, yugioh, pokemon-japan, one-piece-card-game, lorcana-tcg...");
|
|
22
|
+
const sellerKey = () => z.string().min(4).max(16)
|
|
23
|
+
.describe("TCGplayer seller key, a listing's seller.key (8 characters), e.g. '58f7acae'.");
|
|
24
|
+
const searchSort = () => z.enum(SEARCH_SORTS).optional()
|
|
25
|
+
.describe("relevance (default), best_match, best_selling, name_asc, price_asc or price_desc (by market price). relevance and best_match rankings shift between calls and page 2+ drops products already seen (duplicates_removed), so a price or name sort pages more predictably.");
|
|
26
|
+
const searchPage = () => z.number().int().min(1).max(200).optional()
|
|
27
|
+
.describe("Results page, 1-based, up to 200. Defaults to 1.");
|
|
28
|
+
const searchLimit = () => z.number().int().min(1).max(50).optional()
|
|
29
|
+
.describe("Products per page, 1-50. Defaults to 24.");
|
|
30
|
+
const textList = (example, description) => z.union([z.array(z.string().min(1).max(40)).max(10), z.string().min(1).max(200)]).optional()
|
|
31
|
+
.describe(`${description} Array or comma-separated string, e.g. ${example}.`);
|
|
32
|
+
export function registerTcgplayerTools(server, getClient) {
|
|
33
|
+
const post = (path) => async (params) => {
|
|
34
|
+
try {
|
|
35
|
+
const data = await getClient().post(`/api/v1/tcgplayer/${path}`, params);
|
|
36
|
+
return trimResponse(data);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
return handleApiError(err);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
server.tool("search_tcgplayer", `Search TCGplayer (US marketplace, USD) for trading cards and sealed products across every game (Pokemon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana and 60+ more), up to 50 per page, sorted by relevance, best match, best selling, name or market price, filtered by game, set, rarity and cards vs sealed. query is optional when game or set is given, to browse it. Each product has ${PRODUCT_FIELDS}, plus up to 3 featured live listings (price, shipping, condition, printing, seller). Also returns total_results, has_more and the filter facets (game, set, rarity, product type, card type, condition, language, printing...) with counts; a facet's url_value is what game and set accept. Use a result's product_id with get_tcgplayer_product, get_tcgplayer_listings, get_tcgplayer_price_history or get_tcgplayer_sales. 1 credit.`, {
|
|
43
|
+
query: z.string().max(200).optional()
|
|
44
|
+
.describe("Search keywords, e.g. 'charizard'. Optional when game or set is given."),
|
|
45
|
+
game: game(),
|
|
46
|
+
set: z.string().min(1).max(80).optional()
|
|
47
|
+
.describe("Only this set, by url_name from get_tcgplayer_sets (or a set facet's url_value), e.g. 'base-set'."),
|
|
48
|
+
rarity: z.string().min(1).max(60).optional()
|
|
49
|
+
.describe("Only this rarity, as spelled in the rarity facet (e.g. Common, Rare, Holo Rare, Secret Rare)."),
|
|
50
|
+
product_type: z.enum(PRODUCT_TYPES).optional()
|
|
51
|
+
.describe("cards (single cards) or sealed (booster boxes, packs, decks, tins...)."),
|
|
52
|
+
sort: searchSort(),
|
|
53
|
+
page: searchPage(),
|
|
54
|
+
limit: searchLimit(),
|
|
55
|
+
}, post("search"));
|
|
56
|
+
server.tool("get_tcgplayer_product", "One TCGplayer product (US marketplace, USD) by product id or URL: name, URL, images (200, 400 and 1000 px), game, set, card number, rarity, product type, release date, market, median and lowest listing price, listing and seller counts, card text, flavor text, the game's card attributes (Pokemon HP, stage, energy type, attacks, weakness, retreat cost; Magic color, mana value, type line, power, toughness; Yu-Gi-Oh! attribute, monster type, level, ATK, DEF...) and every SKU (condition x printing x language, e.g. Near Mint / Normal / English) with its market price, lowest_sale_price and highest_sale_price over recent sales, sale_count (the sales behind the market price) and when it was calculated. The sale fields are sale statistics, not live listings; use get_tcgplayer_listings for offers. An unknown id is a 404 (not billed). 1 credit.", {
|
|
57
|
+
product_id: productId(),
|
|
58
|
+
url: productUrl(),
|
|
59
|
+
}, post("product"));
|
|
60
|
+
server.tool("get_tcgplayer_listings", "Live marketplace listings for one TCGplayer product (US, USD), cheapest first by price plus shipping (default) or by item price, up to 50 per page, filtered by condition, printing, language, verified sellers or TCGplayer Direct. Each listing has listing id, price, shipping, total, quantity, condition, printing, language, listing type (standard or custom, with the custom title and description) and the seller: key, id, name, URL, rating percent, sales band, gold star, verified and Direct flags, programs and location. Also returns total_results, has_more and condition / printing / language / listing type counts. Use a seller.key with get_tcgplayer_seller. 1 credit.", {
|
|
61
|
+
product_id: productId(),
|
|
62
|
+
url: productUrl(),
|
|
63
|
+
condition: textList("['Near Mint']", `Only these conditions: ${CONDITIONS}.`),
|
|
64
|
+
printing: textList("['Foil']", "Only these printings, as a product's skus[].printing spells them (Normal, Foil, Holofoil, Reverse Holofoil, 1st Edition, Unlimited...)."),
|
|
65
|
+
language: textList("['English']", "Only these languages (English, Japanese, French, German, Italian, Spanish, Portuguese, Korean, Chinese (S), Chinese (T), Russian)."),
|
|
66
|
+
verified_sellers: z.boolean().optional().describe("Only verified sellers."),
|
|
67
|
+
direct_only: z.boolean().optional().describe("Only TCGplayer Direct sellers."),
|
|
68
|
+
sort: z.enum(LISTING_SORTS).optional()
|
|
69
|
+
.describe("price_shipping (default, cheapest price plus shipping first) or price (item price only)."),
|
|
70
|
+
page: z.number().int().min(1).max(200).optional()
|
|
71
|
+
.describe("Page, 1-based, up to 200. Defaults to 1."),
|
|
72
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
73
|
+
.describe("Listings per page, 1-50. Defaults to 10."),
|
|
74
|
+
}, post("listings"));
|
|
75
|
+
server.tool("get_tcgplayer_price_history", "Sales price history for one TCGplayer product (US, USD) over a month, quarter (default), half year or year, per SKU (condition, printing, language): total quantity sold, transaction count, average daily sales, and buckets newest first (daily for month, 3-day for quarter, weekly for semi_annual and annual) with market price, quantity sold, transaction count and the low and high sale price with and without shipping (null for a bucket with no sales). Totals across SKUs included. This is the tool for sold volume and price trends. A product with no history is a 404. 1 credit.", {
|
|
76
|
+
product_id: productId(),
|
|
77
|
+
url: productUrl(),
|
|
78
|
+
range: z.enum(HISTORY_RANGES).optional()
|
|
79
|
+
.describe("month (daily buckets), quarter (default, 3-day buckets), semi_annual (weekly) or annual (weekly)."),
|
|
80
|
+
}, post("price-history"));
|
|
81
|
+
server.tool("get_tcgplayer_sales", "The 5 most recent sales of one TCGplayer product (US, USD), optionally only in some conditions: order date, condition, printing, language, quantity, sale price, shipping, total and listing type. TCGplayer shows only the newest 5, so this is not a full sold history; use get_tcgplayer_price_history for volume and daily or weekly sale ranges. 1 credit.", {
|
|
82
|
+
product_id: productId(),
|
|
83
|
+
url: productUrl(),
|
|
84
|
+
condition: textList("['Near Mint']", `Only sales in these conditions: ${CONDITIONS}.`),
|
|
85
|
+
}, post("sales"));
|
|
86
|
+
server.tool("get_tcgplayer_games", "Every game (product line) on TCGplayer, 70+ (Magic: The Gathering, Yu-Gi-Oh!, Pokemon, One Piece, Lorcana...): game_id, name, url_name (what search_tcgplayer, get_tcgplayer_sets and get_tcgplayer_seller_products accept as game) and whether TCGplayer Direct carries it. No parameters. 1 credit.", {}, async () => {
|
|
87
|
+
try {
|
|
88
|
+
const data = await getClient().post("/api/v1/tcgplayer/games", {});
|
|
89
|
+
return trimResponse(data);
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
return handleApiError(err);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
server.tool("get_tcgplayer_sets", "Every set of one TCGplayer game, newest release first: set_id (for get_tcgplayer_price_guide), name, url_name (for search_tcgplayer's set filter), abbreviation, release date and the supplemental flag. An unknown game is a 404. 1 credit.", {
|
|
96
|
+
game: z.union([z.string().min(1).max(80), z.number().int().positive()])
|
|
97
|
+
.describe("Game url_name or game_id from get_tcgplayer_games (pokemon, magic, yugioh, or 3, 1, 2...)."),
|
|
98
|
+
}, post("sets"));
|
|
99
|
+
server.tool("get_tcgplayer_price_guide", "The TCGplayer price guide for one whole set (US, USD): one row per product per condition and printing with product id, name, URL, card number, rarity, market price and low price, for cards (default) or sealed products, up to 500 rows per page. total_results is given for cards (null for sealed). A set with nothing in the guide is a 404. 1 credit.", {
|
|
100
|
+
set_id: z.union([z.number().int().positive(), z.string().regex(/^\d{1,8}$/)])
|
|
101
|
+
.describe("Set id from get_tcgplayer_sets, e.g. 604 (Pokemon Base Set)."),
|
|
102
|
+
product_type: z.enum(PRODUCT_TYPES).optional()
|
|
103
|
+
.describe("cards (default) or sealed."),
|
|
104
|
+
page: z.number().int().min(1).max(100).optional()
|
|
105
|
+
.describe("Page, 1-based, up to 100. Defaults to 1."),
|
|
106
|
+
limit: z.number().int().min(1).max(500).optional()
|
|
107
|
+
.describe("Rows per page, 1-500. Defaults to 100. One row per card per condition and printing."),
|
|
108
|
+
}, post("price-guide"));
|
|
109
|
+
server.tool("get_tcgplayer_suggestions", "The TCGplayer search-box autocomplete for a partial query (no game filter): suggested products (product id, name, URL, set, game, score), matching sets and the games the matches come from with counts. 1 credit.", {
|
|
110
|
+
query: z.string().min(1).max(100)
|
|
111
|
+
.describe("What the shopper has typed so far, e.g. 'charizard'."),
|
|
112
|
+
}, post("suggestions"));
|
|
113
|
+
server.tool("get_tcgplayer_trending", "What shoppers are searching on TCGplayer right now, overall or for Pokemon, Magic or Yu-Gi-Oh!: up to 10 terms with a popularity score. 1 credit.", {
|
|
114
|
+
game: z.enum(TRENDING_GAMES).optional()
|
|
115
|
+
.describe("all (default), pokemon, magic or yugioh."),
|
|
116
|
+
}, post("trending"));
|
|
117
|
+
server.tool("get_tcgplayer_seller", "One TCGplayer seller by seller key (a listing's seller.key): store name, URL, location, member since, lifetime sales band, completed sales rank, rating percent, gold star, Direct, Pro, certified hobby shop and WPN flags, US and international shipping, store hours, games sold, social links, and the last 365 days of buyer feedback summarized (total, percent positive, count per star, as described / arrived when expected / good communication). An unknown key is a 404. 1 credit.", {
|
|
118
|
+
seller_key: sellerKey(),
|
|
119
|
+
}, post("seller"));
|
|
120
|
+
server.tool("get_tcgplayer_seller_feedback", "Individual buyer feedback on one TCGplayer seller from the last 365 days, newest first, up to 50 per page, optionally only one star rating or only feedback with a comment: date, rating, comment, as described / arrived when expected / good communication, and the buyer's masked nickname as the site shows it. Also total_results as TCGplayer reports it (approximate under the rating and with_comment filters) and has_more (true when the page is full). 1 credit.", {
|
|
121
|
+
seller_key: sellerKey(),
|
|
122
|
+
rating: z.number().int().min(1).max(5).optional()
|
|
123
|
+
.describe("Only feedback with this many stars, 1-5."),
|
|
124
|
+
with_comment: z.boolean().optional()
|
|
125
|
+
.describe("Only feedback that has a written comment."),
|
|
126
|
+
page: z.number().int().min(1).max(500).optional()
|
|
127
|
+
.describe("Page, 1-based, up to 500. Defaults to 1."),
|
|
128
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
129
|
+
.describe("Feedback per page, 1-50. Defaults to 10."),
|
|
130
|
+
}, post("seller-feedback"));
|
|
131
|
+
server.tool("get_tcgplayer_seller_products", `The products one TCGplayer seller has listed (US, USD), optionally matching keywords or one game, up to 50 per page, sorted like search_tcgplayer. Each product has ${PRODUCT_FIELDS}, plus the seller's own listings of it (price, shipping, condition, printing, language, quantity). Also total_results, has_more and facets. 1 credit.`, {
|
|
132
|
+
seller_key: sellerKey(),
|
|
133
|
+
query: z.string().max(200).optional()
|
|
134
|
+
.describe("Only the seller's products matching these keywords, e.g. 'charizard'. Optional."),
|
|
135
|
+
game: game(),
|
|
136
|
+
sort: searchSort(),
|
|
137
|
+
page: searchPage(),
|
|
138
|
+
limit: searchLimit(),
|
|
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AAI,EAAE,IAAI,EAAE;QACZ,IAAI,EAAE,UAAU,EAAE;QAClB,IAAI,EAAE,UAAU,EAAE;QAClB,KAAK,EAAE,WAAW,EAAE;KACrB,EACD,IAAI,CAAC,iBAAiB,CAAC,CACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleApiError } from "../lib/tool-error.js";
|
|
3
|
+
import { trimResponse } from "../lib/trim-response.js";
|
|
4
|
+
// Shapes mirror backend/src/routes/vinted.ts (27 Vinted country sites,
|
|
5
|
+
// country defaults to fr on the backend). Cross-field rule the backend
|
|
6
|
+
// enforces and zod here does not: product takes item_id OR url. No zod
|
|
7
|
+
// `.default()`: the MCP SDK would post a defaulted field on every call.
|
|
8
|
+
const COUNTRIES = [
|
|
9
|
+
"fr", "be", "lu", "es", "nl", "lt", "de", "at", "it", "uk", "pt", "us", "cz", "sk",
|
|
10
|
+
"pl", "se", "ro", "hu", "dk", "fi", "hr", "gr", "ie", "ee", "lv", "si", "au",
|
|
11
|
+
];
|
|
12
|
+
const SEARCH_SORTS = ["relevance", "newest_first", "price_low_to_high", "price_high_to_low"];
|
|
13
|
+
const WARDROBE_SORTS = ["newest_first", "price_low_to_high", "relevance"];
|
|
14
|
+
const FILTER_CODES = ["size", "status", "color", "material"];
|
|
15
|
+
const CONDITIONS = "6 New with tags, 1 New without tags, 2 Very good, 3 Good, 4 Satisfactory";
|
|
16
|
+
const FEE = "service_fee is the Vinted fee the buyer pays on top of the price (formerly the Buyer Protection fee) and total_price is price plus that fee";
|
|
17
|
+
const country = () => z.enum(COUNTRIES).optional()
|
|
18
|
+
.describe("Vinted country site: fr (default), be, lu, es, nl, lt, de, at, it, uk (vinted.co.uk), pt, us (vinted.com), cz, sk, pl, se, ro, hu, dk, fi, hr, gr, ie, ee, lv, si, au (vinted.com.au). Category, condition and filter names come back in the site's language. The EU sites share one cross-border listing pool, priced in the site's currency (EUR, or CZK, PLN, SEK, RON, HUF, DKK); uk (GBP), us (USD) and au (AUD) are separate catalogs.");
|
|
19
|
+
const siteCode = () => z.enum(COUNTRIES).optional()
|
|
20
|
+
.describe("Vinted country site, one of the 27 codes search_vinted takes (fr default, uk, us, de, pl, es, it, nl, au...). Names come back in the site's language.");
|
|
21
|
+
const numericId = (max) => z.union([z.number().int().positive(), z.string().regex(new RegExp(`^\\d{1,${max}}$`))]);
|
|
22
|
+
const idList = (description) => z.union([z.array(numericId(9)).max(20), z.string().min(1).max(200)]).optional()
|
|
23
|
+
.describe(`${description} Array or comma-separated string, up to 20.`);
|
|
24
|
+
const userId = () => numericId(12)
|
|
25
|
+
.describe("Vinted member id: a search result's seller.id, a product's seller.id, or the number after /member/ in a profile URL, e.g. 65958245.");
|
|
26
|
+
export function registerVintedTools(server, getClient) {
|
|
27
|
+
const post = (path) => async (params) => {
|
|
28
|
+
try {
|
|
29
|
+
const data = await getClient().post(`/api/v1/vinted/${path}`, params);
|
|
30
|
+
return trimResponse(data);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
return handleApiError(err);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
server.tool("search_vinted", `Search second-hand listings on any of 27 Vinted country sites (fr default; uk, us, de, pl, es, it, nl, au and more) by keywords, category, brand, condition, size, color, material and price range, sorted by relevance, newest or price. query is optional when category_id or brand_ids is given, to browse it. 96 items per page, pages 1-10 (Vinted serves no deeper). Each item has id, title, URL, price and currency (the country site's currency), price_with_discount, service_fee, total_price, brand, size, condition, favourite count, promoted flag, photos and the seller's id and business flag; ${FEE}. Also returns listed_results and total_pages (capped at 960 and 10; total_is_capped is true when the real number of matches is higher) and the filters Vinted actually applied, so an ignored filter is visible. Live listings only: sold items are not searchable. Use an item id with get_vinted_product and a seller id with get_vinted_seller. 1 credit.`, {
|
|
37
|
+
country: country(),
|
|
38
|
+
query: z.string().max(200).optional()
|
|
39
|
+
.describe("Search keywords, e.g. 'barbour jacket'. Optional when category_id or brand_ids is given."),
|
|
40
|
+
category_id: numericId(9).optional()
|
|
41
|
+
.describe("Only this category and its subcategories, by id from get_vinted_categories (1907 is Women > Clothing > Outerwear > Coats)."),
|
|
42
|
+
brand_ids: idList("Only these brands, by id from get_vinted_brands (Nike 53, Levi's 10, Barbour 46805)."),
|
|
43
|
+
status_ids: idList(`Only these conditions: ${CONDITIONS}.`),
|
|
44
|
+
size_ids: idList("Only these sizes, by option id from get_vinted_filters with filter size (4 is women's M / UK 12-14 / US 8-10)."),
|
|
45
|
+
color_ids: idList("Only these colors, by option id from get_vinted_filters with filter color (1 is black)."),
|
|
46
|
+
material_ids: idList("Only these materials, by option id from get_vinted_filters with filter material (123 is cashmere)."),
|
|
47
|
+
price_from: z.number().min(0).optional()
|
|
48
|
+
.describe("Minimum item price, in the country site's currency."),
|
|
49
|
+
price_to: z.number().min(0).optional()
|
|
50
|
+
.describe("Maximum item price, in the country site's currency."),
|
|
51
|
+
sort: z.enum(SEARCH_SORTS).optional()
|
|
52
|
+
.describe("relevance (default), newest_first, price_low_to_high or price_high_to_low. Price sorts rank loosely matching items too (very cheap or placeholder-priced listings), so pair them with a category or price range."),
|
|
53
|
+
page: z.number().int().min(1).max(10).optional()
|
|
54
|
+
.describe("Results page, 1-10 (Vinted serves at most 10 pages of 96). Defaults to 1."),
|
|
55
|
+
}, post("search"));
|
|
56
|
+
server.tool("get_vinted_product", `One Vinted listing by item id or URL: title, description, price and currency (the seller's currency, which can differ from the country site's), brand, size, condition, color, material, when it was uploaded as Vinted words it (uploaded_relative, e.g. "8 hours ago"), category id and path, all photos, favourite count, reserved and sold state, whether it can be bought now, and the seller (id, login, profile URL, business flag, feedback count, rating 0-1, badges). Sold listings still return their last price. A URL's own site is used whatever country says. An unknown id is a 404. 1 credit.`, {
|
|
57
|
+
country: siteCode(),
|
|
58
|
+
item_id: numericId(13).optional()
|
|
59
|
+
.describe("Vinted item id (a search result's id, the number after /items/ in a Vinted URL), e.g. 10671938315. Pass item_id or url."),
|
|
60
|
+
url: z.string().min(1).max(600).optional()
|
|
61
|
+
.describe("A Vinted item URL on any country site, e.g. https://www.vinted.co.uk/items/10671938315-nike-air-max-size-uk-75. Its own site is used (and echoed as country)."),
|
|
62
|
+
}, post("product"));
|
|
63
|
+
server.tool("get_vinted_seller", "One Vinted member's public seller profile: login, profile URL, business flag, feedback count, rating (0-1), positive / neutral / negative feedback counts, listed item count, country, city (only when the member shows it), email / Facebook / Google verification, average response time, holiday mode and the date last seen. Public buyer-relevant fields only. An unknown id is a 404. 1 credit.", {
|
|
64
|
+
country: siteCode(),
|
|
65
|
+
user_id: userId(),
|
|
66
|
+
}, post("seller"));
|
|
67
|
+
server.tool("get_vinted_seller_products", `The items one Vinted member has listed, newest first (default), cheapest first or by relevance, up to 96 per page: id, title, URL, price, currency, service_fee, total_price, brand, size, condition, favourite count, reserved, sold and promoted flags and photos; ${FEE}. Also total_results, total_pages and has_more. A member with no listings (or an unknown id) returns an empty list. 1 credit.`, {
|
|
68
|
+
country: siteCode(),
|
|
69
|
+
user_id: userId(),
|
|
70
|
+
sort: z.enum(WARDROBE_SORTS).optional()
|
|
71
|
+
.describe("newest_first (default), price_low_to_high or relevance."),
|
|
72
|
+
page: z.number().int().min(1).max(500).optional()
|
|
73
|
+
.describe("Page, 1-based, up to 500. Defaults to 1."),
|
|
74
|
+
limit: z.number().int().min(1).max(96).optional()
|
|
75
|
+
.describe("Items per page, 1-96. Defaults to 20."),
|
|
76
|
+
}, post("seller-products"));
|
|
77
|
+
server.tool("get_vinted_seller_feedback", "Reviews left for one Vinted member, newest first, up to 50 per page: rating 1-5, review text, date, whether it is Vinted's automatic feedback, and the member's reply. Reviewer identities and the items reviewed are not included. Also total_results, total_pages and has_more. 1 credit.", {
|
|
78
|
+
country: siteCode(),
|
|
79
|
+
user_id: userId(),
|
|
80
|
+
page: z.number().int().min(1).max(500).optional()
|
|
81
|
+
.describe("Page, 1-based, newest first, up to 500. Defaults to 1."),
|
|
82
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
83
|
+
.describe("Feedback per page, 1-50. Defaults to 20."),
|
|
84
|
+
}, post("seller-feedback"));
|
|
85
|
+
server.tool("get_vinted_brands", "Find Vinted brands by name: brand id (what search_vinted's brand_ids takes), title, slug, URL, number of listings, luxury flag and whether Vinted authenticity-checks it. 1 credit.", {
|
|
86
|
+
country: siteCode(),
|
|
87
|
+
query: z.string().min(1).max(100)
|
|
88
|
+
.describe("Brand name or part of it, e.g. 'barbour'."),
|
|
89
|
+
}, post("brands"));
|
|
90
|
+
server.tool("get_vinted_suggestions", "The Vinted search-box autocomplete for a partial query, in the country site's language: up to 10 suggestions, each with its type (popular_search, or the catalog match it comes from such as brand, brand+parent_cat or attr). 1 credit.", {
|
|
91
|
+
country: siteCode(),
|
|
92
|
+
query: z.string().min(1).max(100)
|
|
93
|
+
.describe("What the shopper has typed so far, e.g. 'barb'."),
|
|
94
|
+
}, post("suggestions"));
|
|
95
|
+
server.tool("get_vinted_filters", "The options of one Vinted search filter (size, condition, color or material) with live item counts, optionally for a query and a category: id (what search_vinted's size_ids, status_ids, color_ids and material_ids take), localized title, item count, the size group (e.g. \"Women > Women's items\") and, for conditions, the description. 1 credit.", {
|
|
96
|
+
country: siteCode(),
|
|
97
|
+
filter: z.enum(FILTER_CODES)
|
|
98
|
+
.describe("size, status (condition), color or material."),
|
|
99
|
+
query: z.string().max(200).optional()
|
|
100
|
+
.describe("Count options for this search, e.g. 'dress'. Optional."),
|
|
101
|
+
category_id: numericId(9).optional()
|
|
102
|
+
.describe("Count options within this category, e.g. 1904 (Women). Sizes are grouped per category, so pass one for size."),
|
|
103
|
+
}, post("filters"));
|
|
104
|
+
server.tool("get_vinted_categories", "The Vinted category tree in the country site's language (9 top-level categories, about 3,000 in all): id (what search_vinted's category_id takes), title, URL and children; or one category's subtree with its path. 1 credit.", {
|
|
105
|
+
country: siteCode(),
|
|
106
|
+
parent_id: numericId(9).optional()
|
|
107
|
+
.describe("Return only this category's subtree (1904 is Women). Omit for the whole tree."),
|
|
108
|
+
}, post("categories"));
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=vinted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vinted.js","sourceRoot":"","sources":["../../src/tools/vinted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,uEAAuE;AACvE,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AAExE,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClF,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CACpE,CAAC;AACX,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,CAAU,CAAC;AACtG,MAAM,cAAc,GAAG,CAAC,cAAc,EAAE,mBAAmB,EAAE,WAAW,CAAU,CAAC;AACnF,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AACtE,MAAM,UAAU,GAAG,0EAA0E,CAAC;AAE9F,MAAM,GAAG,GAAG,6IAA6I,CAAC;AAE1J,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;KAC/C,QAAQ,CAAC,8aAA8a,CAAC,CAAC;AAC5b,MAAM,QA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;aAClC,QAAQ,CAAC,wDAAwD,CAAC;QACrE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;aACjC,QAAQ,CAAC,8GAA8G,CAAC;KAC5H,EACD,IAAI,CAAC,SAAS,CAAC,CAChB,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,gOAAgO,EAChO;QACE,OAAO,EAAE,QAAQ,EAAE;QACnB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;aAC/B,QAAQ,CAAC,+EAA+E,CAAC;KAC7F,EACD,IAAI,CAAC,YAAY,CAAC,CACnB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scavio/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"mcpName": "io.github.scavio-ai/scavio-mcp",
|
|
5
|
-
"description": "MCP server connecting AI agents to Scavio: web search, page extraction, and structured e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing data.
|
|
5
|
+
"description": "MCP server connecting AI agents to Scavio: web search, page extraction, and structured e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing data. 399 tools across 63 platforms plus Extract, site map, crawl and batch extraction, one API key.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "Scavio",
|
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
"nordstromrack",
|
|
46
46
|
"bestbuy",
|
|
47
47
|
"best-buy",
|
|
48
|
+
"tcgplayer",
|
|
49
|
+
"pokemon-cards",
|
|
50
|
+
"mtg",
|
|
51
|
+
"vinted",
|
|
52
|
+
"vinted-api",
|
|
53
|
+
"second-hand",
|
|
48
54
|
"mercadolibre",
|
|
49
55
|
"mercado-libre",
|
|
50
56
|
"tiktok",
|