### Installing Pocket Pick Dependencies (bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Provides the necessary bash commands to clone the Pocket Pick repository from GitHub and install its dependencies using the `uv` package manager. Requires `uv` to be installed beforehand. ```bash # Clone the repository git clone https://github.com/indydevdan/pocket-pick.git cd pocket-pick # Install dependencies uv sync ``` -------------------------------- ### Running Server (Default) (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Start the Pocket Pick MCP server using uv run mcp-server-pocket-pick. ```Bash # Start the MCP server uv run mcp-server-pocket-pick ``` -------------------------------- ### Example Pocket Pick Find Commands Source: https://github.com/disler/pocket-pick/blob/main/specs/pocket-pick-v1.md These examples demonstrate how to use the 'pocket find' command with different search modes: substring, full text search (fts), glob, regex, and exact matching. ```Shell # basic sqlite substring search pocket find "test" --mode substr # full text search pocket find "test" --mode fts # glob search pocket find "test*" --mode glob # regex search pocket find "^start.*test.*$" --mode regex # exact search pocket find "match exactly test" --mode exact ``` -------------------------------- ### Running Server (Verbose) (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Start the Pocket Pick MCP server with verbose logging using uv run mcp-server-pocket-pick -v. ```Bash # With verbose logging uv run mcp-server-pocket-pick -v ``` -------------------------------- ### Running Server (Custom DB) (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Start the Pocket Pick MCP server using a custom database file location using uv run mcp-server-pocket-pick --database. ```Bash # With custom database location uv run mcp-server-pocket-pick --database ./database.db ``` -------------------------------- ### Defining Pocket Pick CLI API Source: https://github.com/disler/pocket-pick/blob/main/specs/pocket-pick-v1.md This section outlines the command-line interface for Pocket Pick, detailing the available commands such as 'add', 'find', 'list', 'list-tags', 'remove', 'get', and 'backup', along with their respective arguments and options. ```Shell pocket add \ --tags, t: str[] (optional) --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket find \ --mode: substr | fts | glob | regex | exact (optional) \ --limit, -l: number = 5 \ --info, -i: bool (show with metadata like id) \ --tags, -t: str[] (optional) \ --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket list \ --tags, -t: str[] (optional) \ --limit, -l: number = 100 \ --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket list-tags \ --limit, -l: number = 1000 \ --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket remove \ --id, -i: str \ --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket get \ --id, -i: str \ --db: str = DEFAULT_SQLITE_DATABASE_PATH pocket backup \ --db: str = DEFAULT_SQLITE_DATABASE_PATH ``` -------------------------------- ### Adding Pocket Pick Server to Claude Code (bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Provides bash commands using the `claude` CLI to add the Pocket Pick MCP server, with options for specifying the server directory and a custom database location. Includes commands to list servers and start Claude Code. ```bash # Add the pocket-pick server to Claude Code (if you're in the directory) claude mcp add pocket-pick -- \ uv --directory . \ run mcp-server-pocket-pick # Add the pocket-pick server to Claude Code claude mcp add pocket-pick -- \ uv --directory /path/to/pocket-pick-codebase \ run mcp-server-pocket-pick # With custom database location claude mcp add pocket-pick -- \ uv --directory /path/to/pocket-pick-codebase \ run mcp-server-pocket-pick --database ./database.db # List existing MCP servers - Validate that the server is running claude mcp list # Start claude code claude ``` -------------------------------- ### Example Command with ID - Pocket Pick Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Example command demonstrating how to add an item to Pocket Pick using a natural language interface, specifying both the item content and a unique ID. ```Command Add "claude mcp list" as a pocket pick item with ID "claude-mcp-list". tags: mcp, claude, code ``` -------------------------------- ### Getting Item by ID (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Retrieve a specific Pocket Pick item using its unique ID. Replace the placeholder ID with the actual item ID. ```Command Line get the pocket pick item with ID 1234-5678-90ab-cdef ``` -------------------------------- ### Running Project Validation Commands Source: https://github.com/disler/pocket-pick/blob/main/specs/pocket-pick-v1.md These commands show how to use the 'uv run' tool to execute project validation steps, specifically running the pytest suite and checking the help output of the MCP server. ```Shell uv run pytest uv run mcp-server-pocket-pick --help ``` -------------------------------- ### Backing Up Database (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Create a backup of the Pocket Pick SQLite database. Requires specifying the desired backup file path. ```Command Line backup the pocket pick database to ~/Documents/pocket-pick-backup.db ``` -------------------------------- ### Running Tests (Default) (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Execute all tests for the Pocket Pick project using uv run pytest. ```Bash # Run all tests uv run pytest ``` -------------------------------- ### Running Tests (Verbose) (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Execute all tests with verbose output using uv run pytest -v. ```Bash # Run with verbose output uv run pytest -v ``` -------------------------------- ### Adding Fetch Server (Bash) Source: https://github.com/disler/pocket-pick/blob/main/README.md Add the http-fetch MCP server using the claude mcp add command. ```Bash claude mcp add http-fetch -- uvx mcp-server-fetch ``` -------------------------------- ### Configuring Pocket Pick in .mcp.json (Default DB) (json) Source: https://github.com/disler/pocket-pick/blob/main/README.md JSON configuration snippet for integrating the Pocket Pick MCP server into a project's `.mcp.json` file, using the default database location. This allows Claude Code to automatically discover and use the server. ```json { "servers": { "pocket-pick": { "command": "uv", "args": ["--directory", "/path/to/pocket-pick", "run", "mcp-server-pocket-pick"] } } } ``` -------------------------------- ### Finding Items (Exact Search) (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for items using exact string matching. Finds items where the content is exactly the specified string. ```Command Line Find items containing "match exactly test" using exact string matching ``` -------------------------------- ### Finding Items (Regex Search) (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for items using regular expression matching. Allows complex pattern matching. ```Command Line Find items containing "^start.*test.*$" using regular expression matching ``` -------------------------------- ### Configuring Pocket Pick MCP Server (Custom DB) (json) Source: https://github.com/disler/pocket-pick/blob/main/README.md JSON configuration for running the Pocket Pick MCP server using a specified custom SQLite database file. This allows users to manage multiple knowledge bases or store the database in a preferred location. ```json { "command": "uv", "args": ["--directory", ".", "run", "mcp-server-pocket-pick", "--database", "./database.db"] } ``` -------------------------------- ### Finding Items by Tags (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for Pocket Pick items filtered by specified tags. Requires listing the tags after the command. ```Command Line List pocket pick items with python and mcp tags ``` -------------------------------- ### Exporting Item Content to File (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Save the content of a Pocket Pick item to a local file using its ID. Requires specifying the item ID and an absolute file path. ```Command Line export the pocket pick item with ID 1234-5678-90ab-cdef to /Users/username/Documents/exported-snippet.py ``` -------------------------------- ### Configuring Pocket Pick MCP Server (Default DB) (json) Source: https://github.com/disler/pocket-pick/blob/main/README.md JSON configuration for running the Pocket Pick MCP server using the default SQLite database location. This format is suitable for tools like Claude Code that accept server configurations in JSON. ```json { "command": "uv", "args": ["--directory", ".", "run", "mcp-server-pocket-pick"] } ``` -------------------------------- ### Finding Items (Glob Search) (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for items using SQLite glob pattern matching. Allows using wildcards like * and ?. ```Command Line Find items containing "test*" using glob pattern matching ``` -------------------------------- ### Configuring Pocket Pick in .mcp.json (Custom DB) (json) Source: https://github.com/disler/pocket-pick/blob/main/README.md JSON configuration snippet for integrating the Pocket Pick MCP server into a project's `.mcp.json` file, specifying a custom database location. This is useful when the database is not in the default location relative to the server code. ```json { "servers": { "pocket-pick": { "command": "uv", "args": ["--directory", "/path/to/pocket-pick", "run", "mcp-server-pocket-pick", "--database", "./custom-database.db"] } } } ``` -------------------------------- ### Finding Items (Full-Text Search) (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for items using full-text search (fts) mode. Can match words in any order or exact phrases using quotes. ```Command Line Find items containing "def fibonacci" using full text search ``` -------------------------------- ### Pocket Pick Database Schema (SQL) Source: https://github.com/disler/pocket-pick/blob/main/README.md Defines the structure of the POCKET_PICK table in the SQLite database. Includes columns for ID, creation timestamp, text content, and tags. ```SQL CREATE TABLE POCKET_PICK ( id TEXT PRIMARY KEY, -- UUID identifier created TIMESTAMP NOT NULL, -- Creation timestamp text TEXT NOT NULL, -- Item content tags TEXT NOT NULL -- JSON array of tags ) ``` -------------------------------- ### Finding Items by Text (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for Pocket Pick items containing specific text content. The text to search for should be enclosed in double quotes. ```Command Line pocket pick find "python" ``` -------------------------------- ### Finding Items (Substring Search) (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Search for items using the default substring matching mode. Finds items where the content contains the specified substring. ```Command Line Find items containing "pyt" using substring matching ``` -------------------------------- ### Defining SQLite Database Schema Source: https://github.com/disler/pocket-pick/blob/main/specs/pocket-pick-v1.md This snippet defines the structure for the POCKET_PICK table in the SQLite database. It includes fields for a unique ID, creation timestamp, the main text content, and an array of tags. ```SQL CREATE TABLE if not exists POCKET_PICK { id: str, created: datetime, text: str, tags: str[], } ``` -------------------------------- ### Updating PocketAddFile Server Model in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Modifies the `PocketAddFile` Pydantic model used in the server API to include a mandatory `id` field of type `str`, alongside existing fields for file path, tags, and database path. This reflects the requirement for an ID in the server's input validation for adding file items. ```python class PocketAddFile(BaseModel): id: str # New required field file_path: str tags: List[str] = [] db: str = str(DEFAULT_SQLITE_DATABASE_PATH) ``` -------------------------------- ### Removing Item by ID (Command Line) Source: https://github.com/disler/pocket-pick/blob/main/README.md Delete a specific Pocket Pick item using its unique ID. Replace the placeholder ID with the actual item ID. ```Command Line remove the pocket pick item with ID 1234-5678-90ab-cdef ``` -------------------------------- ### Updating AddFileCommand Data Model in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Modifies the `AddFileCommand` Pydantic model to include a mandatory `id` field of type `str`, alongside existing fields for file path, tags, and database path. This ensures that any command object created for adding file items must now provide an ID. ```python class AddFileCommand(BaseModel): id: str # New required field file_path: str tags: List[str] = [] db_path: Path = DEFAULT_SQLITE_DATABASE_PATH ``` -------------------------------- ### Updating PocketAdd Server Model in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Modifies the `PocketAdd` Pydantic model used in the server API to include a mandatory `id` field of type `str`, alongside existing fields for text, tags, and database path. This reflects the requirement for an ID in the server's input validation for adding text items. ```python class PocketAdd(BaseModel): id: str # New required field text: str tags: List[str] = [] db: str = str(DEFAULT_SQLITE_DATABASE_PATH) ``` -------------------------------- ### Updating AddCommand Data Model in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Modifies the `AddCommand` Pydantic model to include a mandatory `id` field of type `str`, alongside existing fields for text, tags, and database path. This ensures that any command object created for adding text items must now provide an ID. ```python class AddCommand(BaseModel): id: str # New required field text: str tags: List[str] = [] db_path: Path = DEFAULT_SQLITE_DATABASE_PATH ``` -------------------------------- ### Passing ID in call_tool for PocketTools.ADD_FILE in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Updates the server's `call_tool` function logic for the `PocketTools.ADD_FILE` case. It shows how to extract the mandatory `id` from the `arguments` dictionary and pass it when creating the `AddFileCommand` object, ensuring the provided ID is used for the add file operation. ```python # In PocketTools.ADD_FILE case: command = AddFileCommand( id=arguments["id"], # Pass the ID from arguments file_path=arguments["file_path"], tags=arguments.get("tags", []), db_path=db_path ) ``` -------------------------------- ### Passing ID in call_tool for PocketTools.ADD in Python Source: https://github.com/disler/pocket-pick/blob/main/specs/require-id-during-add-feature.md Updates the server's `call_tool` function logic for the `PocketTools.ADD` case. It shows how to extract the mandatory `id` from the `arguments` dictionary and pass it when creating the `AddCommand` object, ensuring the provided ID is used for the add operation. ```python # In PocketTools.ADD case: command = AddCommand( id=arguments["id"], # Pass the ID from arguments text=arguments["text"], tags=arguments.get("tags", []), db_path=db_path ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.