stackhint

io.github.Protemir由 GitHub 帳號 Protemir 發布v0.2.1更新於 Oct 27, 2026

Recommends MCP servers, plugins and skills for a repo, from what is actually in it.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

唯讀的本機 MCP 伺服器,會檢視程式碼倉庫並推薦真正需要的 MCP 伺服器、外掛與技能,並附上檔案依據。

可以做什麼
  • 依偵測到的技術棧、任務與現有設定,為專案推薦工具並排序
  • 解釋某個工具項目:為何適合、可存取什麼、如何設定以及會寫入的確切設定
  • 搜尋本機工具登錄檔,並回報哪些工具已設定、已停用或缺少
  • 產生安裝計畫,只顯示變更與指令,不會實際執行
適用情境
想知道某個特定倉庫值得加入哪些 MCP 伺服器或外掛,或檢查 Claude Code、Codex 中已設定的工具是否過時、重複時適用。適合希望取得確定性、本機化建議而非通用排行榜的人。
執行需求
以本機 stdio 程序執行,需要 Node.js 20 或更新版本,無執行期相依套件。可透過 Claude Desktop 的 .mcpb 擴充功能、從 GitHub 以 npx 執行,或作為 Claude Code/Codex 外掛安裝。未宣告驗證或環境變數;請求推薦時需傳入專案資料夾路徑。
安裝前請注意
此 MCP 伺服器為唯讀,無法安裝任何東西;安裝只能透過另外的 CLI 進行,它會顯示差異、要求確認、備份並支援回復。它會讀取專案清單、CI 與基礎設施檔案、.env.example 的鍵名、README 連結與本機 git log,以及 Claude Code 與 Codex 設定;據稱密鑰與連線字串會被遮蔽。預設不連網,遠端登錄檔搜尋需手動開啟。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 stackhint,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

stackhint

[ci] [release] [license: MIT]

Which MCP servers, plugins and skills does your repo actually need? stackhint looks at the project and at what Claude Code and Codex already have set up, then tells you, pointing at the file that made it think so. It can also add a server for you, after showing the exact change.

It runs locally, has no dependencies and sends nothing anywhere.

Try it in any project (Node.js 20+, nothing to install):

bash
npx -y github:Protemir/stackhint recommend

Or add it to Claude Code and ask "which MCP servers would help here?":

/plugin marketplace add Protemir/stackhint/plugin install stackhint@stackhint

[stackhint recommend on a sample .NET project: Postgres MCP Pro because of Npgsql and 9 migrations, Microsoft Learn because of the ASP.NET Core project, Atlassian Rovo because the README links to Jira]

That is the real output on examples/dotnet-shop, a small ASP.NET Core API (npm run demo reproduces it). Every line in "Why now" points at a file; a README that only says "we might try Kubernetes one day" gets no Kubernetes suggestion.

What it reads: manifests (*.csproj, package.json, pyproject.toml, go.mod, Cargo.toml, Gradle, Composer, Gemfile), compose files, Kubernetes and Terraform files, CI, .env.example key names, README links and git history, plus your Claude Code and Codex configs. It knows 143 tools (MCP servers, plugins, skills, CLIs), checked by hand against the vendors' docs, including the retired ones, so stackhint check can tell you what to replace.

Why I built it

There are thousands of MCP servers, and a good share of the "top 10" lists still point at servers that were archived in 2025. The reference Postgres server, for example, has a known read-only bypass and no fixes. I wanted something that looks at my repo, knows what I already have configured in Claude Code and Codex, and tells me what is worth adding and what to replace, without sending my code anywhere and without touching my config behind my back.

How it compares to what exists:

  • Anthropic's claude-code-setup plugin has Claude itself look at the codebase and suggest automations. It is good, but it works only in Claude Code, costs tokens on every run, doesn't check what you already have, and doesn't install anything.
  • MCP Advisor and MCP Compass search MCP directories from a natural-language query. They don't look at your project.
  • stackhint is deterministic and local. It covers Claude Code and Codex, knows your existing setup, keeps a hand-checked registry with exact install commands and read-only defaults, and handles installs with a diff, a backup and a rollback.

Install

stackhint needs Node.js 20 or newer. It has no runtime dependencies.

Run it without installing (downloads from GitHub):

bash
npx -y github:Protemir/stackhint recommend

Or install the command globally:

bash
npm install -g github:Protemir/stackhint

Claude Code

