Skip to main content

A Codebase MCP Tools

Project description

WindTools MCP Server

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
  • Persistent Storage: Saves code embeddings in ChromaDB for persistent retrieval
  • Directory Exploration: Built-in tools for navigating and exploring codebases
  • 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

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

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",
        "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

# Create a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install development dependencies
uv sync --dev

Inspector

npx @modelcontextprotocol/inspector uvx -p 3.11 windtools-mcp

Running Tests

pytest tests/

Project Structure

src/
  windtools_mcp/
    __init__.py
    __main__.py
    server.py
tests/
  test_client.py
.gitignore
.python-version
pyproject.toml
README.md

Release Process

The project version is managed centrally in the VERSION file. The release process is automatic:

  1. Update the version number in the VERSION file
  2. Commit and push to the main branch
  3. The GitHub Actions workflow will automatically:
    • Detect the change in the VERSION file
    • Create a git tag with the format v{VERSION}
    • Generate a release on GitHub
    • Publish the package to PyPI

It is not necessary to manually create tags or publish to PyPI, everything is managed automatically when the VERSION file is updated.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

windtools_mcp-1.0.4.tar.gz (102.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windtools_mcp-1.0.4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file windtools_mcp-1.0.4.tar.gz.

File metadata

  • Download URL: windtools_mcp-1.0.4.tar.gz
  • Upload date:
  • Size: 102.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for windtools_mcp-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a38292d92afe01664a8922605824618c8072ccc3c4dd706afe624f04d54e6b06
MD5 9f87293ec910defdb1b820503a44b512
BLAKE2b-256 f343f31b928db06ea49768ea9c9d1c90c84ff45dfdd9b55d1ddf34687742af70

See more details on using hashes here.

File details

Details for the file windtools_mcp-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: windtools_mcp-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for windtools_mcp-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bd67e86b90511edec0c3027a56cb27d9e6a411f14c51d2772bc9957e7ac11331
MD5 65169bd71c276202a3c6f6dc8f461bee
BLAKE2b-256 d7f532ed9ae94cbc36852450e29a5f7ae37b93648dc0f6bfebf1767a0621d33b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page