top | item 45532499

(no title)

nberkman | 4 months ago

Inspired by the copy-paste point in this post, I added agent buffer tools to clippy, a macOS utility I maintain which includes an MCP server that interacts with the system clipboard. In this case it was more appropriate to use a private buffer instead. With the tools I just added, the server reads file bytes directly - your agent never generates the copied content as tokens. Three operations:

buffer_copy: Copy specific line ranges from files to agent's private buffer

buffer_paste: Insert/append/replace those exact bytes in target files

buffer_list: See what's currently buffered

So the agent can say "copying lines 50-75 from auth.py" and the MCP server handles the actual file I/O. No token generation, no hallucination, byte-for-byte accurate. Doesn't touch your system clipboard either.

The MCP server already included tools to copy AI-generated content to your system clipboard - useful for "write a Python script and copy it" workflows.

(Clippy's main / original purpose is improving on macOS pbcopy - it copies file references instead of just file contents, so you can paste actual files into Slack/email/etc from the terminal.)

If you're on macOS and use Claude or other MCP-compatible agents: https://github.com/neilberkman/clippy

brew install neilberkman/clippy/clippy

discuss

order

No comments yet.