PinThePiece MCP server

by psaboia

1 stars
250 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server that provides a sophisticated note management system with hierarchical storage, atomic operations, versioning, automatic backups, and comprehensive search capabilities. It is designed for users who need a reliable, local note storage…

Details

Author
psaboia
GitHub stars
1
Downloads
250
Categories
Other

- Hierarchical storage structure for organized note management
- Atomic file operations and automatic backups for data integrity
- Versioning and metadata support per note
- Concurrent access handling with file locking
- Custom note:// URI scheme for accessing individual notes
- Add-note tool and summarize-notes prompt

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PinThePiece MCP server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the package via uvx or a local uv directory, then add it to the MCP server configuration in claude_desktop_config.json under the mcpServers key. The server exposes the add-note tool for creating notes and the summarize-notes prompt for generating summaries.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pinthepiece mcp server": {
            "PinThePiece": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "PinThePiece": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

PinThePiece MCP server

A robust Model Context Protocol (MCP) server that provides a sophisticated note management system. This server implements a feature-rich note storage solution with emphasis on data integrity, organization, and accessibility. Key features include hierarchical storage, atomic operations, versioning support, automatic backups, and comprehensive search capabilities.

Features

Note Storage System

The server implements a sophisticated note storage system with:
- Hierarchical storage structure for better organization and scalability
- Atomic file operations for data integrity
- Versioning and metadata support
- Automatic backups
- Concurrent access handling
- Comprehensive logging

Storage Structure

~/.pinthepiece/
├── notes/
│   ├── data/
│   │   └── YEAR/
│   │       └── MONTH/
│   │           └── note-name.json
│   ├── backups/
│   │   └── note-name.json.TIMESTAMP.bak
│   └── index.json
└── logs/
    └── notes.log

Note Format

Each note is stored as a JSON file with: - Content: The main text of the note - Created/Modified timestamps - Tags for organization - Description (optional) - Metadata including: - Format version - Last backup timestamp - Content checksum

Resources

The server implements a note storage system with:
- Custom note:// URI scheme for accessing individual notes
- Each note resource has:
- Name: Unique identifier
- Content: Main text content
- Description: Optional description
- Tags: List of categorization tags
- Metadata: Version and integrity information
- MIME type: text/plain

Data Safety Features

- Atomic Operations: All file writes use atomic operations to prevent corruption
- Backup System: Automatic backups before modifications
- Version Control: File format versioning for future compatibility
- Data Validation: Checksum verification and integrity checks
- Concurrent Access: File locking for thread safety
- Error Recovery: Transaction-like operations with rollback capability

Prompts

The server provides a single prompt:
- summarize-notes: Creates summaries of all stored notes
- Optional "style" argument to control detail level (brief/detailed)
- Generates prompt combining all current notes with style preference

Tools

The server implements one tool:
- add-note: Adds a new note to the server
- Takes "name" and "content" as required string arguments
- Optional "tags" and "description" arguments
- Updates server state and notifies clients of resource changes
- Performs atomic file operations with backup creation

Configuration

Storage Location

By default, the server stores notes in: - ~/.pinthepiece/notes/ - Main storage directory - ~/.pinthepiece/logs/ - Log files

Logging

- Detailed logging of all operations - Log rotation for space management - Both file and console logging available - Configurable log levels

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

<details>
<summary>Development/Unpublished Servers Configuration</summary>

  "mcpServers": {
"pinthepiece": {
"command": "uv",
"args": [
"--directory",
"/Users/pmoreira/create-python-server/pinthepiece",
"run",
"pinthepiece"
]
}
}

</details>

<details>
<summary>Published Servers Configuration</summary>

  "mcpServers": {
"pinthepiece": {
"command": "uvx",
"args": [
"pinthepiece"
]
}
}

</details>

Development

Building and Publishing

To prepare the package for distribution:

1. Sync dependencies and update lockfile:

uv sync

2. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

3. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: --token or UV_PUBLISH_TOKEN
- Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/pmoreira/create-python-server/pinthepiece run pinthepiece

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Error Handling

The server implements comprehensive error handling:
- Detailed error logging with stack traces
- Automatic cleanup of temporary files
- Recovery from interrupted operations
- Backup restoration capability
- Data validation on load/save

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.