SuperAPIAI Directory

blackwindow-weave-mcp

github.com · AI developer platforms

blackwindow-weave-mcp is a local semantic search server for any MCP client, used to search local code and document folders. It splits source code and documents into passages, uses the 33M-parameter Motherlode code search encoder to generate vectors on the CPU, and returns file paths, line number ranges, and relevant passages. On first run it only accesses huggingface.co to download model files, and afterward it can run offline. It supports macOS, Linux, and Windows, and requires Node 20 or later.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux · API

About this tool

Purpose: blackwindow-weave-mcp provides clients that support the Model Context Protocol (MCP) with semantic search over local folders, covering source code and documents. It originates from the weave capability in the Black Window and Sunstone VS Code extensions and is now packaged as a standalone MCP server.

Main capabilities: The server splits code by definition into passages of about 700 characters and annotates each passage with the nearest definition; it splits prose by paragraph and sentence into passages of about 420 characters. It then uses Motherlode (a 33M-parameter code search encoder) to generate embeddings on the CPU via transformers.js and ONNX Runtime, using CLS pooling, and subtracts the model's built-in mean from each vector before normalizing, so that scores become centered cosine similarity. Search is exact, scores every passage, and returns file paths, line number ranges, and passage content.

Indexing and updates: Each folder maintains an index under the cache directory, containing a Float32 matrix and a JSONL passage file, and uses a manifest file with temporary writes followed by renames to ensure that interruptions do not corrupt the old index; unreadable indexes are moved aside rather than overwritten. Before answering, if a folder has not been checked for more than 30 seconds and fewer than 200 files have changed, the index is updated automatically; otherwise it indicates that the index is stale.

File handling: Git working trees are processed according to the git listing and respect .gitignore; other folders are traversed, but node_modules, build outputs, virtual environments, lock files, and compressed files are skipped. Files larger than 1 MB and binary files are skipped, and JSON and XML are also excluded.

Usage: It must first be installed once in a terminal, then added to the client configuration. The install command is npm install -g blackwindow-weave-mcp@0.1.2, or use the versioned package name via npx. The version number should be kept consistent in the client configuration to avoid npx looking up a new version on every startup. On macOS/Linux, VS Code is configured in .vscode/mcp.json, and clients such as Cursor, Claude Desktop, and Windsurf use their respective configurations; on Windows, npx is a batch file and must be launched via cmd /c. Linux xDuring installation, ONNX Runtime additionally downloads 236 MB of CUDA libraries, but servers using only CPU can skip this.

Use cases: suitable for developers who need to quickly locate implementation details in a local codebase and documentation, for example asking "where are pairing rows parsed into url, key, and name" and getting file paths, line numbers, and relevant passages.

Limitations: the first run requires internet access to huggingface.co to download six requests and five files, totaling 133,752,819 bytes; after caching, no further network access is needed. First-time installation takes about 7 to 13 seconds on Linux/macOS and about 55 to 69 seconds on Windows; after installation, startup takes less than 3 seconds. The client has a time limit for waiting for the server to start (the MCP SDK default is 60 seconds); an interrupted installation may leave a corrupted npm cache, requiring deletion of the npx cache and reinstallation. On an Apple M2 Ultra, embedding speed is about 68 passages per second, and 10,000 passages take about two and a half minutes the first time. Windows on Arm, Intel Mac, and Alpine Linux are untested. The license is Business Source License 1.1 and includes an internal use grant, allowing use for any internal purpose (including commercial development), but it may not be provided to others as a hosted search service or embedded in the products offered; on September 15, 2030, it converts to Apache-2.0. The encoder is downloaded under its own license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools