在 VS Code 中使用
Windsurf 拥有一流的 MCP 支持。VS Code 本身并不支持,但 Continue、Cline 和 Copilot Chat 都支持 - 相同的 Crawlbase 配置,四个可以放置的地方。
Windsurf(官方支持)
Windsurf 是 Crawlbase MCP 的官方支持客户端。配置方式:
- 打开 Windsurf → File → Preferences → Windsurf Settings → General → MCP Servers → Manage MCPs → View raw config。
- 将 Crawlbase 条目添加到
mcp_config.json:
{
"mcpServers": {
"crawlbase": {
"type": "stdio",
"command": "npx",
"args": ["@crawlbase/mcp@latest"],
"env": {
"CRAWLBASE_TOKEN": "YOUR_TOKEN",
"CRAWLBASE_JS_TOKEN": "YOUR_JS_TOKEN"
}
}
}
}保存并重启 Windsurf。Crawlbase 工具会出现在 MCP 面板中。
VS Code(通过助手扩展)
VS Code 本身不自带 MCP 支持,但其热门 AI 助手都支持。选择您已在使用的那一个即可。
Continue
Continue 是一款热门的 VS Code 开源 AI 助手。它在其 YAML 配置中支持 MCP 服务器:
mcpServers:
- name: crawlbase
type: stdio
command: npx
args:
- "@crawlbase/mcp@latest"
env:
CRAWLBASE_TOKEN: YOUR_TOKEN
CRAWLBASE_JS_TOKEN: YOUR_JS_TOKEN重新加载 Continue,工具就会出现在代理面板中。
Cline
Cline(原名 Claude Dev)为 MCP 服务器提供了设置界面。打开 Cline → Settings → MCP Servers → Add,然后粘贴:
{
"crawlbase": {
"type": "stdio",
"command": "npx",
"args": ["@crawlbase/mcp@latest"],
"env": {
"CRAWLBASE_TOKEN": "YOUR_TOKEN",
"CRAWLBASE_JS_TOKEN": "YOUR_JS_TOKEN"
}
}
}GitHub Copilot Chat
Copilot Chat 支持 MCP。打开 VS Code Settings,搜索 "MCP",启用该集成,然后使用与上述相同的 JSON 格式将其添加到 ~/.config/Code/User/mcp.json。
这四个选项都使用相同的 Crawlbase 配置。Windsurf 是官方上游支持的客户端;三个 VS Code 选项的效果同样出色 - Continue 扩展性最强,Cline 最具代理能力,Copilot 最为原生。
用法
配置完成后,工作流程与 Cursor 或 Claude Desktop 中相同:
Crawl https://docs.example.com/openapi.json and generate a typed
client for the /users endpoints in TypeScript.助手会调用 crawl 来获取规范,解析它,并编辑您工作区中的文件。