Sponsored by Deepsite.site

PinThePiece MCP server

Created By
psaboia9 months ago
A Python MCP server for note management
Content

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

Development/Unpublished Servers Configuration ``` "mcpServers": { "pinthepiece": { "command": "uv", "args": [ "--directory", "/Users/pmoreira/create-python-server/pinthepiece", "run", "pinthepiece" ] } } ```
Published Servers Configuration ``` "mcpServers": { "pinthepiece": { "command": "uvx", "args": [ "pinthepiece" ] } } ```

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

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

  1. 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
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
Tavily Mcp
Playwright McpPlaywright MCP server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.