github-stars-mcp
An MCP server that caches your GitHub starred repositories in a local SQLite database and lets you search, list, and retrieve details about them through any MCP client (Claude Desktop, Cursor, VS Code, etc.), with automatic freshness checks via GitHub's ETag mechanism.
README
github-stars-mcp
Your GitHub starred repos ("favorites") in a local SQLite cache, served over Model Context Protocol — so you can search and list your stars from Claude Desktop, Kimi Code, Cursor, VS Code, or any other MCP client, with your own GitHub account.
GitHub API (GET /user/starred, paginated)
│ ETag check on every use; full sync when changed
▼
SQLite ~/.github-stars-mcp/stars.db ──► MCP server (stdio) ──► your MCP client
Features
- Zero-config freshness: every query checks GitHub with a conditional request
(ETag). A
304 Not Modifiedcosts no rate-limit quota; a200triggers a full sync before answering. - Instant, offline-friendly reads from a local SQLite cache.
- No native dependencies — uses Node's built-in
node:sqlite. - Your token never leaves your machine: plain env var, local
.env, or your logged-inghCLI.
Requirements
- Node.js ≥ 22.5 (for the built-in SQLite module)
- A way to authenticate with GitHub (any one of):
GITHUB_TOKENenv var — a personal access token (fine-grained tokens need no special scopes for public stars; classic tokens needread:user)~/.github-stars-mcp/.envwithGITHUB_TOKEN=...- the GitHub CLI logged in (
gh auth login) — used automatically as a fallback
Quick start (npx — straight from GitHub)
No npm account or registry needed; npx installs and builds straight from this repo (the first run takes ~30s because it compiles TypeScript; after that it runs from cache).
Prime the local cache (first sync):
npx -y github:ENFernandes/github-stars-mcp sync
Then add the server to your MCP client (see configs below):
{
"mcpServers": {
"github-stars": {
"command": "npx",
"args": ["-y", "github:ENFernandes/github-stars-mcp"]
}
}
}
If you authenticate via option 1, pass the token through the client config:
{
"mcpServers": {
"github-stars": {
"command": "npx",
"args": ["-y", "github:ENFernandes/github-stars-mcp"],
"env": { "GITHUB_TOKEN": "ghp_..." }
}
}
}
To pin a specific release instead of tracking the default branch, append a tag:
github:ENFernandes/github-stars-mcp#v0.1.0.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows) — use the JSON block above.
Kimi Code
~/.kimi-code/mcp.json (user level) or .kimi-code/mcp.json (project level) —
same block as above. Then /mcp in the TUI to verify.
Cursor
Settings → MCP → add server, or edit ~/.cursor/mcp.json — same block as above.
VS Code
.vscode/mcp.json in your workspace (or user settings) uses a servers key:
{
"servers": {
"github-stars": {
"command": "npx",
"args": ["-y", "github-stars-mcp"]
}
}
}
Other clients
Any client that supports MCP stdio servers works: point it at
npx -y github:ENFernandes/github-stars-mcp (the serve subcommand is the default).
Install from source
git clone https://github.com/ENFernandes/github-stars-mcp.git
cd github-stars-mcp
npm install
npm run sync # builds and primes the cache
Then register the absolute path instead of npx:
{
"mcpServers": {
"github-stars": {
"command": "node",
"args": ["/absolute/path/to/github-stars-mcp/dist/server.js"]
}
}
}
MCP tools
| Tool | Description |
|---|---|
search_stars |
Keyword search over name, description, and topics; optional language filter |
list_stars |
List stars with language filter, sort (recent / stars / name), pagination |
get_star |
Full details for one repo by owner/name |
refresh_stars |
Force a full re-fetch from the GitHub API (rarely needed — see below) |
stars_status |
Show cache size and last check / last sync timestamps |
How freshness works
Every use of a read tool (search_stars, list_stars, get_star) first asks
GitHub "did my starred list change?" with a conditional request
(If-None-Match + the ETag stored from the last sync):
- 304 Not Modified → the query is answered from the local DB. The check costs one lightweight request that does not count against the rate limit.
- 200 OK → something changed; the server runs a full sync before answering. The check's response is page 1 of the sync, so no request is wasted.
Checks are throttled to at most one per minute, and a failed check (offline, token issue) never blocks reads — you just get the cached data.
Note: the conditional check watches page 1 (100 most recent stars). Adding a
star is always detected; an unstar beyond the 100 most recent may only be
picked up by a later change or an explicit refresh_stars /
npx -y github:ENFernandes/github-stars-mcp sync.
Data and configuration locations
| What | Where | Override |
|---|---|---|
| SQLite cache | ~/.github-stars-mcp/stars.db |
GITHUB_STARS_DB env var |
Optional .env |
~/.github-stars-mcp/.env |
GITHUB_STARS_HOME env var |
Development
npm run build # type-check + compile to dist/
npm run smoke # end-to-end stdio test: lists tools, runs real queries
Search uses SQL LIKE, which is plenty fast for thousands of stars; FTS5 can
be added later if needed. node:sqlite is marked experimental by Node — it
prints a harmless warning on stderr and does not affect the MCP protocol.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。