RankLens
OfficialReads App Store search results from Apple's iTunes Search API to collect daily top-200 keyword rankings across tracked storefronts.
Tracks App Store keyword rankings for owned and competitor apps, exposing positions, 7-day changes, full top-200 keyword boards, movers, opportunities, and collection status.
Queries the iTunes Search API for up to 200 App Store results per keyword and storefront, enabling ranking history and competitor movement analysis.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why
ASO tools charge per keyword and show you one position: yours. One App Store search already returns the whole top 200, so RankLens keeps all of it. From the same request you get:
Your position for every keyword in every storefront, with the 7-day change.
Every competitor in the top 200 and how they moved over 1, 7 and 30 days.
Opportunities: keywords where you sit outside the top 10 while competitors hold the top 5.
History you own, in your own D1 database.
Collection is slow and cheap by design: one Apple request per keyword × storefront per day, rate-limited by RPM (2 per minute by default).
Related MCP server: ASO Atlas MCP server
Deploy
You need a Cloudflare account, Node 24+ and pnpm.
git clone https://github.com/agentfirsthq/ranklens.git
cd ranklens
pnpm install
# 1. Create the database, then put its id into wrangler.jsonc → d1_databases[0].database_id
npx wrangler d1 create ranklens
# 2. Apply the schema
pnpm db:migrate:remote
# 3. Set the access token. It guards the dashboard, /api, /mcp and /admin.
npx wrangler secret put ADMIN_TOKEN
# 4. Point VITE_SITE_URL in apps/web/.env at your Worker URL (canonical and link previews)
# 5. Build the dashboard and deploy
pnpm build
pnpm run deployOpen the Worker URL and sign in with the token. The cron starts collecting on its own.
Add apps and keywords
Describe your apps in a JSON file (see config.example.json) and POST it:
{
"storefronts": ["US", "GB"],
"apps": [
{
"url": "https://apps.apple.com/us/app/your-app/id1234567890",
"storefronts": ["US", "GB", "CA"],
"keywords": [
"habit tracker",
"daily planner",
{ "term": "gewohnheitstracker", "storefronts": ["DE", "AT"] }
]
}
]
}curl -X POST https://<worker>.workers.dev/admin/seed \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d @config.jsonurlcan be any App Store link; theid…is extracted. The name is looked up from Apple when omitted.Storefronts are ISO country codes (
US,GB,DE,JP, …). On iOS, ranking is per storefront, not per language.The closest list wins: a keyword's own
storefronts, then the app's, then the top-level default. A keyword shared by two apps is fetched once per storefront.Seeding only adds. Rename, re-target and remove keywords in the dashboard's Keywords panel or through the endpoints below.
# Add keywords (lowercased; existing ones gain the storefronts)
curl -X POST https://<worker>.workers.dev/admin/apps/<appId>/keywords \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"terms":["mileage log","gps mileage"],"storefronts":["US","GB"]}'
# Set the exact storefronts, optionally renaming
curl -X PUT "https://<worker>.workers.dev/admin/apps/<appId>/keywords/mileage%20log" \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"term":"mileage logbook","storefronts":["US"]}'
# Stop tracking
curl -X DELETE "https://<worker>.workers.dev/admin/apps/<appId>/keywords/mileage%20log" \
-H "Authorization: Bearer $ADMIN_TOKEN"
# Collect now instead of waiting for cron (up to 20 pairs per call)
curl -X POST "https://<worker>.workers.dev/admin/collect?n=10" \
-H "Authorization: Bearer $ADMIN_TOKEN"
# → {"collected":10,"failed":0,"rateLimited":false}Rank history is attached to the keyword text: renaming starts a fresh history, deleting keeps the old one.
Dashboard
It answers one question: where do my apps rank today, and what moved this week?
KPIs compared with 7 days ago: keywords in the top 10, average position, keywords that moved, keywords ranked in the top 200.
Where you rank: position buckets (top 3, 4–10, 11–50, 51–200, not ranked). Click a bucket to filter the table.
Rankings and Opportunities tabs with filtering and sortable columns. Click a keyword to see its full top 200 and the week's movers.
Keywords panel: paste a list to add many keywords for chosen storefronts, click one to rename it or change its storefronts, delete with Undo.
Settings: theme, row density, visible storefronts.
Light and dark themes, works down to 375 px. Color means status only: green is top 10 or rising, red is falling.
Use it from your agent
RankLens is an MCP server at /mcp (Streamable HTTP, JSON-RPC over POST). Add it to Claude Code:
claude mcp add --transport http ranklens https://<worker>.workers.dev/mcp \
--header "Authorization: Bearer $ADMIN_TOKEN"Tool | Returns |
| tracked apps and keyword counts |
| positions, 7-day change, apps above you |
| the full top 200 for a keyword, with changes |
| biggest risers and fallers over N days |
| keywords where you are outside the top N while competitors hold the top 5 |
| total, complete and pending pairs for a day |
All tools are read-only. Then ask things like "which keywords did we lose in GB this week, and who took them?"
REST API
Every endpoint needs Authorization: Bearer $ADMIN_TOKEN.
Endpoint | Returns |
| tracked apps with per-storefront keyword counts |
| positions and 7-day change |
| tracked keywords and their storefronts |
| a Markdown report |
| the full top 200 |
| risers and fallers |
| keywords worth pushing |
| today's collection progress |
How it works
Cron (every minute) ──► Durable Object "Collector" (pinned to eeur)
│ RPM requests per tick
▼
itunes.apple.com/search?term=<kw>&country=<cc>&entity=software&limit=200
│
▼
D1: one snapshot = up to 200 positions
│
┌────────────────┼────────────────┐
▼ ▼ ▼
Dashboard REST /api MCP /mcpApple rate limits. iTunes Search answers most Cloudflare locations with 429, so fetching runs in one Durable Object pinned to
eeur. A 429 ends the tick without spending the pair's retries. If 429s come back (wrangler tailshowsiTunes search 429), change the location hint and the object name inapps/worker/src/collector.tstogether.Storage. About 1,500 pairs a day is ~300k rows/day. Daily detail is kept for 90 days, then only Mondays;
RETENTION_DAYSis the hard limit.Throughput. Requests per day equal the number of unique keyword × storefront pairs.
RPM=2gives ~2,880 a day; raise it gradually, up to about 20.Security. One token guards reads and writes and is compared in constant time. Only
/healthand the static dashboard shell are public. The dashboard ships a strict CSP and refuses to be framed. Rotate the token withnpx wrangler secret put ADMIN_TOKEN.
Try the demo
demo/ is a static build of the same dashboard with generated data. No install, no Cloudflare:
cd demo
python3 -m http.server 5182
# → http://localhost:5182 (?theme=light or ?theme=dark)Rebuild it after changing the UI: pnpm --filter @ranklens/web build:demo.
Develop locally
# terminal 1: Worker + local D1 on :8787
pnpm db:migrate
npx wrangler dev --test-scheduled --var ADMIN_TOKEN:dev
# terminal 2: Vite on :5182, proxying /api, /admin and /mcp to :8787
pnpm devFire one collection tick without waiting for cron (each tick makes RPM Apple requests):
curl "http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*"/__scheduled does not work here: the SPA fallback answers it before the Worker does.
Project layout
ranklens/
wrangler.jsonc Worker, D1, Durable Object, static assets, cron
shared/api.ts types shared by the Worker and the dashboard
apps/worker/
migrations/ D1 schema
src/index.ts Hono routes and auth
src/collector.ts Durable Object that fetches from Apple
src/db.ts queries, seeding, keyword editing
src/mcp.ts MCP server
apps/web/ Vite + React 19 + Tailwind v4 + shadcn/ui dashboard
demo/ static demo buildLimits
iOS only. Google Play needs a proxy or a third-party API and is not included.
Apple returns at most 200 results, so anything below 200 reads as "not ranked".
Positions come from the public iTunes Search API. They track the App Store's search order closely but are not Apple's official ranking data.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Access to your Apple App Store and Google Play Store rankings, competitors and chart moves.
Your App Store keyword ranks, rank history, reviews and alerts, plus listing checks. Works on Free.
Keyword, SERP and backlink data: search volume, live Google results, rank checks, Trends. Read-only.
App Store and Google Play keyword ranks, keyword research and competitors for your apps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables read-only interaction with App Store Connect via MCP tools, including listing apps, versions, builds, and review submissions, with compliance boundaries and no write operations by default.MIT

ASO Atlas MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to research App Store keywords with popularity and difficulty scores, track daily rankings across 59 storefronts, find competitor keyword gaps, optimize metadata, and review App Store Connect performance. Read tools only inspect the signed-in account, while write tools manage tracked apps, keywords, competitors, and saved lists mid-conversation.MIT- AlicenseNot gradedqualityCmaintenanceEnables AI clients to query live App Store and Google Play keyword rankings, review rank history and daily/weekly reports, research keyword popularity and difficulty by country, and inspect or track competitors' keywords in natural language. It also allows adding apps and tracking or untracking up to 200 keywords per app and country, with read-only and write operations governed by license role and plan limits.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search and inspect iOS apps, view chart rankings, version history, in-app events, ads, and publisher portfolios, analyze creative changes and rank effects, access Google Play data, and manage ASO keyword tracking from MCP clients.MIT