Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

clipboard_write

Copy text to the system clipboard for pasting into applications. This tool enables automated text transfer during desktop interactions.

Instructions

Write text to the clipboard.

Args: text: The text to copy to the clipboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Implementation Reference

  • The MCP tool registration and entry point for 'clipboard_write' in the server.
    async def clipboard_write(text: str) -> str:
        """Write text to the clipboard.
    
        Args:
            text: The text to copy to the clipboard
        """
        from . import clipboard
        await clipboard.write(text)
        return f"Copied {len(text)} characters to clipboard"
  • The actual implementation of writing to the clipboard using 'wl-copy'.
    async def write(text: str) -> None:
        """Write text to clipboard."""
        require_tool("wl-copy")
        proc = await asyncio.create_subprocess_exec(
            "wl-copy",
            stdin=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.PIPE,
        )
        _, stderr = await proc.communicate(input=text.encode())
        if proc.returncode != 0:
            raise ClipboardError(f"wl-copy failed: {stderr.decode().strip()}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alderban107/hyprland-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server