MCP ExplorerExplorer

Needle MCP Server

@needle-aion 11 days ago
52 MIT
FreeOfficial
Knowledge Base
#document management#search#Needle
MCP (Model Context Protocol) server to manage documents and perform searches using [Needle](https://needle-ai.com) through Claude’s Desktop Application.

Overview

What is Needle MCP Server

The Needle MCP Server is a document management protocol that enables users to organize, store, and efficiently retrieve documents using Claude’s large language model. It facilitates advanced searches within the Needle ecosystem, enhancing document management capabilities.

Use cases

Users can create collections for different types of documents, add relevant materials, and search through them using natural language queries. This is particularly useful for professionals needing quick access to information, such as technical documentation or research papers.

How to use

To use the Needle MCP Server, connect through the Claude Desktop application and issue simple commands for searching, retrieving, or modifying documents. Users can create collections, add documents, and execute searches that return user-friendly results.

Key features

Key features include intuitive document management, Claude-enabled natural language search capabilities, and seamless integration with the Claude Desktop and Needle collections for efficient document handling.

Where to use

The Needle MCP Server can be utilized in environments requiring organized document management, such as corporate or academic settings, where quick document retrieval and comprehensive search functionalities are essential for productivity.

Content

Build Agents with Needle MCP Server

smithery badge

Screenshot of Feature - Claude

MCP (Model Context Protocol) server to manage documents and perform searches using Needle through Claude’s Desktop Application.

Needle Server MCP server

Table of Contents


Overview

Needle MCP Server allows you to:

  • Organize and store documents for quick retrieval.
  • Perform powerful searches via Claude’s large language model.
  • Integrate seamlessly with the Needle ecosystem for advanced document management.

Features

  • Document Management: Easily add and organize documents on the server.
  • Search & Retrieval: Claude-based natural language search for quick answers.
  • Easy Integration: Works with Claude Desktop and Needle collections.

Usage

Commands in Claude Desktop

Below is an example of how the commands can be used in Claude Desktop to interact with the server:

Using commands in Claude Desktop

  1. Open Claude Desktop and connect to the Needle MCP Server.
  2. Use simple text commands to search, retrieve, or modify documents.
  3. Review search results returned by Claude in a user-friendly interface.

Result in Needle

https://github.com/user-attachments/assets/0235e893-af96-4920-8364-1e86f73b3e6c


Youtube Video Explanation

For a full walkthrough on using the Needle MCP Server with Claude and Claude Desktop, watch this YouTube explanation video.


Installation

Installing via Smithery

To install Needle MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install needle-mcp --client claude

Manual Installation

  1. Clone the repository:
git clone https://github.com/yourusername/needle-mcp.git
  1. Install UV globally using Homebrew in Terminal:
brew install uv
  1. Create claude_desktop_config.json:

    • For MacOS: Open directory ~/Library/Application Support/Claude/ and create the file inside it
    • For Windows: Open directory %APPDATA%/Claude/ and create the file inside it
  2. Add this configuration to 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"
      }
    }
  }
}
  1. Get your Needle API key from needle.xyz

  2. Update the config file:

    • Replace /path/to/needle-mcp with your actual repository path
    • Add your Needle API key
  3. Quit Claude completely and reopen it

Usage Examples

  • “Create a new collection called ‘Technical Docs’”
  • “Add this document to the collection, which is https://needle-ai.com
  • “Search the collection for information about AI”
  • “List all my collections”

Troubleshooting

If not working:

  • Make sure UV is installed globally (if not, uninstall with pip uninstall uv and reinstall with brew install uv)
  • Or find UV path with which uv and replace "command": "uv" with the full path
  • Verify your Needle API key is correct
  • Check if the needle-mcp path in config matches your actual repository location

Reset Claude Desktop Configuration

If you’re seeing old configurations or the integration isn’t working:

  1. Find all Claude Desktop config files:
find / -name "claude_desktop_config.json" 2>/dev/null
  1. Remove all Claude Desktop data:
  • On MacOS: rm -rf ~/Library/Application\ Support/Claude/*
  • On Windows: Delete contents of %APPDATA%/Claude/
  1. Create a fresh config with only 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
  1. Completely quit Claude Desktop (Command+Q on Mac) and relaunch it

  2. If you still see old configurations:

  • Check for additional config files in other locations
  • Try clearing browser cache if using web version
  • Verify the config file is being read from the correct location

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.

Comments