Home

Awesome

Needle MCP server

An MCP server to manage documents and perform semantic search through Claude chat using Needle.

Examples

How we use the commands in Claudie Desktop

<img width="592" alt="Screenshot 2024-12-17 at 12 25 03 PM" src="https://github.com/user-attachments/assets/9e0ce522-6675-46d9-9bfb-3162d214625b" />

You set up this collection in Needle via Claude

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

Quick Setup

  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

Troubleshooting

If not working:

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:
  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: