By brokkai
Tree-sitter-backed LSP server for Java, Go, C/C++, JavaScript/TypeScript, Python, Rust, PHP, Scala, and C#. Provides documentSymbol, workspace/symbol, definition, hover, references, and parse-error diagnostics.
npx claudepluginhub brokkai/bifrostbifrost is a Rust port of Brokk's Tree-sitter-backed analyzer suite.
At the library level, this repository builds the brokk_analyzer crate. It provides single-language analyzers, a MultiAnalyzer, snapshot-style updates, import analysis, type hierarchy queries, test-file detection, and source/skeleton extraction.
At the tool level, this repository also provides:
bifrost, a stdio MCP server that exposes analyzer-backed search toolsbifrost_searchtools, a Python import package backed by a native Rust extensionmost_relevant_files, a CLI that ranks related project files from one or more seed filesThe current tree includes analyzers for:
For local development, test commands, repository-local Python workflow, and release tagging, see CONTRIBUTING.md.
The crate name is brokk_analyzer.
Example:
use std::sync::Arc;
use brokk_analyzer::{AnalyzerConfig, FilesystemProject, WorkspaceAnalyzer};
fn main() -> Result<(), String> {
let project = Arc::new(FilesystemProject::new(".")?);
let workspace = WorkspaceAnalyzer::build(project, AnalyzerConfig::default());
let analyzer = workspace.analyzer();
println!("languages: {:?}", analyzer.languages());
println!("files: {}", analyzer.get_analyzed_files().len());
println!("declarations: {}", analyzer.get_all_declarations().len());
Ok(())
}
The main public exports are re-exported from src/lib.rs, including:
WorkspaceAnalyzerMultiAnalyzerIAnalyzerProjectFileCodeUnitImportAnalysisProviderTypeHierarchyProviderTypeAliasProviderTestDetectionProviderBuild the server binary:
cargo build --bin bifrost
Run it against a project root:
./target/debug/bifrost --root /path/to/project --server searchtools
This starts a stdio MCP server that publishes these tools:
refreshactivate_workspaceget_active_workspacesearch_symbolsget_symbol_locationsget_symbol_summariesget_symbol_sourcesget_summarieslist_symbolsmost_relevant_filesactivate_workspace lets a host swap the analyzer's root mid-session without respawning the subprocess. The path must be absolute and is normalized to the nearest enclosing git root when one exists.
The intended external manual client is the official MCP Inspector.
Build the CLI binaries:
cargo build --bin bifrost --bin most_relevant_files
Rank related files from one or more seed files:
./target/debug/most_relevant_files --root /path/to/project path/to/seed_file.py
The Python distribution is bifrost-searchtools. Import it as bifrost_searchtools.
Example:
maturin develop
python - <<'PY'
from bifrost_searchtools import SearchToolsClient
with SearchToolsClient("tests/fixtures/testcode-java") as client:
print(client.get_summaries(["A.java"]).render_text())
print(client.most_relevant_files(["A.java"]).render_text())
PY
Pass render_line_numbers=False to SearchToolsClient(...) to omit line numbers from rendered text while keeping the structured line metadata in the result objects.
The client exposes:
refresh()search_symbols(...)get_symbol_locations(...)get_symbol_summaries(...)get_symbol_sources(...)get_summaries(...)list_symbols(...)most_relevant_files(...)The client talks directly to Rust through a native extension module. The Python/Rust boundary stays JSON-shaped: Python sends tool names plus JSON arguments and Rust returns JSON result objects. Rendering still lives in the Python package:
N..M: ... form on the first lineTypeScript/JavaScript language server for enhanced code intelligence
Rust language server
Rust language server for code intelligence and analysis
YAML language server
Bash language server
Share bugs, ideas, or general feedback.
LLVM-based language server for C and C++
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim