这是一个管理文档并通过Claude聊天进行语义搜索的MCP(管理控制平面)服务器,可有效提升文档管理与搜索的效率。
git clone https://github.com/yourusername/needle-mcp.git
brew install uv
claude_desktop_config.json文件:
~/Library/Application Support/Claude/并在其中创建文件。%APPDATA%/Claude/并在其中创建文件。claude_desktop_config.json中:{
"mcpServers": {
"needle_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/needle-mcp",
"run",
"needle-mcp"
],
"env": {
"NEEDLE_API_KEY": "your_needle_api_key"
}
}
}
}
/path/to/needle-mcp替换为实际的仓库路径。如果未正常工作:
pip uninstall uv卸载并重新使用brew install uv安装)。"command": "uv"为完整路径,例如:$ which uv。如果看到旧的配置或集成不工作:
find / -name "claude_desktop_config.json" 2>/dev/null
rm -rf ~/Library/Application\ Support/Claude/*%APPDATA%/Claude/目录下的内容。mkdir -p ~/Library/Application\ Support/Claude
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json
<< 'EOL'
{
"mcpServers": {
"needle_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/needle-mcp",
"run",
"needle-mcp"
],
"env": {
"NEEDLE_API_KEY": "your_needle_api_key"
}
}
}
}
EOL