自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

五個開源 MCP 服務(wù)器,讓你的AI代理勢如破竹

發(fā)布于 2025-4-23 11:48
瀏覽
0收藏

來源 | Code Pulse

出品 | 51CTO技術(shù)棧(微信號:blog51cto)

我最近一直在研究Claude,我對它只是回答問題感到有點(diǎn)厭煩。

我希望它能做一些事情,比如從網(wǎng)站拉取數(shù)據(jù),或者瀏覽我的 GitHub。當(dāng)我第一次讓一個MCP服務(wù)器運(yùn)行起來的時候,我非常興奮——感覺就像解鎖了一個外掛。

就在那時,我發(fā)現(xiàn)了這種叫做 MCP 服務(wù)器的東西。它們就像小幫手,讓你的 AI 與工具和應(yīng)用程序交互。開源、免費(fèi),而且說實(shí)話,玩起來還挺有意思的。

這里分享我嘗試過的五款讓我“哇,這太棒了”的MCP服務(wù)器。

以下是我最近一直在研究的五個MCP服務(wù)器。

1.Stagehand:瀏覽網(wǎng)頁AI工具

Stagehand 是Browserbase推出的一款很酷的工具。它能讓你的 AI 像打開瀏覽器一樣——點(diǎn)擊鏈接、抓取文本等等。我用它從一個美食博客上抓取了一堆菜譜標(biāo)題,用于一個項(xiàng)目,這比我自己寫腳本容易多了。

git clone https://github.com/browserbase/stagehand-mcp 
cd stagehand-mcp 
npm install 
npm start

它在 localhost:3000 上運(yùn)行。然后我告訴 Claude(使用 Claude Desktop,它非常適合這個功能):

Go to a news site and get the top headlines.Stagehand zipped over, snatched the titles, and Claude spit them back out. So handy for stuff like checking prices or pulling data without coding.to a news site andget the top headlines.Stagehand zipped over, snatched the titles, and Claude spit them back out. So handy for stuff like checking prices or pulling data without coding.

Stagehand是免費(fèi)且開源的,并且不會像我嘗試過的其他一些網(wǎng)絡(luò)工具那樣崩潰。

五個開源 MCP 服務(wù)器,讓你的AI代理勢如破竹-AI.x社區(qū)圖片

2.Jupyter:輕松處理數(shù)據(jù)

這是給所有喜歡玩數(shù)字的人準(zhǔn)備的。Jupyter MCP 服務(wù)器可以讓你的 AI 處理 Jupyter 筆記本——你知道的,就是那些用于數(shù)據(jù)的編碼應(yīng)用程序。我不是數(shù)據(jù)科學(xué)家,但我讓 Claude 看了我在咖啡店消費(fèi)的 CSV 文件(說實(shí)話,這挺尷尬的),然后告訴我發(fā)生了什么。

以下是設(shè)置方法:

git clone https://github.com/jjsantos01/jupyter-notebook-mcp 
cd jupyter-notebook-mcp 
pip install -r requirements.txt 
python server.py

它在 localhost:8000 上運(yùn)行。比如我告訴 Claude:

Open coffee.csv and tell me how much I spent on lattes.and tell me how much I spent on lattes.

Claude做了一個筆記本,運(yùn)行了一些 Python 程序,然后說道:

You dropped $87.50 on lattes this month. Ouch.87.50 on lattes this month. Ouch.

我不需要自己寫任何代碼。就像有個書呆子朋友幫你算算賬一樣。

3.Opik:監(jiān)控你的AI

Opik 來自Comet,它專注于監(jiān)控你的 AI。比如,如果它開始出現(xiàn)異常,Opik 會告訴你原因。我曾經(jīng)有一個 AI 機(jī)器人總是給出愚蠢的答案,Opik 幫我發(fā)現(xiàn)它是不是觸及了某些 API 的極限。

安裝如下:

git clone https://github.com/comet-ml/opik 
cd opik 
./opik.sh

然后將其添加到一些代碼中:

import opik

opik.configure(use_local=True)

@opik.track
defask_something(question):
    return"You asked: " + question

ask_something("What’s for dinner?")I asked Claude to check the logs:

Show me what my AI’s been up to.

它向我顯示了每個調(diào)用、時長等等所有問題。它就像你的人工智能的偵探,幫助你快速發(fā)現(xiàn)問題。

五個開源 MCP 服務(wù)器,讓你的AI代理勢如破竹-AI.x社區(qū)圖片

4.GitHub:與你一起編碼的人工智能

這個服務(wù)器直接來自 GitHub,它可以讓你的 AI 深入挖掘你的代碼庫。我以前忙得不可開交,需要查看項(xiàng)目進(jìn)度,又不想打開無數(shù)個標(biāo)簽頁的時候就用過它。比如剛剛Claude還給了我一份未解決的問題清單,超級有用。

設(shè)置如下:

git clone https://github.com/github/github-mcp-server 
cd github-mcp-server 
npm install 
export GITHUB_TOKEN=your_token 
npm start

它在 localhost:4000。我說:

Claude, what’s up with my repo ‘side-hustle’?

Claude的回答是:

Twoissuesopen: one’sabuginthelogin, another’saboutaddingasharebutton.

有了這個MCP服務(wù)器,就可以免于淹沒在GitHub的通知消息中。

5.FastAPI-MCP:你的AI調(diào)用你的API

FastAPI-MCP 是一個巧妙的技巧,可以將 FastAPI 應(yīng)用轉(zhuǎn)變?yōu)?AI 可以使用的工具。我創(chuàng)建了一個小型 API 來跟蹤我的待辦事項(xiàng)列表,這樣 Claude 就可以自動檢查,無需我額外操作。

以下是我所做的:

git clone https://github.com/jlowin/fastmcp
cd fastmcp
pip install fastapi-mcpThen I tweaked my FastAPI app:

from fastapi import FastAPI
from fastmcp import mcp

app = FastAPI()

@app.get("/todo/{item_id}")
asyncdefget_todo(item_id: int):
    return {"id": item_id, "task": f"Task {item_id}"}

@mcp.tool()
asyncdefget_todo_tool(item_id: int):
    returnawait get_todo(item_id)

使用 uvicorn main:app — reload 運(yùn)行它,將其掛接到 localhost:8000,并告訴 Claude:

What’s task 5on my to-do list?Got back:

Task 5is “Call mom.”

為Claude制作自己的工具非常簡單。

6.為什么這些值得你花時間

這些服務(wù)器我都用得非常開心。Stagehand 非常適合處理網(wǎng)頁內(nèi)容,Jupyter 非常適合處理數(shù)據(jù),Opik 非??煽?,GitHub 是程序員的夢想,而 FastAPI-MCP 則讓我可以構(gòu)建任何內(nèi)容。它們都是免費(fèi)的,而且如果你喜歡的話,還可以進(jìn)行一些調(diào)整。

這里有幾個使用心得,分享給大家。

  • 先從聽起來有趣的開始。我首先選擇了 GitHub,因?yàn)槲铱偸窃谟?repos。
  • 我使用 Claude Desktop 來測試這些東西。
  • 檢查 GitHub 上每個服務(wù)器的自述文件 — — 它包含好東西。
  • 在做大事之前先在本地嘗試一下。

參考鏈接:https://medium.com/@CodePulse/5-open-source-mcp-servers-thatll-make-your-ai-agents-unstoppable-89498fcada16

本文轉(zhuǎn)載自??51CTO技術(shù)棧??

已于2025-4-23 11:59:40修改
收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