Mcp_godot_rag

Mcp_godot_rag

🚀 为 Godot RAG 搭建 MCP 服务器

本 MCP 服务器的主要功能是为 Godot RAG 模型提供 Godot 文档,助力相关开发工作的高效开展。

🚀 快速开始

🔍 屏幕快照

使用前

使用后

📦 安装指南

⚙️ MCP 服务器配置

{
"mcpServers": {
"godot-rag": {
"command": "python",
"args": [
"",
"-d",
"<你在电脑上的 chroma_db 路径>",
"-c",
""
]
}
}
}

💻 环境配置

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_BAAI-bge-m3.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

🧪 使用其他模型

  • 0 关注
  • 0 收藏,36 浏览
  • system 提出于 2025-09-19 04:45

相似服务问题

相关AI产品