MCP HubMCP Hub
biegehydra

BifrostMCP

by: biegehydra

VSCode Extension with an MCP server that exposes semantic tools like Find Usages and Rename to LLMs

68created 06/03/2025
Visit
VSCode
LLM

📌Overview

Purpose: The Bifrost VSCode extension aims to provide a Model Context Protocol (MCP) server that integrates VSCode's development tools with AI coding assistants, enhancing code navigation and manipulation capabilities.

Overview: Bifrost serves as a bridge between VSCode's powerful development environment and AI tools by exposing a range of language features and functionalities through the MCP protocol. This allows users to leverage advanced coding capabilities while working with AI assistants.

Key Features:

  • Language Server Integration: Leverages VSCode's language server features for supported programming languages, facilitating improved coding experiences.

  • Code Navigation: Enables easy access to references, definitions, and implementations, streamlining code exploration.

  • Symbol Search: Provides functionality to quickly find symbols across the entire workspace, making project management efficient.

  • Code Analysis: Offers detailed semantic token information and document symbols, aiding in understanding code structure.

  • Smart Selection: Facilitates intelligent code selection through semantic selection ranges, enhancing editing precision.

  • Code Actions: Provides refactoring suggestions and quick fixes, promoting cleaner and more maintainable code.

  • HTTP/SSE Server: Exposes language features through a MCP-compatible HTTP server for seamless integration with AI assistants.

  • AI Assistant Integration: Specifically designed to work well with any AI tools that support the MCP protocol, expanding the capabilities of coding assistants.


Bifrost - VSCode Dev Tools MCP Server

This VS Code extension provides a Model Context Protocol (MCP) server that exposes VSCode's powerful development tools and language features to AI tools. It enables advanced code navigation, analysis, and manipulation capabilities when using AI coding assistants that support the MCP protocol.

Features

  • Language Server Integration: Access VSCode's language server capabilities for any supported language
  • Code Navigation: Find references, definitions, implementations, and more
  • Symbol Search: Search for symbols across your workspace
  • Code Analysis: Get semantic tokens, document symbols, and type information
  • Smart Selection: Use semantic selection ranges for intelligent code selection
  • Code Actions: Access refactoring suggestions and quick fixes
  • HTTP/SSE Server: Exposes language features over an MCP-compatible HTTP server
  • AI Assistant Integration: Ready to work with AI assistants that support the MCP protocol

Usage

Cline Installation

  • Step 1: Install Supergateway
  • Step 2: Add config to cline
  • Step 3: It will show up red but seems to work fine
{
  "mcpServers": {
    "Bifrost": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "supergateway",
        "--sse",
        "http://localhost:8008/sse"
      ],
      "disabled": false,
      "autoApprove": [],
      "timeout": 600
    }
  }
}

Roo Code Installation

  • Step 1: Add the SSE config to your global or project-based MCP configuration
{
  "mcpServers": {
    "Bifrost": {
      "url": "http://localhost:8008/sse"
    }
  }
}

Follow this video to install and use with cursor. Sample rules are provided for .cursorrules files for better results.

Example Cursor Rules

For new versions of Cursor, use this code:

{
  "mcpServers": {
    "Bifrost": {
      "url": "http://localhost:8008/sse"
    }
  }
}

Multiple Project Support

When working with multiple projects, each project can have its own dedicated MCP server endpoint and port. This is useful when you have multiple VS Code windows open or are working with multiple projects that need language server capabilities.

Project Configuration

Create a bifrost.config.json file in your project root:

{
    "projectName": "MyProject",
    "description": "Description of your project",
    "path": "/my-project",
    "port": 5642
}

This configuration enables:

  • Project-specific endpoints (e.g., http://localhost:5642/my-project/sse)
  • Providing project information to AI assistants
  • Dedicated port for each project
  • Isolated project services for running instances

Example Configurations

  1. Backend API Project:
{
    "projectName": "BackendAPI",
    "description": "Node.js REST API with TypeScript",
    "path": "/backend-api",
    "port": 5643
}
  1. Frontend Web App:
{
    "projectName": "FrontendApp",
    "description": "React frontend application",
    "path": "/frontend-app",
    "port": 5644
}

Port Configuration

  • Each project should specify a unique port to avoid conflicts.
  • The port field in bifrost.config.json determines the server port.
  • Defaults to 8008 if no port is specified.
  • The server will fail to start if the port is already in use; you must free the port, change the port in the config, or close other VS Code instances using that port.

Connecting to Project-Specific Endpoints

Update your AI assistant configuration to use project-specific endpoints and ports:

{
  "mcpServers": {
    "BackendAPI": {
      "url": "http://localhost:5643/backend-api/sse"
    },
    "FrontendApp": {
      "url": "http://localhost:5644/frontend-app/sse"
    }
  }
}

Backwards Compatibility

If no bifrost.config.json is present, the server uses the default configuration:

  • Port: 8008
  • SSE endpoint: http://localhost:8008/sse
  • Message endpoint: http://localhost:8008/message

This maintains compatibility with existing configurations and tools.

Available Tools

The extension provides access to many VSCode language features including:

  • find_usages: Locate all symbol references.
  • go_to_definition: Jump to symbol definitions instantly.
  • find_implementations: Discover implementations of interfaces/abstract methods.
  • get_hover_info: Get rich symbol docs on hover.
  • get_document_symbols: Outline all symbols in a file.
  • get_completions: Context-aware auto-completions.
  • get_signature_help: Function parameter hints and overloads.
  • get_rename_locations: Safely rename symbols across the project.
  • get_code_actions: Quick fixes, refactors, and improvements.
  • get_semantic_tokens: Enhanced highlighting data.
  • get_call_hierarchy: See incoming/outgoing call relationships.
  • get_type_hierarchy: Visualize class and interface inheritance.
  • get_code_lens: Inline insights (references, tests, etc.).
  • get_selection_range: Smart selection expansion for code blocks.
  • get_type_definition: Jump to underlying type definitions.
  • get_declaration: Navigate to symbol declarations.
  • get_document_highlights: Highlight all occurrences of a symbol.
  • get_workspace_symbols: Search symbols across your entire workspace.

Requirements

  • Visual Studio Code version 1.93.0 or higher
  • Appropriate language extensions for the languages you want to work with (e.g., C# extension for C# files)

Installation

  1. Install this extension from the VS Code marketplace
  2. Install any language-specific extensions you need for your development
  3. Open your project in VS Code

Usage

The extension will automatically start an MCP server when activated. To configure an AI assistant to use this server:

  1. The server runs on port 8008 by default
  2. Configure your MCP-compatible AI assistant to connect to:
    • SSE endpoint: http://localhost:8008/sse
    • Message endpoint: http://localhost:8008/message

Available Commands

  • Bifrost MCP: Start Server - Manually start the MCP server on port 8008
  • Bifrost MCP: Start Server on port - Manually start the MCP server on a specified port
  • Bifrost MCP: Stop Server - Stop the running MCP server
  • Bifrost MCP: Open Debug Panel - Open the debug panel to test available tools

Example Tool Usage

Find References

{
  "name": "find_usages",
  "arguments": {
    "textDocument": {
      "uri": "file:///path/to/your/file"
    },
    "position": {
      "line": 10,
      "character": 15
    },
    "context": {
      "includeDeclaration": true
    }
  }
}

Workspace Symbol Search

{
  "name": "get_workspace_symbols",
  "arguments": {
    "query": "MyClass"
  }
}

Troubleshooting

If you encounter issues:

  1. Ensure you have the appropriate language extensions installed for your project
  2. Check that your project has loaded correctly in VSCode
  3. Verify that port 8008 is available on your system
  4. Check the VSCode output panel for any error messages

Contributing

Here are Vscode commands if you want to add additional functionality go ahead. Some features like rename are still needed.

Please feel free to submit issues or pull requests to the GitHub repository.

License

This extension is licensed under the APGL-3.0 License.