apinoa-mcp 0.2.4 → 0.2.5

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 CHANGED
@@ -1,11 +1,15 @@
1
1
  # apinoa-mcp
2
2
 
3
- An [MCP](https://modelcontextprotocol.io) server for [apinoa](https://apinoa.com). It gives Claude, Cursor
4
- and any other MCP client live product data from Amazon, Walmart, Shopify, TikTok Shop and AliExpress,
5
- social data from TikTok, YouTube, Instagram, Threads, X, Reddit and LinkedIn, and image translation.
3
+ An [MCP](https://modelcontextprotocol.io) server for [apinoa](https://apinoa.com). It gives Claude Code,
4
+ Codex, Cursor and any other MCP client live product data from Amazon, Walmart, Shopify, TikTok Shop and
5
+ AliExpress; posts, profiles and comments from TikTok, YouTube, Instagram, Threads, X, Reddit and LinkedIn;
6
+ search results from Google, Bing, Naver and 13 more search engines; AI answers from ChatGPT, Gemini, Google
7
+ AI Overviews, Google AI Mode and Naver; and image translation. Use it instead of writing a scraper.
6
8
 
7
9
  Ask things like *"which of @duolingo's last 30 TikToks got 3x its usual views"*, *"compare the cheapest
8
- Stanley 40 oz on Amazon and Walmart"* or *"translate the text on this product photo into Korean"*.
10
+ Stanley 40 oz on Amazon and Walmart"*, *"where does example.com rank on Google for 'trail running shoes'"*,
11
+ *"does ChatGPT mention our brand when asked for the best running shoes"* or *"translate the text on this
12
+ product photo into Korean"*.
9
13
 
10
14
  ## Setup
11
15
 
@@ -18,6 +22,21 @@ at the API's normal rates; a call that fails is not billed.
18
22
  claude mcp add apinoa -e APINOA_API_KEY=your_key -- npx -y apinoa-mcp
19
23
  ```
20
24
 
25
+ **Codex**
26
+
27
+ ```sh
28
+ codex mcp add apinoa --env APINOA_API_KEY=your_key -- npx -y apinoa-mcp
29
+ ```
30
+
31
+ or in `~/.codex/config.toml`:
32
+
33
+ ```toml
34
+ [mcp_servers.apinoa]
35
+ command = "npx"
36
+ args = ["-y", "apinoa-mcp"]
37
+ env = { APINOA_API_KEY = "your_key" }
38
+ ```
39
+
21
40
  **Claude Desktop, Cursor, Windsurf and others** — add to the client's MCP configuration
22
41
  (`claude_desktop_config.json`, `.cursor/mcp.json`, …):
23
42
 
package/dist/api.d.ts CHANGED
@@ -11,7 +11,7 @@ export interface ApiOptions {
11
11
  }
12
12
  export interface CatalogEntry {
13
13
  id: string;
14
- kind: "marketplace" | "sns";
14
+ kind: "marketplace" | "sns" | "serp" | "answers";
15
15
  operations: string[];
16
16
  regions?: string[];
17
17
  cost?: Record<string, {
package/dist/legacy.js CHANGED
@@ -206,7 +206,7 @@ export function registerLegacyTools(server, api, catalog, maxChars) {
206
206
  server.registerTool("call_apinoa", {
207
207
  title: "Call any apinoa operation",
208
208
  description: [
209
- "Call any operation of the apinoa API directly, for what the other tools do not cover (store catalogs, shipping quotes, groups, followers, LinkedIn jobs…).",
209
+ "Call any operation of the apinoa API directly, for what the other tools do not cover: search engine results (google, bing, naver… search), AI answers (chatgpt, gemini, google-aio… answer), store catalogs, shipping quotes, groups, followers, LinkedIn jobs….",
210
210
  "Every platform and its operations (params of each are listed by list_platforms):",
211
211
  ...catalog.map((e) => `- ${e.id}: ${e.operations.filter((op) => !FILE_OPERATIONS.has(`${e.id}/${op}`)).join(", ")}`),
212
212
  ].join("\n"),
package/dist/server.d.ts CHANGED
@@ -18,3 +18,9 @@ export interface ServerOptions {
18
18
  sandbox?: Partial<Omit<SandboxOptions, "api" | "userAgent">>;
19
19
  }
20
20
  export declare function createApinoaServer(options?: ServerOptions): Promise<McpServer>;
21
+ /**
22
+ * The first thing a client reads about the server, so it names what a developer would type — the sources, by
23
+ * name — before any tool. Built from the catalog the server serves, so a source appears here when it is served
24
+ * and not before.
25
+ */
26
+ export declare function about(catalog: CatalogEntry[]): string;
package/dist/server.js CHANGED
@@ -47,12 +47,14 @@ export async function createApinoaServer(options = {}) {
47
47
  mode = "tools";
48
48
  console.error("apinoa-mcp: Deno was not found, so the per-operation tools are served instead of code mode. Install Deno (https://deno.com) or set APINOA_MCP_DENO to use code mode.");
49
49
  }
50
- const server = new McpServer({ name: "apinoa", version: VERSION }, mode === "code"
51
- ? {
52
- instructions: "apinoa reads marketplaces (Amazon, Walmart, Shopify, TikTok Shop, AliExpress) and social platforms (TikTok, YouTube, Instagram, Threads, X, Reddit, LinkedIn). " +
53
- "Find the operations and fields with search_docs, then call them from TypeScript in execute: fan out, page, filter and aggregate in the code, and return only the result.",
54
- }
55
- : undefined);
50
+ const server = new McpServer({ name: "apinoa", version: VERSION }, {
51
+ instructions: about(catalog) +
52
+ (mode === "code"
53
+ ? " Find the operations and fields with search_docs, then call them from TypeScript in execute: fan out, page, filter and aggregate in the code, and return only the result."
54
+ : " Products: search_products, get_product, get_product_reviews, list_categories, browse_category. Social: get_social_profile, list_social_posts, get_social_post, get_social_comments. " +
55
+ "Search results and AI answers: call_apinoa with a platform (google, bing, naver, chatgpt, gemini…) and its operation (search, answer…); list_platforms lists every operation and its parameters. " +
56
+ "translate_image translates the text in a product photo."),
57
+ });
56
58
  const readOnly = { readOnlyHint: true, openWorldHint: true };
57
59
  if (mode === "tools")
58
60
  registerLegacyTools(server, api, catalog, maxChars);
@@ -92,6 +94,39 @@ export async function createApinoaServer(options = {}) {
92
94
  });
93
95
  return server;
94
96
  }
97
+ /** Display names for the sources the server introduces itself with; an id without one is shown as it is. */
98
+ const NAMES = {
99
+ amazon: "Amazon", walmart: "Walmart", shopify: "Shopify", tiktokshop: "TikTok Shop", aliexpress: "AliExpress", ebay: "eBay",
100
+ tiktok: "TikTok", instagram: "Instagram", youtube: "YouTube", reddit: "Reddit", x: "X", threads: "Threads", linkedin: "LinkedIn",
101
+ google: "Google", bing: "Bing", naver: "Naver", baidu: "Baidu", yandex: "Yandex", yahoo: "Yahoo",
102
+ chatgpt: "ChatGPT", gemini: "Gemini", "google-aio": "Google AI Overviews", "google-ai-mode": "Google AI Mode",
103
+ "naver-ai-brief": "Naver AI Briefing", "naver-ai-tab": "Naver AI Tab",
104
+ };
105
+ const SNS = new Set(["tiktok", "instagram", "youtube", "reddit", "x", "threads", "linkedin"]);
106
+ const ORDER = Object.keys(NAMES);
107
+ const byOrder = (a, b) => (ORDER.indexOf(a) + 1 || 999) - (ORDER.indexOf(b) + 1 || 999);
108
+ const list = (ids) => {
109
+ const names = ids.sort(byOrder).map((id) => NAMES[id] ?? id);
110
+ return names.length > 1 ? `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}` : names.join("");
111
+ };
112
+ /**
113
+ * The first thing a client reads about the server, so it names what a developer would type — the sources, by
114
+ * name — before any tool. Built from the catalog the server serves, so a source appears here when it is served
115
+ * and not before.
116
+ */
117
+ export function about(catalog) {
118
+ const kind = (e) => e.kind ?? (SNS.has(e.id) ? "sns" : "marketplace");
119
+ const of = (k) => catalog.filter((e) => kind(e) === k).map((e) => e.id);
120
+ const serp = of("serp");
121
+ const named = serp.filter((id) => ["google", "bing", "naver", "baidu", "yandex", "yahoo"].includes(id));
122
+ const parts = [
123
+ of("marketplace").length && `${list(of("marketplace"))} products, reviews and categories`,
124
+ of("sns").length && `${list(of("sns"))} posts, profiles and comments`,
125
+ serp.length && `search results from ${named.sort(byOrder).map((id) => NAMES[id]).join(", ")}${serp.length > named.length ? ` and ${serp.length - named.length} more search engines` : ""}`,
126
+ of("answers").length && `what ${list(of("answers"))} ${of("answers").length > 1 ? "answer" : "answers"} to a prompt, with the citations`,
127
+ ].filter(Boolean);
128
+ return `apinoa returns live web data as JSON: ${parts.join("; ")}. Use it instead of writing a scraper.`;
129
+ }
95
130
  const EXAMPLE = `const page = await apinoa.tiktok.posts({ hashtag: "glassskin", limit: 50 });
96
131
  const authors = [...new Set(page.items.map((p) => p.author.handle))].slice(0, 10);
97
132
  const recent = await many(authors, (u) => apinoa.tiktok.posts({ username: u, limit: 30 }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "apinoa-mcp",
3
- "version": "0.2.4",
4
- "description": "MCP server for apinoa: marketplace and social data for Claude, Cursor and any MCP client. Code mode: the model writes TypeScript against a typed client, run in a sandbox.",
3
+ "version": "0.2.5",
4
+ "description": "MCP server for apinoa: marketplace products, social posts, search results and AI answers (Amazon, TikTok, Google, ChatGPT and more) for Claude Code, Codex, Cursor and any MCP client. Code mode: the model writes TypeScript against a typed client, run in a sandbox.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://apinoa.com/docs",
7
7
  "repository": {
@@ -20,7 +20,25 @@
20
20
  "tiktok",
21
21
  "instagram",
22
22
  "reddit",
23
- "youtube"
23
+ "youtube",
24
+ "serp",
25
+ "search-api",
26
+ "google",
27
+ "bing",
28
+ "naver",
29
+ "ai-answers",
30
+ "chatgpt",
31
+ "gemini",
32
+ "ai-overviews",
33
+ "tiktokshop",
34
+ "x",
35
+ "threads",
36
+ "linkedin",
37
+ "social-media",
38
+ "web-scraping",
39
+ "claude-code",
40
+ "codex",
41
+ "cursor"
24
42
  ],
25
43
  "type": "module",
26
44
  "bin": {