The plugin adds a stackhint skill, so Claude can answer "which MCP servers would help here?", and a quiet session-start hint (see Proactive mode).

/plugin marketplace add Protemir/stackhint/plugin install stackhint@stackhint

From a shell: claude plugin marketplace add Protemir/stackhint and then claude plugin install stackhint@stackhint.

Codex

Codex reads the same repository as a plugin marketplace:

bash
codex plugin marketplace add Protemir/stackhint

Then install stackhint from /plugins. Codex asks you to approve plugin hooks in /hooks before they run.

Claude Desktop

Download stackhint-<version>.mcpb from the latest release and open it: Claude Desktop installs it as an extension. Pass the project folder as path when you ask for recommendations. The same server is in the official MCP Registry as io.github.Protemir/stackhint.

Without plugins: MCP server

stackhint can also run as a read-only MCP server with five tools (recommend_tools, explain_tool, search_tools, tooling_status, plan_install). It can never install anything; plan_install only shows the plan and the command for you to run.

bash
stackhint setup claude   # or: stackhint setup codex

setup shows what it will add (an MCP server entry and the skill file) and asks first. To do it by hand:

bash
claude mcp add --scope user stackhint -- npx -y github:Protemir/stackhint mcpcodex mcp add stackhint -- npx -y github:Protemir/stackhint mcp

Commands

CommandWhat it does
stackhint scan [path]Shows what it detected and the evidence for each signal
stackhint recommend [path]Ranked suggestions. --task "..." for task-specific advice, --host claude|codex, --all
stackhint explain <id>Why, what it can access, setup, the exact JSON/TOML it would add, and the vendor's own command
stackhint install <id> --host <h>Shows the plan and diff, asks, then applies. --dry-run, --scope user|project|local, --access read|write, --param k=v
stackhint try <id> --host <h>Starts a server for one session without changing any config
stackhint statusWhat is configured for Claude Code and Codex
stackhint checkReviews it: archived servers, secrets written into config, write access where read-only exists, duplicates. --strict exits 1 on problems (useful in CI)
stackhint registry search <words>Searches the local registry. --remote also queries the official MCP Registry (opt-in)
stackhint dismiss <id>Never suggest again. --for 14d to snooze, --project for this repo only
stackhint rollback [id]Lists installs made by stackhint, or undoes one
stackhint config ...show, get <key>, set <key> <value>
stackhint doctorChecks Node, config files, host CLIs and common problems
stackhint mcpRuns the read-only MCP server over stdio

Every command takes --format text|md|json. Exit codes: 0 ok, 1 error, 2 usage error, 3 not approved, 4 blocked.

What it looks at

  • Package manifests: *.csproj, Directory.Packages.props, package.json, requirements*.txt (also requirements/ folders and UTF-16 files), pyproject.toml (Poetry, uv, PDM), Pipfile, go.mod (direct requirements only), Cargo.toml, pom.xml, build.gradle(.kts), Gradle version catalogs, composer.json, Gemfile, pubspec.yaml, Prisma schemas.
  • Infrastructure: Dockerfiles, compose files (service images like postgres:17), Kubernetes manifests, Helm charts, Argo CD and Flux objects, Terraform providers, Pulumi, Bicep, CDK, and the configs of Wrangler, Vercel, Netlify, Fly.io, Render, Railway, Heroku, DigitalOcean, Firebase and Supabase.
  • Frameworks and engines: Angular, Svelte, Nuxt, Astro, Next.js, Expo, Flutter, Shopify apps and themes, Laravel, Storybook, Nx, shadcn/ui, Xcode, Unity, Unreal, browser extensions, browser games (three.js, Phaser, Pixi) and plain pages with scripts.
  • CI: GitHub Actions, GitLab CI, Azure Pipelines, CircleCI, Jenkins, Buildkite, Bitbucket.
  • APIs and tests: OpenAPI files, .http files, Postman collections, protobuf, GraphQL, Playwright/Cypress/Jest/Vitest/pytest configs.
  • Settings files: appsettings*.json connection strings and .env.example key names, only to learn which database or service is used. Values are never stored or printed.
  • Links in README/CONTRIBUTING: Jira, Confluence, Linear, Asana, monday.com, ClickUp, Figma, Notion.
  • Git: remote hosts, branch names, recent commit subjects (local git log). Issue keys like SHOP-123 suggest Jira; 8+ commits with the same shape ("add migration ...") suggest a skill.
  • MCP servers your team already configured for VS Code or Cursor (.vscode/mcp.json, .cursor/mcp.json).
  • Your task, if you pass one. English and Russian keywords both work.

