Skip to content

Comments

feat: Add ClipboardService for clipboard operations#137

Open
alexey1312 wants to merge 2 commits intomattt:mainfrom
alexey1312:alexey1312/add-clipboard-service
Open

feat: Add ClipboardService for clipboard operations#137
alexey1312 wants to merge 2 commits intomattt:mainfrom
alexey1312:alexey1312/add-clipboard-service

Conversation

@alexey1312
Copy link

Description

Adds a new ClipboardService that exposes clipboard functionality via MCP tools, enabling read, write, and type listing operations.

  • Add ClipboardService with three tools: clipboard_read, clipboard_write, clipboard_types
  • Support reading text, images (TIFF/PNG), and file URLs from clipboard
  • Handle edge cases: empty clipboard, unsupported content types, and unavailable pasteboard
  • Integrate service into ServerController

Introduce `ClipboardService` to enable clipboard management, such as
reading, writing, and listing clipboard contents. Update
`ServerController` to integrate this new service with a default 'enabled'
state in user preferences. These enhancements increase the functionality
by allowing manipulation of clipboard data programmatically.
Improve error handling in `readClipboard` by adding checks
for unavailable pasteboard types, enhancing fault tolerance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant