storelift-mcp 1.0.0 → 1.0.2

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -2
  3. package/index.mjs +64 -18
  4. package/package.json +4 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vomcore
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,7 +4,7 @@ App Store & Google Play ranking data as an MCP server. Ask your assistant which
4
4
  keywords you dropped on, who outranks you, and whether AI assistants mention
5
5
  your app at all — without opening a dashboard.
6
6
 
7
- Backed by [Storelift](https://storelift.vomcore.com), which measures keyword
7
+ Backed by [Storelift](https://storelift.net), which measures keyword
8
8
  ranks, rivals and AI visibility nightly. **No store credentials required** —
9
9
  ranks are read from the public storefront.
10
10
 
@@ -65,7 +65,7 @@ single measurement.
65
65
  | Variable | Default | Purpose |
66
66
  |---|---|---|
67
67
  | `STORELIFT_API_KEY` | — | required; the server exits with a message if unset |
68
- | `STORELIFT_API` | `https://storelift.vomcore.com` | override the API base |
68
+ | `STORELIFT_API` | `https://storelift.net` | override the API base |
69
69
 
70
70
  No dependencies — a single file speaking JSON-RPC over stdio. Runs with
71
71
  `node index.mjs` just as well as through `npx`.
package/index.mjs CHANGED
@@ -20,38 +20,66 @@
20
20
  // BAĞIMLILIK YOK: stdio üzerinden JSON-RPC elle konuşuluyor. Tek dosya, npm
21
21
  // kurulumu gerektirmeden `node index.mjs` ile de çalışır.
22
22
 
23
- const BASE = process.env.STORELIFT_API || "https://storelift.vomcore.com";
23
+ import { createRequire } from "node:module";
24
+
25
+ const BASE = process.env.STORELIFT_API || "https://storelift.net";
24
26
  const KEY = process.env.STORELIFT_API_KEY;
27
+ // Sürüm TEK YERDEN: elle yazılan serverInfo.version, package.json 1.0.1'e
28
+ // çıkınca 1.0.0'da kalıp istemciye yanlış sürüm bildiriyordu.
29
+ const { version: VERSION } = createRequire(import.meta.url)("./package.json");
25
30
 
31
+ // DIŞA DÖNÜK METİNLER İNGİLİZCE. Kod yorumları Türkçe (depo dili), ama araç
32
+ // açıklamaları ve hata metinleri MCP dizinlerinde ve yabancı bir kullanıcının
33
+ // araç panelinde görünüyor — orada Türkçe, ürünü küçültür.
26
34
  if (!KEY) {
27
- console.error("STORELIFT_API_KEY tanımlı değil. Ayarlar → API anahtarları'ndan bir anahtar üret.");
35
+ // ⚠️ PLAN DA YAZILIYOR. Eski metin yalnız "Settings → API keys" diyordu;
36
+ // Public API STUDIO'ya açık (api/index.mjs › PLANS: free/pro `api: false`).
37
+ // Ücretsiz plandaki biri o yönergeyi izleyip anahtar üretemeyince paketi
38
+ // bozuk sanıyordu — README plan şartını söylüyordu ama çalışan program
39
+ // söylemiyordu, ve kullanıcı README'yi değil hata metnini okuyor.
40
+ console.error(
41
+ "STORELIFT_API_KEY is not set.\n" +
42
+ "Generate one at Storelift → Settings → API keys (requires the Studio plan).\n" +
43
+ "https://storelift.net/pricing"
44
+ );
28
45
  process.exit(1);
29
46
  }
30
47
 
48
+ /* Sunucunun hata KODLARI kısa ve makine için ("plan_required"). Model onu
49
+ olduğu gibi kullanıcıya anlatınca ortaya "ERROR: plan_required" çıkıyor ve
50
+ kimse ne yapacağını bilmiyor. En sık karşılaşılacak üç durum burada insan
51
+ cümlesine çevriliyor; çevrilmeyen kod olduğu gibi geçiyor (uydurma bir
52
+ açıklama, hiç açıklama olmamasından kötüdür). */
53
+ const HATA_METNI = {
54
+ plan_required: "The Public API is available on the Studio plan. Upgrade at https://storelift.net/pricing",
55
+ invalid_api_key: "This API key is not valid. Generate a new one at Storelift → Settings → API keys.",
56
+ missing_api_key: "No API key was sent. Set STORELIFT_API_KEY in your MCP server config.",
57
+ };
58
+
31
59
  async function api(path) {
32
60
  const res = await fetch(BASE + path, { headers: { "x-api-key": KEY } });
33
61
  const body = await res.json().catch(() => ({}));
34
- if (!res.ok) throw new Error(body.error || `HTTP ${res.status}`);
62
+ if (!res.ok) throw new Error(HATA_METNI[body.error] || body.error || `HTTP ${res.status}`);
35
63
  return body;
36
64
  }
37
65
 
38
66
  const TOOLS = [
39
67
  {
40
68
  name: "list_apps",
41
- description: "Storelift hesabındaki izlenen uygulamaları listeler (id, ad, ülkeler, kelimeler).",
69
+ description: "List the apps tracked in this Storelift account (id, name, countries, keywords). Call this first — every other tool needs an appId from here.",
42
70
  inputSchema: { type: "object", properties: {} },
43
71
  run: () => api("/v1/apps"),
44
72
  },
45
73
  {
46
74
  name: "get_keywords",
47
75
  description:
48
- "Bir uygulamanın bir ülkedeki kelime sıralarını verir. ÜÇ DURUM AYRIDIR: measured=false ölçülemedi, rank=null ölçüldü ama ilk sonuçlarda yok, rank=sayı sıra. Bunları birbirine karıştırma.",
76
+ "Keyword ranks for one app in one App Store / Google Play country. THREE STATES ARE DISTINCT: measured=false means the query could not be measured, rank=null means it was measured but the app is absent from the top results, rank=<number> is the rank. Never collapse them into one — counting an unmeasured day as zero produces a false answer.",
49
77
  inputSchema: {
50
78
  type: "object",
51
79
  properties: {
52
- appId: { type: "string", description: "list_apps'ten gelen uygulama kimliği" },
53
- country: { type: "string", description: "ülke kodu, ör. tr" },
54
- platform: { type: "string", enum: ["ios", "android"] },
80
+ appId: { type: "string", description: "app id from list_apps" },
81
+ country: { type: "string", description: "country code, e.g. tr, us (defaults to the app's first country)" },
82
+ platform: { type: "string", enum: ["ios", "android"], description: "defaults to ios" },
55
83
  },
56
84
  required: ["appId"],
57
85
  },
@@ -60,10 +88,14 @@ const TOOLS = [
60
88
  {
61
89
  name: "get_rivals",
62
90
  description:
63
- "Aramada uygulamanın ÜSTÜNDE çıkan uygulamalar. Her rakip için hangi kelimede kaçıncı olduğu ve bizim sıramız birlikte döner (ourRank null ise o kelimede hiç görünmüyoruz).",
91
+ "Apps that rank ABOVE this app in search. For each rival you get the keywords it beats you on, its rank there (theirRank) and yours (ourRank) — ourRank null means the app does not appear for that keyword at all.",
64
92
  inputSchema: {
65
93
  type: "object",
66
- properties: { appId: { type: "string" }, country: { type: "string" }, platform: { type: "string", enum: ["ios", "android"] } },
94
+ properties: {
95
+ appId: { type: "string", description: "app id from list_apps" },
96
+ country: { type: "string", description: "country code, e.g. tr, us" },
97
+ platform: { type: "string", enum: ["ios", "android"], description: "defaults to ios" },
98
+ },
67
99
  required: ["appId"],
68
100
  },
69
101
  run: (a) => api(`/v1/apps/${a.appId}/rivals?country=${a.country || ""}&platform=${a.platform || "ios"}`),
@@ -71,14 +103,28 @@ const TOOLS = [
71
103
  {
72
104
  name: "get_ai_visibility",
73
105
  description:
74
- "Asistanlara sorulan doğal sorularda uygulamanın anılıp anılmadığı — motor başına (Claude/ChatGPT/Gemini). Bu bir sıralama değil gözlemdir; tek ölçüm kanıt değildir, eğilime bak.",
75
- inputSchema: { type: "object", properties: { appId: { type: "string" }, country: { type: "string" } }, required: ["appId"] },
106
+ "Whether AI assistants name this app when asked natural questions about its category — reported per engine (Claude / ChatGPT / Gemini), never averaged. This is an OBSERVATION, not a ranking: a model's knowledge is frozen at a date and the answer is not identical every time, so read the trend rather than a single measurement.",
107
+ inputSchema: {
108
+ type: "object",
109
+ properties: {
110
+ appId: { type: "string", description: "app id from list_apps" },
111
+ country: { type: "string", description: "country code, e.g. tr, us" },
112
+ },
113
+ required: ["appId"],
114
+ },
76
115
  run: (a) => api(`/v1/apps/${a.appId}/ai?country=${a.country || ""}`),
77
116
  },
78
117
  {
79
118
  name: "get_history",
80
- description: "Bir ülkedeki kelime sıra geçmişi. Seri noktaları [gün, sıra] biçiminde; sıra null ise o gün ilk sonuçlarda yoktuk.",
81
- inputSchema: { type: "object", properties: { appId: { type: "string" }, country: { type: "string" } }, required: ["appId"] },
119
+ description: "Keyword rank history for one country. Series points are [day, rank]; a null rank means the app was absent from the top results that day, which is not the same as a bad rank.",
120
+ inputSchema: {
121
+ type: "object",
122
+ properties: {
123
+ appId: { type: "string", description: "app id from list_apps" },
124
+ country: { type: "string", description: "country code, e.g. tr, us" },
125
+ },
126
+ required: ["appId"],
127
+ },
82
128
  run: (a) => api(`/v1/apps/${a.appId}/history?country=${a.country || ""}`),
83
129
  },
84
130
  ];
@@ -93,7 +139,7 @@ async function handle(req) {
93
139
  return ok(id, {
94
140
  protocolVersion: "2024-11-05",
95
141
  capabilities: { tools: {} },
96
- serverInfo: { name: "storelift", version: "1.0.0" },
142
+ serverInfo: { name: "storelift", version: VERSION },
97
143
  });
98
144
  }
99
145
  if (method === "notifications/initialized") return; // bildirim, yanıt beklemez
@@ -102,17 +148,17 @@ async function handle(req) {
102
148
  }
103
149
  if (method === "tools/call") {
104
150
  const tool = TOOLS.find((t) => t.name === params?.name);
105
- if (!tool) return err(id, `bilinmeyen araç: ${params?.name}`);
151
+ if (!tool) return err(id, `unknown tool: ${params?.name}`);
106
152
  try {
107
153
  const data = await tool.run(params.arguments || {});
108
154
  return ok(id, { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] });
109
155
  } catch (e) {
110
156
  // Hata metni araca DÖNÜYOR, sessizce yutulmuyor: model "veri yok" ile
111
157
  // "okuyamadım" arasındaki farkı görmezse yanlış sonuç anlatır.
112
- return ok(id, { content: [{ type: "text", text: `HATA: ${e.message}` }], isError: true });
158
+ return ok(id, { content: [{ type: "text", text: `ERROR: ${e.message}` }], isError: true });
113
159
  }
114
160
  }
115
- if (id !== undefined) err(id, `desteklenmeyen metot: ${method}`);
161
+ if (id !== undefined) err(id, `unsupported method: ${method}`);
116
162
  }
117
163
 
118
164
  let buf = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storelift-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "App Store & Google Play keyword ranks, rivals and AI visibility as an MCP server",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "files": [
10
10
  "index.mjs",
11
- "README.md"
11
+ "README.md",
12
+ "LICENSE"
12
13
  ],
13
14
  "keywords": [
14
15
  "mcp",
@@ -22,7 +23,7 @@
22
23
  "keyword-rank",
23
24
  "ai-visibility"
24
25
  ],
25
- "homepage": "https://storelift.vomcore.com",
26
+ "homepage": "https://storelift.net",
26
27
  "bugs": {
27
28
  "email": "hello@vomcore.com"
28
29
  },