返回市场
麦普戈多悬垂

麦普戈多悬垂

作者:weekitmo19 星标更新:2025-06-17

项目介绍

用于Godot RAG的MCP服务器

此MCP服务器用于向Godot RAG模型提供Godot文档。

截图

使用前

before

使用后

after

MCP服务器配置

{
  "mcpServers": {
    "godot-rag": {
      "command": "python",
      "args": [
        "<指向服务器脚本'main.py'的路径>",
        "-d",
        "<指向计算机上chroma_db的路径>",
        "-c",
        "<chroma_db中集合的名称>"
      ]
    }
  }
}

安装

uv venv --python 3.12
source ./.venv/bin/activate
uv sync
cp .env.example .env.local

初始化步骤

# 克隆Godot文档
python download_godot_docs.py
# 将rst转换为markdown
python convert_rst2md.py
# 切割markdown文件
python chunker.py -i artifacts
# 创建向量数据库
python vectorizer.py -i artifacts/chunks/artifacts_chunks_SZ_400_O_20.jsonl
# python vectorizer_api.py -i artifacts/chunks/artifacts_chunks_SZ_400_O_20.jsonl -m BAAI/bge-m3
# 启动mcp服务器
python main.py -d artifacts/vector_stores/chroma_db -c artifacts_chunks_SZ_400_O_20_all-MiniLM-L6-v2
# python main_with_api.py -d artifacts/vector_stores/chroma_db -c artifacts_chunks_SZ_400_O_20_BAAI-bge-m3 -k <你的openai api密钥>

调试

npx @modelcontextprotocol/inspector \
  uv \
  --directory . \
  run \
  main.py \
  --chromadb-path artifacts/vector_stores/chroma_db \
  --collection-name artifacts_chunks_SZ_400_O_20_all-MiniLM-L6-v2

使用其他模型

其他

mcp_godot_rag已由MCP Review索引并认证。