A project that merely mentions a technology in prose does not get a recommendation for it. Signals carry a strength, and most entries need concrete evidence (requiresAny).

How ranking works

Each registry entry lists the signals that make it relevant, with a weight. The score is:

fit   = relevance × (0.55 + 0.25 × value + 0.2 × immediacy) × compatibility × overlapscore = 100 × (fit − setup cost − risk), clamped to 0..100
  • relevance combines matching signals (noisy-OR of weight × strength);
  • value comes from the registry's estimate of time saved and how often you'd use it;
  • immediacy is higher when the evidence comes from your task;
  • overlap goes down when an equivalent tool is already set up (a CLI like gh counts partially);
  • setup cost covers effort, auth and missing prerequisites; risk covers write/admin access, community or preview status and incomplete metadata.

These numbers are editorial estimates, not measurements, and stackhint says so in its output. Confidence (high/medium/low) reflects how strong the evidence is and whether compatibility and metadata are verified. stackhint explain <id> prints the full breakdown.

What it knows about your setup

Claude Code: ~/.claude.json (user scope and per-project local scope), the project .mcp.json, approvals in .claude/settings*.json, enabled plugins and the MCP servers they bundle, skills and commands, and an admin-managed managed-mcp.json.

Codex: ~/.codex/config.toml (or $CODEX_HOME), a trusted project's .codex/config.toml, enabled plugins, and skills in ~/.agents/skills, .agents/skills and ~/.codex/skills.

