
Apple Stocks Mcp
io.github.helderpgoncalves由 GitHub 账号 helderpgoncalves 发布v1.1.5更新于 Nov 3, 2026
Reads your macOS Apple Stocks watchlist, quotes and fundamentals locally. Read-only, no network.
概览
仅限 macOS 的本地 MCP 服务器,让助手读取 Apple 股市 App 的自选列表、缓存报价、基本面与盘中图表。
- 可以做什么
- 列出并搜索自选列表,获取单个、多个或全部自选股的缓存报价
- 读取基本面:当日与 52 周区间、市值、成交量、市盈率、每股收益、贝塔、股息率
- 以 ASCII 迷你图展示缓存的盘中 OHLCV 及相对前收盘的涨跌
- 汇总整个自选列表:涨跌家数、涨幅与跌幅前列、按币种和交易所分布
- 诊断环境问题,并在股市 App 中打开某只股票以便你自行添加
- 以资源形式提供自选列表与报价,并提供组合分析和个股研究提示词
- 适用场景
- 适合在 macOS 股市 App 中维护自选列表、希望助手总结组合、比较涨跌或解读基本面且不需要联网的场景。仅适用于 Mac,且不是实时行情来源。
- 运行要求
- macOS,且股市 App 至少打开过一次;Node.js 18 或更高版本;系统自带的 sqlite3。较新的 macOS 版本中,终端或 MCP 客户端可能需要在系统设置中授予“完全磁盘访问权限”才能读取股市 App 的容器。
安装
在 SourceWeft 中
- 打开 控制台中的 Apple Stocks Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🍎 apple-stocks-mcp
[CI] [npm version] [npm downloads] [MCP Registry] [platform: macOS] [Node.js] [License: MIT]
A macOS-only Model Context Protocol (MCP) server that lets an AI assistant read your own data from the Stocks app that ships with macOS — your watchlist, and the quotes, fundamentals and intraday charts the app has already cached on your Mac.
100% local and read-only. It reads files that already exist on your own machine, in the Stocks app's container under your home folder. It makes no network requests, uses no external API, needs no API keys, and sends nothing anywhere. The data is whatever the Stocks app last synced — open the app to refresh it.
⚠️ macOS only. The data lives inside the macOS Stocks app's container, so this server does not work on Linux or Windows. On a non-macOS host the server still starts, but exposes a single
platform_infotool that politely explains it's macOS-only and how to remove it — no failing tools, no crashes.
Quick start (30 seconds)
On a Mac, open the Stocks app once (so its data exists), then:
Claude Desktop / any MCP client — add this and restart:
Claude Code:
Then ask: "What's the Apple stock doing today?" The first time, your client
asks permission to use the tool — choose Yes (or "Yes, and don't ask again").
That's it. If anything's off, ask it to run stocks_doctor — it tells you
exactly what to fix.
Contents
- What you can ask
- Privacy
- Where the data comes from
- Tools · Resources · Prompts
- Example output
- Requirements
- Setup
- FAQ & troubleshooting
- Development & testing
- Legal
What you can ask
Once connected (see Setup), ask your assistant things like:
- "What's in my stock watchlist?"
- "What's the Apple stock doing today?"
- "Show me the fundamentals for NVDA."
- "Which of my stocks are up the most today?"
- "Summarize my whole watchlist."
Privacy
This is the most important section, so it's first.
- Read-only. The server never modifies, deletes, or writes to the Stocks
app's data. It opens the SQLite caches with sqlite3's
-readonlyflag and only parses the watchlist file. The single write-style action,add_stock, does not touch any file — it just asks macOS to open a symbol in the Stocks app so you can add it with a tap. - Local only. Every byte read stays on your machine and is only returned to
the MCP client you connected (e.g. your local AI assistant). There are no
outbound network connections in this server's code — you can verify this:
there is no
fetch/http/httpsclient call anywhere insrc/. - Your own data. It reads only files owned by your user account, in your home
folder (
~/Library/Group Containers/group.com.apple.stocks/). It does not access other users' data, remote accounts, or anything outside that container. - No telemetry, no analytics, no tracking. None. Ever. The only thing ever
written outside the tool results is a one-line startup message to
stderr(which platform it started on) — that goes to your MCP client's local logs and is never sent anywhere. - You stay in control of access. On recent macOS versions the app reading this data (your terminal or MCP client) must be granted Full Disk Access by you, in System Settings. Revoke it any time and the server can no longer read.
Where the data comes from
All paths are inside your own user container
~/Library/Group Containers/group.com.apple.stocks/:
This is the same "read the app's own local store" approach used by other macOS
MCP servers such as apple-notes-mcp.
It is reading your data from your Mac — analogous to exporting your own
information — and it does not bypass any DRM, access any account, or contact any
Apple service.
Tools
Resources
Prompts
Why add_stock opens the app instead of writing the database
The watchlist lives in an encrypted, iCloud-synced store. Editing it by hand
risks corrupting your watchlist and breaking sync, so add_stock deliberately
does not write anything — it uses the stocks:// URL scheme to open the
symbol in the Stocks app, where you add it with one tap and the app keeps its
own data consistent.
Example output
These are the actual text results the tools return (symbols shown are generic examples). Numbers come straight from your Stocks app's local cache.
apple_stock / stock_details AAPL — fundamentals at a glance:
stock_chart NVDA — intraday OHLCV as an ASCII sparkline:
portfolio_summary — whole-watchlist analysis:
get_quote ["AAPL","MSFT","BTC-USD","EGL.LS"] — one line per symbol, across
US / crypto / European tickers:
What each tool returns
Requirements
- macOS, with the Stocks app opened at least once (so its data exists).
- Node.js ≥ 18.
- The system
sqlite3at/usr/bin/sqlite3(ships with macOS). - On recent macOS versions, the MCP client (or your terminal) may need
Full Disk Access to read the Stocks container. If tools return a
"not found / unreadable" error, run the
stocks_doctortool, then grant Full Disk Access in System Settings → Privacy & Security → Full Disk Access.
Setup
Option A — npx (no install)
Add this to your MCP client config (e.g. Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json):
Option B — from source
Claude Code
Add it as an MCP server:
…or install it as a plugin (this repo is also a Claude Code plugin marketplace), which wires up the MCP server for you:
Restart the client after editing the config.
OpenAI Codex
This repo is also an OpenAI Codex plugin. Add the marketplace and install:
Or add it as a plain MCP server in your Codex config (command: npx,
args: ["-y", "apple-stocks-mcp"]).
Quick local test
The server speaks JSON-RPC over stdio:
Example output: AAPL (Apple Inc.): 299.18 USD +3.23 (+1.09%) [open]
If anything looks off, run the built-in diagnostics tool — ask your assistant to
run stocks_doctor, or:
FAQ & troubleshooting
The tools' error messages are self-explanatory and tell you exactly what to do,
so you rarely need this section. When in doubt, ask your assistant to run
stocks_doctor — it checks everything and prints the fix.
It asks for permission the first time. Is that normal?
Yes — that's Claude's standard safety prompt the first time any MCP tool runs. Choose Yes (or "Yes, and don't ask again" to skip it next time). It's not an error and nothing is sent anywhere.
A tool says the data is "not found" or "unreadable".
The message tells you which case it is. The two causes:
- The Stocks app has never run. Open the macOS Stocks app once so it creates its data, then try again.
- Full Disk Access. On recent macOS, the app running this server (your
terminal, or your MCP client) must be granted Full Disk Access:
- System Settings → Privacy & Security → Full Disk Access
- Turn it on for your terminal / MCP client (add it with + if missing)
- Fully quit and reopen that app, then try again
Run stocks_doctor to re-check.
First call times out or shows "failed to connect".
The very first run downloads the package via npx, which can take a moment. Just
try again, or raise the startup timeout: start your client with
MCP_TIMEOUT=60000 (milliseconds).
Why aren't the quotes real-time?
This server reads the Stocks app's local cache — the last data the app synced. It intentionally makes no network calls. To refresh, open the Stocks app (or its widget); the cache updates and the next tool call reflects it.
A symbol in my watchlist returns "Not in the Apple Stocks cache".
The app hadn't cached a quote for that exact symbol when you asked (some tickers, e.g. certain regional listings, aren't always cached). Open the Stocks app and view the symbol once, then retry. The watchlist still lists it; only its quote was missing.
Can it add a stock to my watchlist automatically?
add_stock opens the symbol in the Stocks app so you add it with one tap. It
deliberately does not write to the app's encrypted, iCloud-synced store —
that would risk corrupting your watchlist and sync. This is a safety decision.
Does it work on Linux or Windows?
No. The data lives in the macOS Stocks app's container, so the server is macOS-only. (The pure parsing logic is unit-tested on Linux CI using synthetic fixtures, but the real data only exists on macOS.)
Is any of my data sent anywhere?
No. There are zero network calls in the source — only local sqlite3
(read-only) and open. Everything read is returned solely to the MCP client you
connected. See Privacy.
Development & testing
Tests run against synthetic fixtures in test/fixtures/ (a generated
dbstore.json and two small SQLite databases) — they never touch your real
Stocks data. STOCKS_TEST_MODE=1 bypasses the macOS gate so the pure
parsing/formatting logic can be tested on any OS, which is what CI does
(GitHub Actions, Linux, Node 18/20/22).
Data paths can be overridden via env vars (used by the tests):
STOCKS_DBSTORE_PATH, STOCKS_SHARED_DB_PATH, STOCKS_SPARKLINE_DB_PATH,
STOCKS_SQLITE_BIN.
Project layout
To regenerate the demo GIF (requires VHS):
Legal
Not affiliated with Apple
This is an independent, community project. It is not affiliated with, endorsed by, sponsored by, or supported by Apple Inc. "Apple", "Apple Stocks", "Stocks", "macOS", and related marks are trademarks of Apple Inc. They are used here only nominatively — to describe, factually and accurately, which app's local data this software reads. No claim of ownership or endorsement is made or implied.
This project ships no Apple code, assets, or trademarks, and does not bundle or redistribute any Apple data.
How it accesses data
The server reads files that already exist on your own Mac, under your own user account, in read-only mode. It does not circumvent any technical protection measure or DRM, does not access any online account or third-party data, and does not transmit data off your machine. The cache file formats may change between macOS versions; if that happens, a tool may simply return "no data" rather than misbehave.
Not financial advice
All figures are read from your Stocks app's local cache, may be delayed or inaccurate, and are provided as-is. Nothing here is investment, financial, legal, or tax advice. Do your own research; do not rely on this software for trading decisions. Market data ultimately originates from third-party providers via the Stocks app and is subject to their terms.
Warranty
This software is provided "AS IS", without warranty of any kind, to the fullest extent permitted by law. See the MIT License. Use at your own risk.
License
MIT © Hélder Gonçalves
来源:README.md,提交 effe4b8
工具
0版本历史
1- v1.1.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
