MCP(模型上下文协议)服务器通过 Needle 和 Claude 的桌面应用程序来管理和搜索文档。
<a href="https://glama.ai/mcp/servers/5jw1t7hur2"> <img width="380" height="200" src="https://gips2.baidu.com/it/u=2909263281,921019248&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Needle Server MCP 服务器" /> </a>Needle MCP 服务器允许您:
MCP(模型上下文协议)标准化了 LLM 连接到外部数据源的方式。您可以使用 Needle MCP 服务器轻松启用您的 AI 应用程序中的语义搜索工具,使埋藏在 PDF、DOCX、XLSX 和其他文件中的数据立即可被 LLM 访问。
我们推荐使用我们的远程 MCP 服务器,以获得最佳体验——无需本地设置。
以下是如何在 Claude 桌面中使用命令与服务器交互的示例:
https://github.com/user-attachments/assets/0235e893-af96-4920-8364-1e86f73b3e6c
要了解如何使用 Needle MCP 服务器与 Claude 和 Claude 桌面,请观看此 YouTube 解释视频。
Claude 桌面配置
创建或更新您的配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"needle": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.needle.app/mcp",
"--header",
"Authorization:Bearer ${NEEDLE_API_KEY}"
],
"env": {
"NEEDLE_API_KEY": "<your-needle-api-key>"
}
}
}
}
Cursor 配置
创建或更新 .cursor/mcp.json:
{
"mcpServers": {
"needle": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.needle.app/mcp",
"--header",
"Authorization:${NEEDLE_AUTH_HEADER}"
],
"env": {
"NEEDLE_AUTH_HEADER": "Bearer <your-needle-api-key>"
}
}
}
}
从 Needle 设置 获取您的 API 密钥。
我们提供两个端点:
https://mcp.needle.app/mcp(推荐)https://mcp.needle.app/sse注意:MCP 在最新规范中弃用了 SSE 端点,因此新客户端应优先选择流式 HTTP 端点。
git clone https://github.com/needle-ai/needle-mcp.git
brew install uv
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonClaude 桌面配置
{
"mcpServers": {
"needle": {
"command": "uv",
"args": ["--directory", "/path/to/needle-mcp", "run", "needle-mcp"],
"env": {
"NEEDLE_API_KEY": "<your-needle-api-key>"
}
}
}
}
Cursor 配置
{
"mcpServers": {
"needle": {
"command": "uv",
"args": ["--directory", "/path/to/needle-mcp", "run", "needle-mcp"],
"env": {
"NEEDLE_API_KEY": "<your-needle-api-key>"
}
}
}
}
/path/to/needle-mcp 替换为您实际的仓库路径通过 Smithery 安装
npx -y @smithery/cli install needle-mcp --client claude
git clone https://github.com/needle-ai/needle-mcp.git
cd needle-mcp
docker build -t needle-mcp .
~/Library/Application Support/Claude/claude_desktop_config.json):{
"mcpServers": {
"needle": {
"command": "docker",
"args": ["run", "--rm", "-i", "needle-mcp"],
"env": {
"NEEDLE_API_KEY": "<your-needle-api-key>"
}
}
}
}
如果不起作用:
uv(如果没有,使用 pip uninstall uv 卸载,然后使用 brew install uv 重新安装)which uv 查找 uv 路径,并替换 "command": "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": {
"command": "uv",
"args": [
"--directory",
"/path/to/needle-mcp",
"run",
"needle-mcp"
],
"env": {
"NEEDLE_API_KEY": "your_needle_api_key"
}
}
}
}
EOL
完全退出 Claude 桌面(Mac 上使用 Command+Q),然后重新启动它
如果仍然看到旧配置: