我希望它能做一些事情,你知道吗? 比如从网站拉取数据或浏览我的 GitHub。
就在那时,我发现了这些被称为 MCP 服务器的东西。它们就像小帮手,让您的 AI 与工具和应用程序进行交互。开源、免费,而且老实说玩起来有点有趣。
我要告诉你我尝试过的五个方法,它们让我感到,"哇,这太棒了。
什么是 MCP 服务器?
好的,MCP 代表模型上下文协议。这是像 Claude 这样的 AI 与他们的气泡之外的东西交谈的一种方式,比如网站或代码笔记本。没有它,您的 AI 只是猜测。
以下是我一直在深入研究的五个。
1. Stagehand:网上冲浪的 AI
Stagehand 是 Browserbase 的一款很酷的工具。它让你的 AI 就像打开浏览器一样------点击链接、抓取文本等等。我用它从美食博客中为一个项目抓取了一堆食谱标题,这比自己编写脚本要容易得多。
bash
Copygit clone https://github.com/browserbase/stagehand-mcp
cd stagehand-mcp
npm install
npm start
它在 localhost:3000 上运行。然后我告诉 Claude(使用 Claude Desktop,它非常适合这个):
sql
CopyGo 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.
它是免费的、开源的,并且不会像我尝试过的其他一些 Web 工具那样崩溃。

2. Jupyter:轻松的数据
这个适合任何喜欢玩数字的人。Jupyter MCP 服务器让您的 AI 处理 Jupyter 笔记本 --- 您知道的,那些数据编码应用程序。我不是数据科学家,但我让 Claude 查看了我的咖啡店消费的 CSV(老实说,这很尴尬)并告诉我发生了什么。
以下是我的设置方法:
bash
Copygit clone https://github.com/jjsantos01/jupyter-notebook-mcp
cd jupyter-notebook-mcp
pip install -r requirements.txt
python server.py
它在 localhost:8000 上运行。我对克劳德说:
vbnet
CopyOpen coffee.csv and tell me how much I spent on lattes.
Claude 做了一个笔记本,运行了一些 Python,然后说:
csharp
CopyYou dropped $87.50 on lattes this month. Ouch.
我不必自己编写任何代码。这就像让一个书朋友为你做数学计算。
3. Opik:弄清楚你的 AI 在做什么
Opik 来自 Comet,这一切都是为了密切关注您的 AI。比如,如果它开始表现得很奇怪,Opik 会告诉你为什么。我曾经有一个 AI 机器人,它一直在给出愚蠢的答案,Opik 帮助我看到它在某些 API 上达到了极限。
我开始了:
bash
Copygit clone https://github.com/comet-ml/opik
cd opik
./opik.sh
然后我将其添加到一些代码中:
python
Copyimport opik
opik.configure(use_local=True)
@opik.track
def ask_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.
它向我展示了每一个电话,花了多长时间,所有的爵士乐。
它就像 AI 的间谍,帮助您快速发现问题。

4. GitHub:与您一起编码的 AI
此服务器直接来自 GitHub,它允许 AI 深入存储库。当我被淹没并且需要检查项目中发生的事情而不打开一百万个选项卡时,我使用了它。Claude 刚刚给了我一个未解决的问题的概要------超级有帮助。
设置是这样的:
bash
Copygit clone https://github.com/github/github-mcp-server
cd github-mcp-server
npm install
export GITHUB_TOKEN=your_token
npm start
它位于 localhost:4000 上。我说过:
csharp
CopyClaude, what's up with my repo 'side-hustle'?
Claude 回答说:
less
CopyTwo issues open: one's a bug in the login, another's about adding a share button.
使我免于淹没在 GitHub 通知中。
5. FastAPI-MCP:您的 AI 调用您的 API
FastAPI-MCP 是将 FastAPI 应用程序变成您的 AI 可以使用的东西的巧妙技巧。我制作了一个小 API 来跟踪我的待办事项列表,这让 Claude 无需我做额外的工作即可检查它。
这是我所做的:
bash
Copygit 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}")
async def get_todo(item_id: int):
return {"id": item_id, "task": f"Task {item_id}"}
@mcp.tool()
async def get_todo_tool(item_id: int):
return await get_todo(item_id)
用 uvicorn main:app --- reload 运行它,将其挂接到 localhost:8000,并告诉 Claude:
vbnet
CopyWhat's task 5 on my to-do list?Got back:
Task 5 is "Call mom."
为 Claude 制作自己的工具非常简单。
为什么这些值得您花时间
我对这些服务器玩得很开心。Stagehand 非常适合 Web 内容,Jupyter 非常适合数据,Opik 保持诚实,GitHub 是程序员的梦想,FastAPI-MCP 让我可以构建任何东西。它们都是免费的,如果您觉得花哨,可以调整它们。
我学到的一些事情:
从一个听起来很有趣开始。我首先选择了 GitHub,因为我总是在存储库中。
Claude Desktop 是我测试这些东西的首选。
查看 GitHub 以获取每个服务器的自述文件 --- 它包含好东西。
在你做大之前先在本地玩一玩。