Skip to content

mailshieldai/paste-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Paste RAG

An MCP server for querying the Paste app clipboard history on macOS.

Features

  • Full-text search - Search clipboard content using SQLite FTS
  • Recent items - Get most recent clipboard entries
  • Filter by app - Find items copied from specific applications
  • Filter by type - Filter by Text, Link, Color, Image, or File
  • Date range queries - Find items from specific time periods
  • Statistics - Get overview of clipboard history

Installation

Prerequisites

Install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh

Claude Code (Global Install)

claude mcp add paste-rag -- uvx --from git+https://github.com/mailshieldai/paste-rag paste-rag

OpenCode

Add to ~/.config/opencode/opencode.jsonc:

{
  "mcp": {
    "paste-rag": {
      "type": "local",
      "command": [
        "uvx",
        "--from",
        "git+https://github.com/mailshieldai/paste-rag",
        "paste-rag"
      ]
    }
  }
}

Claude Desktop / Cursor

Add to your MCP config (claude_desktop_config.json or Cursor settings):

{
  "mcpServers": {
    "paste-rag": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mailshieldai/paste-rag", "paste-rag"]
    }
  }
}

Run Directly

uvx --from git+https://github.com/mailshieldai/paste-rag paste-rag

Local Installation

If you prefer to clone and run locally:

git clone https://github.com/mailshieldai/paste-rag.git
cd paste-rag
uv run paste-rag

Available Tools

search_clipboard

Search clipboard history by text content using full-text search.

Parameters:

  • query (required): Search query
  • limit: Max results (default: 20)
  • app_filter: Filter by app name
  • type_filter: Filter by type (Text, Link, Color, Image, File)

get_recent_clipboard

Get the most recent clipboard entries.

Parameters:

  • limit: Number of items (default: 20)
  • app_filter: Filter by app name
  • type_filter: Filter by type
  • include_content: Include full content (default: true)

get_clipboard_by_date_range

Get clipboard entries within a date range.

Parameters:

  • start_date (required): Start date (YYYY-MM-DD)
  • end_date (required): End date (YYYY-MM-DD)
  • limit: Max results (default: 50)
  • app_filter: Filter by app
  • type_filter: Filter by type

get_clipboard_stats

Get statistics about clipboard history (counts by type, top apps, date range).

get_clipboard_item

Get a specific clipboard item by ID.

Parameters:

  • item_id (required): The unique ID of the item

search_clipboard_by_app

Get all clipboard entries from a specific application.

Parameters:

  • app_name (required): Application name (partial match)
  • limit: Max results (default: 30)

list_source_apps

List all applications that have contributed to clipboard history.

Database Location

The server automatically detects the Paste app database. Supported locations:

  • ~/Library/Application Support/com.wiheads.paste-setapp/index.sqlite (Setapp)
  • ~/Library/Application Support/com.wiheads.paste/index.sqlite (Direct)
  • ~/Library/Containers/com.wiheads.paste/... (App Store)
  • ~/Library/Group Containers/group.com.wiheads.paste/... (Shared)

Development

git clone https://github.com/mailshieldai/paste-rag.git
cd paste-rag
uv sync
uv run paste-rag

# With FastMCP Inspector
uv run fastmcp dev src/paste_rag/server.py

License

MIT

About

MCP server for querying Paste app clipboard history

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages