
Needle MCP Server官方
一个服务器,允许用户通过 Claude 桌面应用程序管理文档并使用 Needle 执行 Claude 驱动的搜索。
Tools
needle_list_collections
Retrieve a complete list of all Needle document collections accessible to your account. Returns detailed information including collection IDs, names, and creation dates. Use this tool when you need to: - Get an overview of available document collections - Find collection IDs for subsequent operations - Verify collection existence before performing operations The response includes metadata that's required for other Needle operations.
needle_create_collection
Create a new document collection in Needle for organizing and searching documents. A collection acts as a container for related documents and enables semantic search across its contents. Use this tool when you need to: - Start a new document organization - Group related documents together - Set up a searchable document repository Returns a collection ID that's required for subsequent operations. Choose a descriptive name that reflects the collection's purpose for better organization.
needle_get_collection_details
Fetch comprehensive metadata about a specific Needle collection. Provides detailed information about the collection's configuration, creation date, and current status. Use this tool when you need to: - Verify a collection's existence and configuration - Check collection metadata before operations - Get creation date and other attributes Requires a valid collection ID and returns detailed collection metadata. Will error if collection doesn't exist.
needle_get_collection_stats
Retrieve detailed statistical information about a Needle collection's contents and status. Provides metrics including: - Total number of documents - Processing status of documents - Storage usage and limits - Index status and health Use this tool to: - Monitor collection size and growth - Verify processing completion - Check collection health before operations Essential for ensuring collection readiness before performing searches.
needle_list_files
List all documents stored within a specific Needle collection with their current status. Returns detailed information about each file including: - File ID and name - Processing status (pending, processing, complete, error) - Upload date and metadata Use this tool when you need to: - Inventory available documents - Check processing status of uploads - Get file IDs for reference - Verify document availability before searching Essential for monitoring document processing completion before performing searches.
needle_add_file
Add a new document to a Needle collection by providing a URL for download. Supports multiple file formats including: - PDF documents - Microsoft Word files (DOC, DOCX) - Plain text files (TXT) - Web pages (HTML) The document will be: 1. Downloaded from the provided URL 2. Processed for text extraction 3. Indexed for semantic search Use this tool when you need to: - Add new documents to a collection - Make documents searchable - Expand your knowledge base Important: Documents require processing time before they're searchable. Check processing status using needle_list_files before searching new content.
needle_search
Perform intelligent semantic search across documents in a Needle collection. This tool uses advanced embedding technology to find relevant content based on meaning, not just keywords. The search: - Understands natural language queries - Finds conceptually related content - Returns relevant text passages with source information - Ranks results by semantic relevance Use this tool when you need to: - Find specific information within documents - Answer questions from document content - Research topics across multiple documents - Locate relevant passages and their sources More effective than traditional keyword search for: - Natural language questions - Conceptual queries - Finding related content Returns matching text passages with their source file IDs.
README
使用 Needle MCP 服务器构建代理
MCP (模型上下文协议) 服务器,用于管理文档并使用 Needle 通过 Claude 的桌面应用程序执行搜索。
目录
概述
Needle MCP 服务器允许您:
- 组织和存储文档以便快速检索。
- 通过 Claude 的大型语言模型执行强大的搜索。
- 与 Needle 生态系统无缝集成,实现高级文档管理。
功能
- 文档管理: 在服务器上轻松添加和组织文档。
- 搜索与检索: 基于 Claude 的自然语言搜索,可快速获得答案。
- 易于集成: 与 Claudie Desktop 和 Needle 集合配合使用。
用法
Claudie Desktop 中的命令
以下是如何在 Claudie Desktop 中使用命令与服务器交互的示例:
- 打开 Claudie Desktop 并连接到 Needle MCP 服务器。
- 使用简单的文本命令 来搜索、检索或修改文档。
- 查看 Claude 在用户友好的界面中返回的搜索结果。
Needle 中的结果
https://github.com/user-attachments/assets/0235e893-af96-4920-8364-1e86f73b3e6c
Youtube 视频说明
有关使用 Needle MCP 服务器与 Claude 和 Claudie Desktop 的完整演练,请观看此 YouTube 说明视频。
安装
- 克隆存储库:
git clone https://github.com/yourusername/needle-mcp.git
- 使用 Homebrew 在终端中全局安装 UV:
brew install uv
-
创建 claude_desktop_config.json:
- 对于 MacOS:打开目录
~/Library/Application Support/Claude/
并在其中创建文件 - 对于 Windows:打开目录
%APPDATA%/Claude/
并在其中创建文件
- 对于 MacOS:打开目录
-
将此配置添加到 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"
}
}
}
}
-
从 needle.xyz 获取您的 Needle API 密钥
-
更新配置文件:
- 将
/path/to/needle-mcp
替换为您的实际存储库路径 - 添加您的 Needle API 密钥
- 将
-
完全退出 Claude 并重新打开它
使用示例
- "创建一个名为 'Technical Docs' 的新集合"
- "将此文档添加到集合,网址为 https://needle-ai.com"
- "在集合中搜索有关 AI 的信息"
- "列出我的所有集合"
故障排除
如果无法正常工作:
- 确保 UV 已全局安装(如果未安装,请使用
pip uninstall uv
卸载,然后使用brew install uv
重新安装) - 或者使用
which uv
查找 UV 路径,并将"command": "uv"
替换为完整路径 - 验证您的 Needle API 密钥是否正确
- 检查配置中的 needle-mcp 路径是否与您的实际存储库位置匹配
重置 Claude Desktop 配置
如果您看到旧的配置或集成不起作用:
- 查找所有 Claude Desktop 配置文件:
find / -name "claude_desktop_config.json" 2>/dev/null
- 删除所有 Claude Desktop 数据:
- 在 MacOS 上:
rm -rf ~/Library/Application\ Support/Claude/*
- 在 Windows 上:删除
%APPDATA%/Claude/
的内容
- 创建一个仅包含 Needle 的新配置:
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
-
完全退出 Claude Desktop(在 Mac 上使用 Command+Q)并重新启动它
-
如果您仍然看到旧的配置:
- 检查其他位置是否有其他配置文件
- 如果使用 Web 版本,请尝试清除浏览器缓存
- 验证是否从正确的位置读取配置文件
推荐服务器
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
serper-search-scrape-mcp-server
这个 Serper MCP 服务器支持搜索和网页抓取,并且支持 Serper API 引入的所有最新参数,例如位置。
The Verge News MCP Server
提供从The Verge的RSS feed获取和搜索新闻的工具,允许用户获取今日新闻、检索过去一周的随机文章,以及在最近的Verge内容中搜索特定关键词。
Crypto Price & Market Analysis MCP Server
一个模型上下文协议 (MCP) 服务器,它使用 CoinCap API 提供全面的加密货币分析。该服务器通过一个易于使用的界面提供实时价格数据、市场分析和历史趋势。 (Alternative, slightly more formal and technical translation): 一个模型上下文协议 (MCP) 服务器,利用 CoinCap API 提供全面的加密货币分析服务。该服务器通过用户友好的界面,提供实时价格数据、市场分析以及历史趋势数据。
MCP PubMed Search
用于搜索 PubMed 的服务器(PubMed 是一个免费的在线数据库,用户可以在其中搜索生物医学和生命科学文献)。 我是在 MCP 发布当天创建的,但当时正在度假。 我看到有人在您的数据库中发布了类似的服务器,但还是决定发布我的服务器。
MCP DuckDB Knowledge Graph Memory Server
一个为 Claude 设计的记忆服务器,它使用 DuckDB 存储和检索知识图谱数据,从而增强了对话的性能和查询能力,并能持久保存用户信息。
Tavily MCP Server
使用 Tavily 的搜索 API 提供 AI 驱动的网络搜索功能,使 LLM 能够执行复杂的网络搜索、获得问题的直接答案以及搜索最近的新闻文章。
mixpanel
连接到您的 Mixpanel 数据。 从 Mixpanel 分析查询事件、留存和漏斗数据。