mcp-rag矢量
使用Claude Desktop配置MCP
- 在GOBIN中生成代码安装:
make generate-code-design
make install-bin- 在Claude Desktop设置中配置以下内容:
{
"mcpServers": {
"greetingmcp": {
"command": "$GOPATH/bin/mcp-rag-vector",
"args": ["mcp"]
}
}
}本地使用ollama
- 安装ollama并运行
ollama serve
- 启动堆栈
docker compose up -d --build- 等待模型下载(2 GB)
- 查询API
curl -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.2:3b",
"messages": [
{ "role": "user", "content": "Use the greet tool with my name thomas, return what it says" }
],
"stream": false
}'通过cURL查询MCP
- 启动API
docker-commpose up 或 make run-server
- 使用
make http-call-mcp
