WindTools 代码助手的 MCP 服务器,借助 ChromaDB 和句子转换器,提供文档嵌入和检索功能,有效助力代码搜索与管理。
服务器启动时,会自动从指定目录读取代码文件,并将其嵌入到 ChromaDB 中。你需要确保所有环境变量正确配置,特别是 WINDTOOLS_HOME 和 CHROMA_DB_URL。启动后,服务器会监听特定端口,等待客户端连接和请求。
pip install chroma-db sentence-transformers
python -m windtools_mcp.server start
export WINDTOOLS_HOME=/path/to/windtools
export CHROMA_DB_URL=http://localhost:8000
WINDTOOLS_HOME:指定 WindTools 的安装目录,默认为当前工作目录。CHROMA_DB_URL:ChromaDB 服务的 URL 地址,默认为本地运行的实例。SENTENCE_CONVERTER_PATH:句子转换器的可执行文件路径,必须可执行。pip install chroma-db sentence-transformers
python -m windtools_mcp.server start
export WINDTOOLS_HOME=/path/to/windtools
export CHROMA_DB_URL=http://localhost:8000
curl -X POST http://localhost:5000/api/list_dir
python scripts/index_codebase.py --directory /path/to/your/code
list_dirdirectory_path (字符串):要列出内容的绝对路径,应为目录路径。get_file_contentfile_path (字符串):目标文件的绝对路径。search_codekeywords (列表):要搜索的关键词列表。WINDTOOLS_HOME 和 CHROMA_DB_URL。本 MCP 服务器遵循 MIT 许可证。这意味着您可以自由使用、修改和分发软件,但需遵守 MIT 许可证的条款和条件。
pytest tests/
src/
windtools_mcp/
__init__.py
__main__.py
server.py
tests/
test_client.py
test_unit.py
.github/
workflows/
publish.yml
test.yml
.gitignore
.python-version
pyproject.toml
README.md
VERSION
VERSION 文件中。VERSION 文件中的版本号。main 分支。v{VERSION} 的 Git 标签。