WindTools MCP Server

by ZahidGalea

5 342 downloads Not rated yet
GitHub

About

Your own codebase tools like code semantic search

Explore

- Semantic Code Search: Uses sentence transformers for embedding code snippets and retrieval
- Code Repository Indexing: Automatically indexes code files from specified directories
- Persistent Storage: Saves code embeddings in ChromaDB for persistent retrieval
- Directory Exploration: Built-in tools for navigating and exploring codebases
- Background Initialization: Loads resources asynchronously to minimize startup time
- Environment Configuration: Configurable through environment variables

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name WindTools MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.11
- Dependencies listed in pyproject.toml

The server can be configured with the following environment variables:

- DATA_ROOT: Absolute directory where ChromaDB database and model cache will be stored (default: a 'data' directory
inside the package)
- CHROMA_DB_FOLDER_NAME: Name of the folder where ChromaDB stores data (default: "default")
- SENTENCE_TRANSFORMER_PATH: Path to the sentence transformer model (default: "jinaai/jina-embeddings-v2-base-code")

Add the following to your claude_desktop_config.json:

For developing:


uv sync --dev

If you want to use locally:

pip install -e .

Configuration for local development:

{
  "mcpServers": {
    "windtools": {
      "command": "uv",
      "args": [
        "run",
        "windtools-mcp"
      ],
      "env": {
        "DATA_ROOT": "/Users/<user>/windtools_data",
        "CHROMA_DB_FOLDER_NAME": "chromadb",
        "SENTENCE_TRANSFORMER_PATH": "jinaai/jina-embeddings-v2-base-code"
      }
    }
  }
}
pytest tests/

The project includes both unit tests and integration tests using pytest and pytest-asyncio for testing asynchronous
functionality.

directory_path

(string): Path to list contents of, should be absolute path to a directory

target_directories

(array of strings): List of absolute paths to directories to index

force_reindex

(boolean, optional): If true, reindex all files even if they already exist in the index

query

(string): Search query describing what you're looking for

limit

(integer, optional): Maximum number of results to return (default: 10)

min_relevance

(float, optional): Minimum relevance score threshold (0.0 to 1.0)

1. list_dir
- List the contents of a directory
- Inputs:
- directory_path (string): Path to list contents of, should be absolute path to a directory
- Returns: JSON string containing directory information including file types and sizes

2. get_initialization_status
- Check the status of the background initialization process
- Returns: JSON string with initialization status of ChromaDB and embedding model

3. index_repository
- Index code files from specified directories into ChromaDB
- Inputs:
- target_directories (array of strings): List of absolute paths to directories to index
- force_reindex (boolean, optional): If true, reindex all files even if they already exist in the index
- Returns: JSON string containing indexing statistics and results

4. codebase_search
- Find code snippets relevant to a search query
- Inputs:
- query (string): Search query describing what you're looking for
- limit (integer, optional): Maximum number of results to return (default: 10)
- min_relevance (float, optional): Minimum relevance score threshold (0.0 to 1.0)
- Returns: JSON string containing search results with relevant code snippets

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "windtools mcp server": {
            "windtools-mcp": {
                "command": "uv",
                "args": [
                    "sync",
                    "--dev"
                ]
            }
        }
    }
}

McpServers

{
    "windtools-mcp": {
        "command": "uv",
        "args": [
            "sync",
            "--dev"
        ]
    }
}

MCP Server for the WindTools code assistant, providing document embedding and retrieval capabilities using ChromaDB and
sentence transformers.

Features

- Semantic Code Search: Uses sentence transformers for embedding code snippets and retrieval
- Code Repository Indexing: Automatically indexes code files from specified directories
- Persistent Storage: Saves code embeddings in ChromaDB for persistent retrieval
- Directory Exploration: Built-in tools for navigating and exploring codebases
- Background Initialization: Loads resources asynchronously to minimize startup time
- Environment Configuration: Configurable through environment variables

Tools

1. list_dir
- List the contents of a directory
- Inputs:
- directory_path (string): Path to list contents of, should be absolute path to a directory
- Returns: JSON string containing directory information including file types and sizes

2. get_initialization_status
- Check the status of the background initialization process
- Returns: JSON string with initialization status of ChromaDB and embedding model

3. index_repository
- Index code files from specified directories into ChromaDB
- Inputs:
- target_directories (array of strings): List of absolute paths to directories to index
- force_reindex (boolean, optional): If true, reindex all files even if they already exist in the index
- Returns: JSON string containing indexing statistics and results

4. codebase_search
- Find code snippets relevant to a search query
- Inputs:
- query (string): Search query describing what you're looking for
- limit (integer, optional): Maximum number of results to return (default: 10)
- min_relevance (float, optional): Minimum relevance score threshold (0.0 to 1.0)
- Returns: JSON string containing search results with relevant code snippets

Technical Architecture

The WindTools MCP Server is built on these key components:

- ChromaDB: Vector database for storing and retrieving code embeddings
- Sentence Transformers: Deep learning models for creating embeddings from code
- FastMCP: Framework for building MCP-compliant servers
- Async Lifespan Management: Efficient resource initialization and cleanup

Initialization Process

The server initializes ChromaDB and the embedding model in the background, allowing it to start accepting requests
immediately while resource loading continues in the background. The get_initialization_status tool can be used to
check if the initialization is complete.

Setup

Environment Variables

The server can be configured with the following environment variables:

- DATA_ROOT: Absolute directory where ChromaDB database and model cache will be stored (default: a 'data' directory
inside the package)
- CHROMA_DB_FOLDER_NAME: Name of the folder where ChromaDB stores data (default: "default")
- SENTENCE_TRANSFORMER_PATH: Path to the sentence transformer model (default: "jinaai/jina-embeddings-v2-base-code")

Installation

Using pip
pip install windtools-mcp
From source
git clone https://github.com/ZahidGalea/windtools-mcp
cd windtools-mcp
pip install -e .

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

Direct Execution

Using Python 3.11 as ChromaDB has issues with newer Python versions.

{
  "mcpServers": {
    "windtools": {
      "command": "uvx",
      "args": [
        "-p",
        "3.11",
        "-U",
        "windtools-mcp"
      ],
      "env": {
        "DATA_ROOT": "/Users/<user>/windtools_data",
        "CHROMA_DB_FOLDER_NAME": "chromadb",
        "SENTENCE_TRANSFORMER_PATH": "jinaai/jina-embeddings-v2-base-code"
      }
    }
  }
}

Data (including ChromaDB database and model cache) will be saved in the /Users/<user>/windtools_data directory and
persist between container executions.

Development

Requirements

- Python 3.11
- Dependencies listed in pyproject.toml

Development Setup

For developing:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.