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

# Install development dependencies
uv sync --dev

If you want to use locally

pip install -e .
{
  "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"
      }
    }
  }
}

Inspector

npx @modelcontextprotocol/inspector uvx -p 3.11 windtools-mcp
npx @modelcontextprotocol/inspector uv run 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.1.0.tar.gz (121.3 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.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: windtools_mcp-1.1.0.tar.gz
  • Upload date:
  • Size: 121.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 39638dc7818c9d0d1642edfcc6aa0f86d537e0ec145467fff41625dc92d12807
MD5 3685d03902334f30e7e18b5df83a53c7
BLAKE2b-256 f481ba21a1a7f14ea3909137e21f7de678e063bc987168de77b3af2260d69007

See more details on using hashes here.

File details

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

File metadata

  • Download URL: windtools_mcp-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28ed5d7ece4f084ad101cf970fd1ddc3ec44043f00154d5e81e39052f3289c9d
MD5 1dc021862f59b411234a0c3e42a33972
BLAKE2b-256 9b4b8608461cadb9d69b0b53c75a17a83b5b165eee4517bb4e4a55e8f69df290

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