It reports each tool as configured, disabled, not configured, incompatible or unknown (for example when a config file can't be parsed). "Configured" means it is in the config. stackhint does not claim a server is running unless you ask it to verify with the host's CLI (install --verify).

Installing safely

Installing changes your configuration, so stackhint follows the same steps every time:

  1. It builds a plan: the official source, the scope, the exact diff or command, permissions, auth, network access, required environment variables (by name only) and side effects.
  2. It asks. Without a terminal it refuses unless you pass --yes. --dry-run never asks and never writes.
  3. Before writing, it checks the file hasn't changed since the plan was made, and saves a backup.
  4. It writes atomically, then parses the result back and checks the new server is there. If anything is off, the original is restored.
  5. For Codex it can confirm with codex mcp get. For Claude Code, --verify runs claude mcp get.
  6. It prints the undo command. stackhint rollback <id> restores the file byte-for-byte, or runs claude mcp remove. If you edited the file after the install, rollback refuses unless you pass --force.

Where it writes:

HostScopeHow
Claude Codeprojectmerges into .mcp.json (usually committed; Claude asks each person to approve it)
Claude Codelocal (default), userruns claude mcp add, because ~/.claude.json is rewritten by Claude Code all the time
Codexuser (default)appends one [mcp_servers.<name>] table to ~/.codex/config.toml, leaving the rest byte-for-byte
Codexprojectappends to .codex/config.toml (Codex reads it only in trusted projects)

Rules it follows:

  • Read-only variants are the default where the vendor offers one (X-MCP-Readonly for GitHub, --access-mode=restricted for Postgres MCP Pro, --read-only for Kubernetes, read_only=true for Supabase, and so on). Use --access write to opt out.
  • Secrets are referenced by environment variable name only: ${VAR} in Claude Code configs, bearer_token_env_var and env_vars in Codex. stackhint never asks for a token and never writes one.
  • Package versions are pinned where they could be checked (for example [email protected]).
  • It never runs remote scripts, never installs packages and never changes anything else. Plugins, skills and CLIs are shown as steps (Claude Code plugins can be installed through claude plugin install after you confirm).
  • On native Windows, npx servers are wrapped in cmd /c, as both clients require.
  • It won't install archived or deprecated entries, won't overwrite a server with the same name, and won't touch Claude Code when an admin-managed MCP config is active.

Proactive hints

The plugin installs two hooks. What they do depends on mode:

ModeSession startEach prompt
manualnothingnothing
balanced (default)up to 2 high-confidence suggestions, at most once a day per projectnothing
proactiveup to 3 suggestions plus a one-line visible noticeif the prompt starts a new kind of task (a PR review, a slow query) and a missing tool fits, one suggestion

Suggestions go into the agent's context, with the instruction to mention them only when relevant and never to install anything itself. The same item is not repeated for 14 days, dismissed items never come back, and a new dependency in the project can break through the daily limit. The prompt hook keeps the prompt in memory only; it is never written anywhere.

bash
stackhint config set mode manual       # turn hints offstackhint config set mode proactive    # more hints

Limitations, honestly:

  • Neither client has a background notification API, so "proactive" means session-start and prompt hooks. There is no file watcher.
  • Hook suggestions reach the model, not you directly (except the one-line notice in proactive mode). Whether it mentions them depends on the conversation.
  • Codex requires you to approve hooks in /hooks before they run.

Privacy

  • Only files that a detector needs are read, with size limits and a time budget. .env, .env.local, private keys, secrets.json and appsettings.*secret* are never opened.
  • Connection strings, tokens and URLs with credentials are never stored or printed; evidence names the file and the kind of finding, not the value. All output, the audit log and errors pass through redaction.
  • No network access by default. registry search --remote queries the official MCP Registry only after stackhint config set network true, and caches results for 24 hours.
  • git log runs locally to read commit subjects. Turn it off with stackhint config set gitHistory false.
  • State lives in ~/.stackhint (or $STACKHINT_HOME): config.json, state.json (dismissals and cooldowns, keyed by a hash of the project path), audit.log, backups/.

The registry

registry/registry.json has 143 entries: 120 recommendable tools (89 MCP servers, 28 plugins, 2 CLIs, 1 skill) and 23 deprecated or archived ones that stackhint detects in your config so it can suggest the replacement. Every URL, package name, flag and plugin id was checked against the vendor's repository or docs on the date in verifiedAt (October 2026). Effort, time saved and frequency are my estimates.

It covers source control (GitHub, GitLab, Azure DevOps), issue trackers (Jira/Confluence, Linear), databases (Postgres, MySQL, SQL Server, ClickHouse, MongoDB, Redis, Supabase, Neon, Firebase), containers and infrastructure (Kubernetes, Docker, Terraform, Argo CD, Flux), clouds (AWS, Azure, Google Cloud, Cloudflare, Vercel), docs (Context7, Microsoft Learn, DeepWiki), CI (CircleCI, Buildkite, Jenkins), quality (SonarQube, Semgrep, Snyk), observability (Sentry, Grafana), design (Figma), payments (Stripe), browser testing (Playwright, Chrome DevTools), Claude Code LSP and review plugins, and project skills for repeated workflows.

Adding your own tools

Put a JSON file in ~/.stackhint/registry.d/ (or point STACKHINT_REGISTRY at one). Custom entries are validated just like built-in ones, are always treated as community-maintained, and can override a built-in entry with the same id.

json
{  "entries": [    {      "id": "team-db",      "name": "Our analytics DB server",      "kind": "mcp",      "category": "database",      "description": "Read-only access to the analytics warehouse.",      "docs": "https://wiki.example.com/mcp/analytics",      "status": "active",      "triggers": [{ "signal": "db:clickhouse", "weight": 0.8 }, { "signal": "task:db", "weight": 0.6 }],      "requiresAny": ["db:clickhouse"],      "problem": "Analysts paste query results into the chat by hand.",      "workflow": "Ask the agent to check yesterday's event counts.",      "benefits": ["Schema and SELECT queries"],      "access": { "level": "read", "summary": "SELECT only", "readOnlyAvailable": true },      "auth": { "type": "oauth", "detail": "Company SSO" },      "hosts": { "claude": { "support": "yes" }, "codex": { "support": "yes" } },      "install": { "serverName": "analytics", "readOnly": { "transport": "http", "url": "https://mcp.example.com/analytics" } },      "match": { "urls": ["mcp.example.com/analytics"] }    }  ]}

Validation rejects entries that could be abused: shell metacharacters or quotes in arguments, interpreters and downloaders as commands (bash, curl, powershell, node...), privileged Docker flags and host mounts, plain-HTTP URLs (except localhost), literal secrets in headers, env or arguments, and text that tries to instruct the agent ("ignore previous instructions", fake </system> tags). Missing metadata is filled with cautious defaults (unknown access is treated as write) and lowers confidence.

stackhint scan shows the signal ids found in a project; the full set the analyzer can produce lives in src/context/ (packages.ts, analyzer.ts, task.ts). To add a built-in tool, open a pull request with the entry plus the sources you checked; npm test verifies that every trigger is a signal the analyzer emits, that install specs render valid JSON and TOML for both hosts, and that plugin ids exist in the official marketplace.

Configuration

stackhint config show prints the current values. Keys:

KeyDefaultMeaning
modebalancedmanual, balanced or proactive (see above)
minScore30lowest score recommend shows
hookMinScore.balanced / .proactive50 / 40lowest score for hook suggestions
hookMaxItems.balanced / .proactive2 / 3suggestions per hook run
itemCooldownDays14don't repeat the same suggestion sooner
projectCooldownHours24at most one session-start batch per project in this window
networkfalseallow registry search --remote
gitHistorytrueread recent commit subjects with git log

Environment variables: STACKHINT_HOME (state folder), STACKHINT_REGISTRY (extra registry files, separated by your OS path delimiter), CLAUDE_CONFIG_DIR and CODEX_HOME (respected like the clients do), NO_COLOR.

Architecture

src/  context/    project analyzer: file walk with budgets, manifest parsers, git, task keywords -> signals  registry/   registry loading and validation, search, opt-in official MCP Registry client  hosts/      read-only adapters: Claude Code and Codex configs, plugins, skills, PATH -> inventory  engine/     ranking (recommend.ts) and configuration review (check.ts); pure functions  install/    spec resolution, planning, applying with backup/validation, rollback  hooks/      SessionStart and UserPromptSubmit hooks  mcp/        minimal stdio MCP server (read-only tools)  render/     text, Markdown and JSON output  state/      config, dismissals, cooldowns, audit log  cli.ts, commands.ts

The engine knows nothing about host config formats; adapters turn configs into a common inventory and the install module turns a registry spec into Claude JSON or Codex TOML. TypeScript is compiled by stripping types with Node's built-in stripper (scripts/build.mjs), so there are no runtime or build dependencies; CI checks that the committed dist/ matches the sources.

Development

bash
npm install          # TypeScript and @types/node, for type checking onlynpm run typechecknpm run lintnpm test             # 300+ tests: node --test on the TypeScript sources (Node 22.18+)npm run build        # writes dist/npm run test:dist    # smoke tests on the built JavaScript (works on Node 20)

The tests run in throwaway sandboxes (fake home, Claude and Codex config dirs) and cover detection, ranking, duplicate detection, config merging, approval enforcement, dry runs, rollback, redaction, malicious registry entries, network failures, hooks and the MCP protocol. CI also runs the real claude and codex CLIs against configs written by stackhint (tests/host-real.test.ts).

Troubleshooting

  • "No terminal to confirm in": you ran install from a script or an agent. Run it in a terminal, or pass --yes once you've read the plan.
  • "Claude Code CLI not found on PATH": user and local scopes need claude. Use --scope project, or run the printed command yourself.
  • A server shows "Failed to connect": check that the environment variables listed in the plan are set in the shell that starts the client, and that npx/uvx/docker can download packages.
  • Codex ignores .codex/config.toml: Codex reads project config only in trusted projects.
  • Codex times out starting a server on first run: stackhint sets startup_timeout_sec = 60 for package-runner servers; raise it if downloads are slow.
  • Something looks wrong: stackhint doctor, then open an issue with the output of stackhint scan --format json (it contains no secrets, but read it before sharing).

Uninstall

  • Undo installs: stackhint rollback lists them; stackhint rollback <id> reverts one.
  • Claude Code plugin: /plugin uninstall stackhint@stackhint and /plugin marketplace remove stackhint.
  • Codex plugin: remove it in /plugins, then codex plugin marketplace remove stackhint.
  • MCP server registered by setup: claude mcp remove stackhint --scope user or delete [mcp_servers.stackhint] from ~/.codex/config.toml; the skill lives in ~/.claude/skills/stackhint or ~/.agents/skills/stackhint.
  • Global command: npm uninstall -g stackhint.
  • State: delete ~/.stackhint.

Limitations

  • The registry is curated by hand and checked in October 2026. Vendors change endpoints and flags; verifiedAt tells you how old a fact is, and check flags known deprecations.
  • Detection is heuristic. It reads the files that commonly reveal a stack; unusual layouts may be missed (stackhint scan shows what it found).
  • Scores are estimates. They are useful for ordering, not as a measure of time saved.
  • stackhint does not install packages, plugins or CLIs itself (Claude Code plugins go through claude plugin install after you confirm).
  • Codex support was verified against the docs and the Codex CLI in CI; I use Claude Code daily on Windows, so that path has had more real use.

License

MIT. If stackhint saved you some time, a star on GitHub helps other people find it.

來源:README.md,提交 54f2b66

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v0.2.1最新Oct 21, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分