Skip to content

Commit 03b83ec

Browse files
linsamtwclaude
andcommitted
docs: add Windows installation guide
用戶反映不知道如何在 Windows 安裝 FinMind MCP。現有 install/*.md 的 指令都以 macOS / Linux 為前提(bash、export、~ 路徑、假設已有 pipx/uvx), Windows 使用者缺前置步驟。 新增: - install/windows.md — Windows 專用安裝指引: - 方式 A:winget / PowerShell 安裝 uv(免先裝 Python,推薦) - 方式 B:pipx(已有 Python 3.10+),含 pipx ensurepath 與重開視窗提醒 - Token 設定:PowerShell $env: 與 setx 語法、推薦直接填 host 設定檔 env - 6 個 host 設定檔的 Windows 路徑對照表(%APPDATA% / %USERPROFILE%) - 常見問題:GUI 應用(Claude Desktop)讀不到終端機 PATH → where.exe 查 完整路徑填 command、JSON 反斜線要寫 \\、系統匣 Quit 完全重啟、winget 不存在 修改(各加一行指到 windows.md): - README.md — host 表格下加 Windows 使用者註記 - install/claude-desktop.md、claude-code.md、cursor.md、windsurf.md、 gemini-cli.md、codex.md — 安裝套件段落後加 Windows 指引連結 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7324e9f commit 03b83ec

8 files changed

Lines changed: 123 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ pipx install finmind-mcp
3131
| Gemini CLI | [install/gemini-cli.md](install/gemini-cli.md) |
3232
| Codex CLI | [install/codex.md](install/codex.md) |
3333

34+
> **Windows 使用者**:請先看 [install/windows.md](install/windows.md) —— 含 `uv`/`pipx` 安裝、PowerShell 環境變數、各 host 設定檔的 Windows 路徑,以及「host 找不到 `finmind-mcp` 指令」等常見問題。
35+
3436
## 範例查詢
3537

3638
- 「台積電最近一個月股價」

install/claude-code.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipx install finmind-mcp # 推薦:長駐安裝
1212
uvx finmind-mcp --help # 用 uv 即時跑,不安裝
1313
```
1414

15+
> **Windows 使用者**`pipx`/`uvx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
16+
1517
## 設定
1618

1719
使用 `claude mcp add` 指令一鍵註冊(推薦):

install/claude-desktop.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipx install finmind-mcp # 推薦:長駐安裝
1212
uvx finmind-mcp --help # 用 uv 即時跑,不安裝
1313
```
1414

15+
> **Windows 使用者**`pipx`/`uvx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
16+
1517
## 設定
1618

1719
依您的作業系統,編輯對應的設定檔:

install/codex.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
pipx install finmind-mcp
1212
```
1313

14+
> **Windows 使用者**`uv`/`pipx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
15+
1416
## 設定
1517

1618
一行指令(推薦):

install/cursor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipx install finmind-mcp # 推薦:長駐安裝
1212
uvx finmind-mcp --help # 用 uv 即時跑,不安裝
1313
```
1414

15+
> **Windows 使用者**`pipx`/`uvx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
16+
1517
## 設定
1618

1719
依使用範圍選擇設定檔位置:

install/gemini-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipx install finmind-mcp # 推薦:長駐安裝
1212
uvx finmind-mcp --help # 用 uv 即時跑,不安裝
1313
```
1414

15+
> **Windows 使用者**`pipx`/`uvx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
16+
1517
## 設定
1618

1719
使用 `gemini mcp add` 指令一鍵註冊(推薦):

install/windows.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Windows 安裝指引
2+
3+
各 host 的安裝文件([Claude Desktop](claude-desktop.md)[Cursor](cursor.md) 等)中的指令以 macOS / Linux 為例。Windows 使用者請先照本頁完成「安裝套件」與「設定 Token」,再回到對應 host 的文件貼設定;本頁最後整理了 Windows 常見問題(尤其是 host 顯示找不到 `finmind-mcp` 指令的狀況)。
4+
5+
以下指令都在 **PowerShell** 執行(開始功能表搜尋「PowerShell」開啟即可,不需系統管理員權限)。
6+
7+
## 1. 安裝套件
8+
9+
擇一即可:
10+
11+
### 方式 A:uv(推薦,不需先安裝 Python)
12+
13+
[uv](https://docs.astral.sh/uv/) 會自動下載並管理 Python,適合電腦上沒有 Python 的使用者:
14+
15+
```powershell
16+
winget install --id astral-sh.uv -e
17+
# 或(沒有 winget 時)
18+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
19+
```
20+
21+
裝完後**關閉 PowerShell 再開一個新視窗**(讓 PATH 生效),驗證:
22+
23+
```powershell
24+
uvx finmind-mcp --help
25+
```
26+
27+
之後各 host 設定中的 `command``uvx``args``["finmind-mcp"]`(首次啟動會自動從 PyPI 下載 `finmind-mcp`,不需另外安裝)。
28+
29+
### 方式 B:pipx(已有 Python 3.10+ 的使用者)
30+
31+
```powershell
32+
python -m pip install --user pipx
33+
python -m pipx ensurepath
34+
```
35+
36+
關閉 PowerShell 再開新視窗,然後:
37+
38+
```powershell
39+
pipx install finmind-mcp
40+
finmind-mcp --help
41+
```
42+
43+
之後各 host 設定中的 `command` 直接填 `finmind-mcp`
44+
45+
> 還沒有 Python?可用 `winget install --id Python.Python.3.12 -e` 安裝,或到 [python.org](https://www.python.org/downloads/windows/) 下載安裝檔(安裝時記得勾選 **Add python.exe to PATH**);或直接改用方式 A。
46+
47+
## 2. 設定 Token
48+
49+
先依 [token 取得指引](../knowledge/token-guide.md) 取得 FinMind Token。**最推薦的做法**是直接把 token 填進各 host 設定檔的 `env` 區塊(各 host 文件的設定範例都有 `FINMIND_TOKEN` 欄位),不必動系統環境變數。
50+
51+
若想改設成 Windows 環境變數:
52+
53+
```powershell
54+
# 只在目前這個 PowerShell 視窗有效(適合先測試)
55+
$env:FINMIND_TOKEN = "your-token-here"
56+
57+
# 永久寫入使用者環境變數
58+
setx FINMIND_TOKEN "your-token-here"
59+
```
60+
61+
注意 `setx` 只對**之後新開啟**的程式生效——已經開著的終端機、Claude Desktop 等應用程式都要完全關閉重開才讀得到。
62+
63+
## 3. Windows 設定檔路徑對照
64+
65+
各 host 文件中 `~` 開頭的路徑,在 Windows 對應如下(`%APPDATA%``%USERPROFILE%` 可直接貼進檔案總管的網址列開啟):
66+
67+
| Host | Windows 設定檔路徑 |
68+
|---|---|
69+
| Claude Desktop | `%APPDATA%\Claude\claude_desktop_config.json` |
70+
| Claude Code | `%USERPROFILE%\.claude.json` |
71+
| Cursor(全域) | `%USERPROFILE%\.cursor\mcp.json` |
72+
| Windsurf | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` |
73+
| Gemini CLI | `%USERPROFILE%\.gemini\settings.json` |
74+
| Codex CLI | `%USERPROFILE%\.codex\config.toml` |
75+
76+
## 4. 常見問題
77+
78+
### host 啟動 server 失敗(找不到指令 / `ENOENT`
79+
80+
最常見的 Windows 問題:`finmind-mcp``uvx` 在 PowerShell 跑得動,但 Claude Desktop 這類**圖形介面應用程式讀到的 PATH 和終端機不同**,導致 MCP server 顯示連線失敗。解法是把設定裡的 `command` 改成執行檔的**完整路徑**。先在 PowerShell 查實際位置:
81+
82+
```powershell
83+
where.exe uvx # 方式 A
84+
where.exe finmind-mcp # 方式 B
85+
```
86+
87+
通常會是 `C:\Users\<你的帳號>\.local\bin\uvx.exe`(或 `finmind-mcp.exe`)。填進 JSON 時**反斜線要寫成 `\\`**,例如 Claude Desktop:
88+
89+
```json
90+
{
91+
"mcpServers": {
92+
"finmind": {
93+
"command": "C:\\Users\\<你的帳號>\\.local\\bin\\uvx.exe",
94+
"args": ["finmind-mcp"],
95+
"env": {
96+
"FINMIND_TOKEN": "your-token-here"
97+
}
98+
}
99+
}
100+
}
101+
```
102+
103+
### 改了設定卻沒有生效
104+
105+
Claude Desktop 關閉視窗後仍會在系統匣(工作列右下角)常駐——要在系統匣圖示上按右鍵選 **Quit / 結束** 完全關閉再重開,新設定才會載入。
106+
107+
### `winget` 不存在
108+
109+
較舊的 Windows 10 可能沒有內建 `winget`。改用方式 A 的第二行 PowerShell 安裝指令,或先從 Microsoft Store 安裝「應用程式安裝程式(App Installer)」。

install/windsurf.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipx install finmind-mcp # 推薦:長駐安裝
1212
uvx finmind-mcp --help # 用 uv 即時跑,不安裝
1313
```
1414

15+
> **Windows 使用者**`pipx`/`uvx` 的安裝方式、token 設定與常見 PATH 問題,請先看 [Windows 安裝指引](windows.md)
16+
1517
## 設定
1618

1719
編輯設定檔 `~/.codeium/windsurf/mcp_config.json`(檔案不存在請自行建立),加入以下內容(若已有其他 server,合併到同一個 `mcpServers` 物件即可):

0 commit comments

Comments
 (0)