最近在折腾 Claude,原本只是拿来写点文案、回答技术问题。 但渐渐地我有点不满足了——AI 不能只会说话,它得“动”起来。
于是,我遇见了 MCP Server,彻底打开了新世界大门。
如果你玩过前端组件、Node.js 插件,MCP Server 本质上就是一个“AI 的中间层工具接口”。
MCP,全称是 Model Context Protocol。它的核心作用是:
👉 把本地工具(如爬虫、Jupyter、API 接口、GitHub Repo)包装成“AI 能识别和调用”的服务。
也就是说,Claude 本身是个语言模型,不具备实际能力去操作网页、读代码、调接口。 MCP 就像给它配了“远程遥控器”。
比如我可以直接和 Claude 对话说:
💬 “帮我把这个页面的标题都抓下来” 💬 “帮我统计最近一个月我写的代码提交频率” 💬 “查一下我在 todo.json 里的第 3 个任务是什么”
而 Claude,真的能干这些事。不是“假装能”,是真的能做。
这个感受就像:
✅ 从 ChatGPT 到 ChatDev ✅ 从 Chatbot 到 Copilot ✅ 从“语义工具”到“智能工具链”
Claude = 拥有一双浏览器之眼 适合场景:网页数据采集 / 页面结构分析 / 自动填表
使用方法很简单,甚至比写 Puppeteer 还轻松:
git clone https://github.com/browserbase/mcp-server-browserbase/tree/main/stagehand
cd stagehand
npm install
npm start
然后你只需要说:
Claude,去 https://news.ycombinator.com 看看今天的头条
Claude 会抓取网页并返回标题、链接、时间戳等信息。
👀 适合场景举例:
当你维护多个 GitHub 仓库时,Claude 可以代替你:
git clone https://github.com/github/github-mcp-server
cd github-mcp-server
npm install
export GITHUB_TOKEN=你的token
npm start
然后说一句:
Claude,看看我 repo 里有没有未解决的 bug
它就能返回 open issues、PR 状态,甚至帮你总结代码 commit。
📌 亮点功能:
这个最适合我们这些写接口、调服务的人了。
MCP 帮你把任意 FastAPI 接口暴露成 Claude 能“调用的工具”:
git clone https://github.com/jlowin/fastmcp
cd fastmcp
pip install fastapi-mcp
from fastapi import FastAPI
from fastmcp import mcp
app = FastAPI()
@app.get("/task/{id}")
async def get_task(id: int):
return {"task": f"Task {id}"}
@mcp.tool()
async def get_task_tool(id: int):
return await get_task(id)
然后对 Claude 说:
“任务列表里,第5项是什么?”
Claude 会直接调用接口,返回你写好的结构化数据。
💡 适合前端场景:
调试 AI 一直是黑盒问题,Opik 让你看到 Claude 每一次调用的内容、响应时间、是否出错。
git clone https://github.com/comet-ml/opik
cd opik
./opik.sh
然后你可以给 Claude 一段 prompt,然后调用:
import 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:
Claude 的所有行为,都会被记录下来,包括:
📊 适合做什么?
这个最适合数据方向的前端,比如做数据可视化、ECharts 分析面板的朋友。
Claude 可以用这个 MCP,直接帮你操作 Jupyter Notebook:
git clone https://github.com/jjsantos01/jupyter-notebook-mcp
cd jupyter-notebook-mcp
pip install -r requirements.txt
python server.py
对话示例:
Claude,分析一下 coffee.csv 里的每天支出趋势,并画个折线图
Claude 会直接在 notebook 中生成代码、执行,并返回分析结论和图像。
📈 应用点子:
在我看来,MCP Server 是一场悄然发生的范式转移。
它让 AI 不再是“生产力的外包”工具,而是“开发者工具链”的原生成员。
新手推荐 | 上手难度 | 推荐理由 |
---|---|---|
✅ GitHub MCP | ⭐️⭐️ | GitHub + Claude = 项目协作超能助手 |
✅ Stagehand | ⭐️ | 网页交互最直观 |
✅ FastAPI-MCP | ⭐️⭐️⭐️ | 适合前端熟悉的接口联调场景 |
MCP Server 的未来,可能就是 AI Agent 的现在。
如果你也感兴趣 MCP 的玩法,欢迎关注我,一起深挖前端 + AI 工具链的融合可能。