此 VS Code 扩展提供了一个模型上下文协议(MCP)服务器,该服务器将 VSCode 强大的开发工具和语言特性暴露给 AI 工具。它支持使用支持 MCP 协议的 AI 编码助手进行高级代码导航、分析和操作能力。

激活时,扩展会自动启动 MCP 服务器。要配置 AI 助手以使用此服务器:
bifrost.config.json 配置)http://localhost:8008/ssehttp://localhost:8008/message我还提供了可以在 .cursorrules 文件中使用的示例规则,以获得更好的结果。
{
"mcpServers": {
"Bifrost": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"supergateway",
"--sse",
"http://localhost:8008/sse"
],
"disabled": false,
"autoApprove": [],
"timeout": 600
}
}
}
{
"mcpServers": {
"Bifrost": {
"command": "npx",
"args": [
"-y",
"supergateway",
"--sse",
"http://localhost:8
008/sse"
],
"disabled": false,
"autoApprove": [],
"timeout": 600
}
}
}
{
"mcpServers": {
"Bifrost": {
"url": "http://localhost:8008/sse"
}
}
}
按照这个视频来安装并使用 cursor
{
"mcpServers": {
"Bifrost": {
"url": "http://localhost:8008/sse"
}
}
}
当处理多个项目时,每个项目都可以有自己的专用 MCP 服务器端点和端口。这在您有多个打开的 VS Code 窗口或正在处理需要语言服务器功能的多个项目时非常有用。
在项目根目录创建一个 bifrost.config.json 文件:
{
"projectName": "MyProject",
"description": "您的项目描述",
"path": "/my-project",
"port": 5642
}
服务器将使用此配置来:
http://localhost:5642/my-project/sse){
"projectName": "BackendAPI",
"description": "带有 TypeScript 的 Node.js REST API",
"path": "/backend-api",
"port": 5643
}
{
"projectName": "FrontendApp",
"description": "React 前端应用",
"path": "/frontend-app",
"port": 5644
}
每个项目应指定其自己的唯一端口,以避免在运行多个 VS Code 实例时发生冲突:
bifrost.config.json 文件中的 port 字段决定了服务器将使用的端口更新您的 AI 助手配置以使用项目特定的端点和端口:
{
"mcpServers": {
"BackendAPI": {
"url": "http://localhost:5643/backend-api/sse"
},
"FrontendApp": {
"url": "http://localhost:5644/frontend-app/sse"
}
}
}
如果没有 bifrost.config.json,服务器将使用默认配置:
http://localhost:8008/ssehttp://localhost:8008/message这保持了与现有配置和工具的兼容性。
扩展提供了对许多 VSCode 语言特性的访问,包括:
Bifrost MCP: Start Server - 手动在端口 8008 启动 MCP 服务器Bifrost MCP: Start Server on port - 手动在指定端口启动 MCP 服务器Bifrost MCP: Stop Server - 停止运行的 MCP 服务器Bifrost MCP: Open Debug Panel - 打开调试面板以测试可用工具{
"name": "find_usages",
"arguments": {
"textDocument": {
"uri": "file:///path/to/your/file"
},
"position": {
"line": 10,
"character": 15
},
"context": {
"includeDeclaration": true
}
}
}
{
"name": "get_workspace_symbols",
"arguments": {
"query": "MyClass"
}
}
如果您遇到问题:
这里有一些 VSCode 命令,如果您想添加额外的功能,请随意。我认为我们仍然需要重命名和其他一些功能。 请随时提交问题或拉取请求到 GitHub 仓库。
vsce package
使用 MCP: Open Debug Panel 命令

此扩展程序根据 APGL-3.0 许可证授权。