Supstack

io.github.DrBaher由 GitHub 账号 DrBaher 发布v0.18.2更新于 Oct 27, 2026

Evidence-based supplement research, dosing, safety, and interactions as agent-callable tools.

已验证STDIO仅桌面位置与生活知识与记忆

概览

AI 生成的概览

Supstack 把循证补剂研究、剂量、安全性与相互作用查询作为 MCP 工具提供给 AI 助手,数据来自公开的 SupStack API。

可以做什么
  • 按名称或目标检索、研究补剂,并对两到三种补剂做对比
  • 查询研究文献、相互作用通路、补剂与药物相互作用以及术语释义
  • 管理本地补剂清单(含剂量、服用时间、品牌),并按目标覆盖度给出 A–F 评级
  • 导出清单;登录后还可获取个性化推荐、查看或设置健康档案、列出 N-of-1 实验、记录服用与依从性
适用场景
适合需要助手以证据回答补剂问题、在搭配补剂或药物前检查相互作用,或帮助维护并评估个人补剂清单与服用记录的场合。
运行要求
以本地 stdio 进程运行,来自 npm 包 @supstack/cli(或 Homebrew),通过 mcp 子命令启动。需要访问 SupStack API 的网络;匿名读取无需账号。账号相关工具需通过 login 设备码流程登录或提供 SUPSTACK_TOKEN。可选配置包括 SUPSTACK_API_KEY、SUPSTACK_API_URL 和 SUPSTACK_HOME。
安装前请注意
账号相关工具需要本地配置文件中保存的令牌;profile_set 与 track_log 会写入数据并被标记为非只读,stack push/sync 会把本地清单数据上传到账号。年龄、性别、体重等健康档案信息会发送到 SupStack API。匿名使用受每 IP 每分钟 60 次的速率限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Supstack,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@supstack/cli

Evidence-based supplement intelligence in your terminal — and an MCP server for AI agents.

A thin client over the public SupStack API. Read-only, no account required. One capability registry powers both the CLI and the MCP server.

Status: Phase 2 (accounts) in progress. All read commands below work, plus an MCP server and login/whoami. Install with npm install -g @supstack/cli.

Install

bash
# Homebrew (macOS / Linux)brew install drbaher/supstack/supstack
# or npmnpm install -g @supstack/cli
# or run without installingnpx -y @supstack/cli define adaptogen

Then enable shell completion: supstack completion install.

From source (in this directory): npm install && npm run build && node dist/index.js define adaptogen.

Usage

bash
supstack research magnesium --protocol       # full evidence summary for one supplementsupstack search --goal deep-sleep -n 5       # search by name or filtersupstack compare magnesium glycine           # 2–3 head-to-headsupstack studies "sleep" --type rct          # research librarysupstack interactions caffeine l-theanine --pathway   # interaction check (deep pair analysis)supstack interactions magnesium potassium --medication lisinopril   # supplement × drug checksupstack stack add magnesium --dose 400mg --timing bedtime   # local stack (+ dose/timing/brand)supstack stack sync                          # sync local ⇄ your account (login required)supstack goals --category sleep              # list goal ids (for rate/recommend)supstack rate --goals deep-sleep,sharpen-focus   # grade your stack A–F by goal coveragesupstack experiments start magnesium deep-sleep  # run an N-of-1 experiment (requires login)supstack export --format md                  # export your stacksupstack define bioavailability              # glossary lookupsupstack <command> --json                    # machine-readable output on any commandsupstack --help

Account (Phase 2)

bash
supstack login          # sign in via device-code flow (opens the browser to confirm)supstack whoami         # show the signed-in accountsupstack logout         # sign out and revoke this device's token

login shows a one-time code, opens https://supstack.me/activate, and finishes once you approve in the browser. The token lives in ~/.supstack/config.json (0600). Reads work fully anonymously — an account unlocks personalized features.

Once logged in, sync your stack with your account:

bash
supstack stack pull     # local ← your accountsupstack stack push     # local → your account (keeps dosage/timing/brand for kept items)supstack stack sync     # additive merge of both; preserves existing cloud metadata
supstack profile                              # view your health profilesupstack profile set --age 35 --sex male --weight 80 --weight-unit kgsupstack recommend                            # personalized picks from your goals + stacksupstack experiments list                     # your N-of-1 experiments + verdictssupstack track log                            # log today's stack as takensupstack track adherence                      # your adherence rate, streak, per-supplement

