# Firecrawl MCP Server 安裝教學 Installation Guide (for macOS) 要先安裝Claude喔!You need to install Claude first!: https://claude.ai/login?returnTo=%2F%3F **Reference**:recrawl-mcp-server: https://github.com/mendableai/firecrawl-mcp-server You can find all the MCPs here: https://www.claudemcp.com/servers ## 步驟 1:安裝 Node.js 與 npx Firecrawl MCP 是透過 npx 執行的,請先確認你有 Node.js 與 npx。 安裝 Node.js(包含 npx) Firecrawl MCP is executed via npx, so please make sure you have Node.js and npx installed. 打開 Terminal,執行: Installing Node.js (includes npx) Open your Terminal and run: ``` brew install node ``` ### 如果還沒有安裝Brew If you don't have Brew 在 Terminal 輸入以下指令(來自官方網站): Enter the following command in the Terminal (from the official website): ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` 安裝完之後輸入環境變數 After installation, enter the environment variables: ``` echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" ``` 最後檢查看看有沒有裝好。 Finally, check to see if the installation was successful ``` brew -v ``` ![Screenshot 2025-04-23 at 8.27.37 PM](https://hackmd.io/_uploads/ByvphII1lx.png) ⬆️有出現版本名稱後代表有裝好,再接續前面的 brew install node ⬆️If a version number appears, that means the installation was successful. 如果你不敢碰終端機...... 從官網下載也可以:https://nodejs.org If you’re not comfortable using the terminal… You can also download it from the official website: https://nodejs.org 安裝完成後可驗證 After installation, you can verify it by: ``` node -v npx -v ``` 一樣,有出現版本名稱後代表有裝好。 ## 步驟 2:申請 Firecrawl API Key 1. 前往 https://app.firecrawl.dev 2. 註冊並登入帳號 3. 複製 FIRECRAWL_API_KEY --- 5. Go to https://app.firecrawl.dev 6. Sign up and log in to your account 7. Copy your FIRECRAWL_API_KEY ## 步驟 3:在 Claude Desktop 中掛載 firecrawl-mcp 工具 ``` open ~/.claude/claude_desktop_config.json ``` 或是如果沒有這個路徑,可以到Claude的設定,選Developer,Edit Config Alternatively, if that path doesn’t exist, you can go to Claude’s settings, select Developer, and click Edit Config. ![Screenshot 2025-04-23 at 8.01.06 PM](https://hackmd.io/_uploads/HkH5L8U1ex.png) ![Screenshot 2025-04-23 at 8.02.16 PM](https://hackmd.io/_uploads/HyIRLL81xe.png) 用TextEdit打開這個檔案,貼上以下內容 Open this file using TextEdit, and paste the following content inside: ``` { "mcpServers": { "firecrawl": { "command": "npx", "args": ["-y", "firecrawl-mcp"], "env": { "FIRECRAWL_API_KEY": "fc-你的 Firecrawl API Key" } } } } ``` 記得把自己的API Key放上去! Command + S 儲存,接著重啟Claude,它會自動從 .json 讀取設定,並啟動 firecrawl-mcp 伺服器。 Don’t forget to paste in your own API Key! Press Command + S to save, then restart Claude. It will automatically read the configuration from the .json file and launch the firecrawl-mcp server. ![Screenshot 2025-04-23 at 8.05.05 PM](https://hackmd.io/_uploads/ByhdwUL1le.png) 接著你的Claude上就會輸入區旁邊的錘子,代表有掛載好。 接著用可以測試看看功能, 範例指令: Next, you’ll see a hammer icon next to the input box in Claude — that means it’s successfully mounted. Now you can test it out! Example command: > Use firecrawl to extract content from https://www.bbc.com/news ## 步驟4:裝好之後,來搞永慶房屋的資料== 因為他的WebCrawler還沒有很聰明,所以要先取得精確的網址 Since its WebCrawler isn’t very smart yet, you’ll need to get the exact URL first. ![Screenshot 2025-04-23 at 8.12.26 PM](https://hackmd.io/_uploads/BkBPKLU1el.png) 像上面這樣,輸入了作業指定的條件,會看到用284個結果,總共十頁。 As shown above, after entering the assignment’s specified criteria, you’ll see 284 results spread across ten pages. ![Screenshot 2025-04-23 at 8.14.28 PM](https://hackmd.io/_uploads/BJMpYIL1lg.png) 已經在第一頁了,但還是重新點一次第一頁,讓網址刷新成更精確包含頁數的格式。 Even if you’re already on the first page, click on it again so the URL refreshes into a more precise format that includes the page number. ![Screenshot 2025-04-23 at 8.14.15 PM](https://hackmd.io/_uploads/SkLec8L1xx.png) 網址變成這樣 https://buy.yungching.com.tw/list/住宅_p/台北市-信義區_c/n_park?pg=1 接下來就是指令工程,回到Claude的對話框,輸入作業的需求。 Now comes the command crafting part: go back to Claude’s chat box and enter the assignment requirements. > 到永慶房屋網站https://buy.yungching.com.tw/list/住宅_p/台北市-信義區_c/n_park?pg=1,(整理pg=1-2)並把搜尋結果所列出每一頁的物件建立資料集,並包含變數:永慶房屋物件編號(在基本資訊後面,YC開頭的)、 「售價」(以「萬元」為單位)、「建物面積」(坪數)、 「屋齡」(年)、「房(室)」數、「物件與最近捷運站(已正式營運)的距離」(公尺) 不需要做任何視覺化或是分析,給我資料集就好。 我特別寫(整理pg=1-2)是因為兩頁兩頁跑比較不會出錯。 這時候Claude會跳出詢問你要不要給前面安裝的MCP權限,請點擊Allow for this Chat,接著他就會開始幫你抓資料。 I specifically wrote (collecting pg=1–2) because processing two pages at a time is less likely to cause errors. At this point, Claude will prompt you to allow access to the previously installed MCP. Click Allow for this Chat, and it will start retrieving the data for you. ![Screenshot 2025-04-23 at 8.18.47 PM](https://hackmd.io/_uploads/rkXnqLL1gl.png) 然後指令分成多次讓他跑,這個結果可以用mark down下載下來轉成指定格式,也可以掛載一個Claude-ChatGPT的MCP,讓他自動幫你轉成指定的檔案格式,或是整個複製下來貼到GPT轉檔也行。 Then, split the command into multiple runs to let it process in smaller chunks. The retrieved results can be downloaded in Markdown and converted to your desired file format. Alternatively, you can mount a Claude-ChatGPT MCP tool to automatically convert the results into a specific format, or simply copy everything and paste it into GPT to handle the conversion. 抓出來的結果 ![Screenshot 2025-04-29 at 10.30.15 AM](https://hackmd.io/_uploads/BJS6K3a1el.png) ![Screenshot 2025-04-29 at 10.31.18 AM](https://hackmd.io/_uploads/BJIb5hp1ll.png) 最後的輸出長這樣⬆️,後來發現應該是網頁限制因素,房屋物件編號和物件與捷運站距離的資訊無法取得,所以這部分還是要自己輸入,不過售價、建物面積、屋齡的資料都是正確的。 不用一筆一筆Key了。只要指令給的夠清楚,Claude基本上會做好所有東西,之後應該把作業的PDF檔案丟進去他也能自己跑。 The final output looks like this. Turns out, due to limitations on the website, the property ID and distance to MRT station couldn’t be retrieved automatically, so those still need to be entered manually. And yet, price, building area, and building age data were all correctly extracted. No longer need to enter everything by hand. As long as the instructions are clear enough, Claude can handle pretty much everything for you. Eventually, you could even upload the PDF assignment directly and it should be able to run it on its own. Crawlin': https://youtu.be/jvAsDKWlneA Claude talk to GPT: https://youtu.be/pkc7SWhylMs