read_clipboard
Retrieve text from your macOS clipboard to use as search queries for web research through the Tavily Web Search MCP Server.
Instructions
Read and return the current clipboard text (macOS). Uses pbpaste.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:65-77 (handler)The core handler function for the 'read_clipboard' MCP tool. Decorated with @mcp.tool(), which handles both implementation and registration. Uses subprocess to call 'pbpaste' for reading macOS clipboard content.@mcp.tool() def read_clipboard() -> str: """Read and return the current clipboard text (macOS). Uses `pbpaste`.""" try: completed = subprocess.run([ "pbpaste" ], check=False, capture_output=True, text=True) if completed.returncode != 0: return f"❌ Failed to read clipboard (pbpaste exited {completed.returncode})." return (completed.stdout or "").strip() except Exception as e: return f"❌ Error reading clipboard: {str(e)}"