fsastore-mcp

fsastore-mcp

Enables AI agents to search FSA-eligible products on fsastore.com, add them to cart, and place orders only after user confirmation.

Category
访问服务器

README

fsastore-mcp

An MCP server that lets an AI agent (Claude or Codex) search FSA‑eligible products on fsastore.com and add them to your shopping cart, then place the order only when you explicitly confirm the total.

  • Runs with one uvx command — no clone, no manual install.
  • No password is ever stored. You paste a short‑lived access token from your browser via a one‑click bookmarklet.
  • Search → cart is verified against the live store API.

1. Add it to your agent

You need uv installed (brew install uv). uvx then builds and runs the server straight from the repo.

This repo is private, so uvx clones it with your Git credentials. Run gh auth login (or have SSH set up) first. If you use SSH, swap the URL for git+ssh://git@github.com/darrengruber/fsastore-mcp.

Claude Code (CLI)

claude mcp add fsastore -- \
  uvx --from git+https://github.com/darrengruber/fsastore-mcp fsastore-mcp

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "fsastore": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/darrengruber/fsastore-mcp", "fsastore-mcp"]
    }
  }
}

OpenAI Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.fsastore]
command = "uvx"
args = ["--from", "git+https://github.com/darrengruber/fsastore-mcp", "fsastore-mcp"]

Restart the agent after editing config. To grab the latest code later, add --refresh to the uvx args (e.g. ["--refresh", "--from", "git+...", "fsastore-mcp"]).


2. Install the token bookmarklet (one minute, one time)

The store sits behind bot protection, so the server can't log in for you. Instead you hand it a fresh token with one click. Set this up once:

  1. Copy this entire line (it starts with javascript:):

    javascript:(function(){var m=document.cookie.match(/scapi_access_token=([^;]+)/);if(!m){alert('No token yet — open your Cart once, then click again.');return;}var t=decodeURIComponent(m[1]);navigator.clipboard.writeText(t).then(function(){alert('FSA token copied ('+t.length+' chars). Paste it to your agent.');},function(){window.prompt('Copy this token:',t);});})();
    
  2. Create a bookmark and paste that line as its URL:

    • Chrome / Edge: ⭐ in the address bar → Edit → set Name to FSA token and replace the URL with the copied line → Save. (Or: menu → Bookmarks → Bookmark Manager → ⋮ → Add new bookmark.)
    • Firefox: Bookmarks menu → Manage Bookmarks → right‑click a folder → Add Bookmark → Name FSA token, Location = the copied line.
    • Safari: add any bookmark, then Edit Bookmarks and paste the line as its address.

That's it — you now have an FSA token button.


3. Use it

  1. Log in at https://www.fsastore.com in your browser.

  2. Click your FSA token bookmark. It copies a token to your clipboard. (If it says "No token yet", open your Cart page once and click again.)

  3. In Claude/Codex, tell the agent to set the access token, and paste it:

    Use set_access_token with: eyJ... (your copied token)

  4. Now just ask, e.g.:

    Search fsastore for sunscreen and add two of the cheapest eligible one to my cart.

When the token expires (~30 min), any tool replies login_required — just click the bookmark and set_access_token again.

Tip: ask the agent to run auth_status. It reports whether your token is for your account or a Guest session. If it says Guest, log in first, then re‑run the bookmark — otherwise you'll be editing a guest cart.


Tools the agent can call

Tool Purpose
set_access_token Cache a token copied by the bookmarklet
auth_status Whether a valid token is cached, who it's for, time left
search_products Search; FSA‑eligible only by default, each tier‑labeled
add_to_cart Add a product (master products auto‑resolve to a buyable variant)
view_cart Show cart contents and total
get_checkout_summary Show the total to confirm
confirm_order Place the order — only if the live total matches the one you pass

The server never places an order except through confirm_order with a matching total.


Run it directly (optional)

# from a clone
uvx --from . fsastore-mcp
# or
uv run fsastore-mcp

Run as an HTTP server / container (optional)

For local use the stdio transport above is all you need. To run it persistently behind an MCP gateway, set FSASTORE_MCP_TRANSPORT=http (host/port via FSASTORE_MCP_HOST / FSASTORE_MCP_PORT). A Dockerfile is included:

docker build -t fsastore-mcp .
docker run --rm -p 9130:9130 -v fsastore-state:/state fsastore-mcp

State (the cached token, active basket id) lives in the process, so serve HTTP with a single replica. The token is written under XDG_STATE_HOME (/state in the image) — mount a writable volume there.

Develop

uv sync
uv run pytest        # tests
uv run ruff check .  # lint
uv run ty check src  # types

Design notes and decisions: CONTEXT.md and docs/adr/.

Status

Verified against the live store API: product search + FSA‑eligibility, cart reuse, master→variant resolution, add‑to‑cart. Checkout submission (confirm_order) is wired and gated but not yet exercised end‑to‑end — a saved shipping/payment method may need to be applied to the cart first. The Confirm Gate prevents accidental orders regardless.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选