Cover image
Try Now
2025-03-18

Un serveur Python MCP pour la gestion des notes

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • OffchainLabs
  • Aller la mise en œuvre de la preuve de la participation Ethereum

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

  • deemkeen
  • Contrôlez votre MBOT2 avec un combo d'alimentation: MQTT + MCP + LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocole de connecteur de message) 服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

    Reviews

    5 (1)
    Avatar
    user_zweV3bsD
    2025-04-16

    As a loyal user of Remote MCP Server on Cloudflare, I am thoroughly impressed by its seamless performance and the robust security it offers. The integration was straightforward, and it significantly improved the efficiency of managing my projects. Highly recommend it for anyone in need of a reliable server solution!