As an MCP server

bash
supstack mcp   # stdio MCP server exposing all capabilities as tools

This gives an agent the full SupStack toolset. Read-only (no account needed): supstack_research, supstack_search, supstack_compare, supstack_studies, supstack_interactions, supstack_stack, supstack_rate_stack, supstack_export, supstack_define.

Account-scoped tools are also exposed — supstack_recommend, supstack_profile_get / supstack_profile_set, supstack_experiments_list / supstack_experiments_get, supstack_track_log, supstack_track_adherence (plus cloud supstack_stack pull/push/sync). These require the user to be signed in (supstack login, or a SUPSTACK_TOKEN); without a token they return a clear "not logged in" error rather than failing. Mutating tools (profile_set, track_log) are flagged readOnlyHint: false for the agent.

Claude Code (one command):

bash
claude mcp add supstack -- supstack mcp

Claude Desktop — add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "supstack": {      "command": "supstack",      "args": ["mcp"]    }  }}

Or run it without a global install via "command": "npx", "args": ["-y", "@supstack/cli", "mcp"]. To use a local checkout, point at the built entrypoint — "command": "node", "args": ["/absolute/path/to/supstack-cli/dist/index.js", "mcp"] (run npm run build first).

Configuration

Env varDefaultPurpose
SUPSTACK_API_URLhttps://supstack.me/api/v1API base URL (override for local dev)
SUPSTACK_API_KEY—Optional API key (anonymous works at 60/min/IP)
SUPSTACK_CACHE_TTL3600Response cache TTL in seconds
SUPSTACK_NO_CACHE—Set to disable the response cache
SUPSTACK_TIMEOUT20Per-request timeout in seconds (or use --timeout)
SUPSTACK_HOME~/.supstackDirectory for config, stack, and cache
SUPSTACK_TOKEN—Override the stored account token (from supstack login)
SUPSTACK_NO_ANON_TOKEN—Disable auto-minting of the anonymous instant-token
SUPSTACK_NO_UPDATE_CHECK—Disable the "update available" notice (also honours NO_UPDATE_NOTIFIER)
NO_COLOR—Disable ANSI colour
FORCE_COLOR—Force ANSI colour on (even when piped)

Global flags available on any command: --json, --no-cache, --timeout <seconds>, --color / --no-color, -q, --quiet.

supstack auth set-key <key> persists a key to ~/.supstack/config.json (written 0600).

Response cache

Read-only API responses are cached under ~/.supstack/cache/ (1-hour TTL by default) to keep repeat lookups well under the 60/min rate limit. Bypass it per command with --no-cache, or manage it with supstack cache clear / supstack cache path. The cache is bounded (oldest entries pruned past a cap).

Shell completion

One-step install for your current shell (writes the script and wires your rc file idempotently; uninstall reverses it):

bash
supstack completion install      # detects bash | zsh | fish from $SHELL

…or generate the script yourself:

bash
supstack completion bash >> ~/.bashrcsupstack completion zsh  > "${fpath[1]}/_supstack"supstack completion fish > ~/.config/fish/completions/supstack.fish

Completions are dynamic — the script forwards what you've typed to supstack __complete, which offers the right thing for the position:

  • top-level commands and sub-actions (stack <TAB> → add remove list pull push sync)
  • supplement slugs where a slug is expected (research <TAB>, compare a <TAB>, stack add <TAB>, track log <TAB>)
  • goal ids after search --goal <TAB>

Slug/goal lists are fetched once from the API and cached under ~/.supstack/completion/ (24-hour TTL). Pre-warm or refresh them with:

bash
supstack completion refresh

Exit codes

Commands exit with a semantic code so scripts and MCP wrappers can branch on the kind of failure:

CodeMeaning
0Success
1Generic error (incl. 5xx)
2Auth required/rejected (not logged in, 401, 403)
3Not found (404)
4Rate limited (429)
5Network failure / timeout
6Invalid input (bad/missing args or flags, unknown command, schema validation, 400/422)

Develop

bash
npm test            # unit tests (mocked fetch)npm run type-check  # tsc --noEmitnpm run build       # tsup → dist/

See CLAUDE.md for the capability pattern and how to add a command.

License

MIT

来源:README.md,提交 03d5516

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.18.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分