A Model Context Protocol (MCP) server that enables Claude Desktop to create beautifully formatted RTF documents with native macOS TextEdit compatibility.
-
π Rich Text Formatting
- Bold, italic, underline, strikethrough
- Headings (H1-H2)
- Paragraph formatting with customizable spacing
-
π¨ Colors & Highlighting
- Text colors: Red, Blue, Green
- Highlight colors: Yellow, Cyan, Green, Orange
- Full color support in tables
-
π Tables
- Real RTF tables with borders
- Header row styling
- Full formatting support within cells
- Automatic cell padding and alignment
-
π Hyperlinks
- Clickable URLs
- Formatted link text
- Works in TextEdit, Pages, and Word
-
π Lists
- Bullet points
- Numbered lists
- Proper indentation
-
π― Templates
- Business (default)
- Technical (monospace)
- Meeting (increased line spacing)
- macOS (required for NSAttributedString and RTF generation)
- Swift 5.0 or later
- Claude Desktop
- Clone the repository:
git clone https://github.com/M-Pineapple/TextEdit-MCP.git
cd TextEdit-MCP- Run the installer:
./install.sh- Restart Claude Desktop
The installer will:
- Build the Swift project
- Install the MCP server binary
- Update your Claude Desktop configuration
- Create a backup of your existing config
In Claude Desktop, you can create RTF documents using natural language:
"Create an RTF document with my meeting notes"
"Make a formatted report with tables and highlights"
"Generate a technical document with code examples"
Or use the tool directly:
Use textedit:create_rtf_document to create a document at ~/Desktop/MyDoc.rtf
The TextEdit MCP uses an intuitive markdown-like syntax:
**Bold text***Italic text****Bold italic text***~~Strikethrough text~~
{red}Red text{/red}{blue}Blue text{/blue}{green}Green text{/green}
==Yellow highlight==[[Cyan highlight]]{{Green highlight}}((Orange highlight))
# Heading 1
## Heading 2
### Heading 3
#### Heading 4β’ Bullet point (or use - )
1. Numbered item
2. Another item| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| More | Data | Here |[Link text](https://example.com)# Meeting Notes
## Agenda
- Review **Q4 results**
- Discuss {red}urgent issues{/red}
- Plan for next quarter
## Action Items
1. ==Update documentation==
2. [[Review code changes]]
3. Schedule follow-up| Task | Status | Owner |
|------|--------|-------|
| **Documentation** | {green}β
Complete{/green} | Team A |
| *Testing* | ==In Progress== | Team B |
| Deployment | {red}Blocked{/red} | DevOps |swift build -c releaseswift testTextEdit-MCP/
βββ Sources/
β βββ TextEditMCP/
β βββ main.swift # Entry point
β βββ MCPServer.swift # MCP protocol handler
β βββ RTFDocumentService.swift # RTF generation
β βββ MCPLogger.swift # Logging utility
βββ Package.swift
βββ README.md
βββ FORMATTING_GUIDE.md
βββ install.sh
- MCP Protocol: Implements the Model Context Protocol to communicate with Claude Desktop
- NSAttributedString: Uses macOS native APIs for rich text formatting
- NSTextTable: Creates real RTF tables with proper borders and cell formatting
- RTF Export: Generates standard RTF files compatible with TextEdit, Pages, and Word
Contributions are welcome! Please feel free to submit a Pull Request.
- Maintain compatibility with macOS TextEdit
- Follow Swift naming conventions
- Add tests for new features
- Update documentation
MIT License - See LICENSE file for details
- Created for use with Claude Desktop
- Built with Swift and AppKit
- Uses Model Context Protocol (MCP)
Created by Pineapple π