-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·90 lines (76 loc) · 2.22 KB
/
install.sh
File metadata and controls
executable file
·90 lines (76 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# TextEdit MCP Installation Script
# Created by Pineapple 🍍
echo "🍍 TextEdit MCP Installer"
echo "========================"
# Check if we're in the right directory
if [ ! -f "Package.swift" ]; then
echo "❌ Error: Please run this script from the TextEdit-MCP directory"
exit 1
fi
# Build the project
echo "📦 Building TextEdit MCP..."
swift build -c release
if [ $? -ne 0 ]; then
echo "❌ Build failed"
exit 1
fi
# Create MCP directory if it doesn't exist
MCP_DIR="$HOME/Library/Application Support/Claude/MCP"
mkdir -p "$MCP_DIR"
# Copy the executable
echo "📄 Installing to Claude MCP directory..."
cp .build/release/textedit-mcp "$MCP_DIR/"
if [ $? -ne 0 ]; then
echo "❌ Failed to copy executable"
exit 1
fi
# Make it executable
chmod +x "$MCP_DIR/textedit-mcp"
# Create or update Claude config
CONFIG_FILE="$HOME/Library/Application Support/Claude/claude_desktop_config.json"
echo "🔧 Updating Claude Desktop configuration..."
# Check if config exists
if [ -f "$CONFIG_FILE" ]; then
# Backup existing config
cp "$CONFIG_FILE" "$CONFIG_FILE.backup"
echo "📋 Backed up existing config to $CONFIG_FILE.backup"
# Check if jq is installed for JSON manipulation
if command -v jq &> /dev/null; then
# Use jq to add our server
jq '.mcpServers.textedit = {
"command": "'"$MCP_DIR/textedit-mcp"'"
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
else
echo "⚠️ jq not found. Please manually add this to your claude_desktop_config.json:"
echo ""
echo ' "textedit": {'
echo ' "command": "'"$MCP_DIR/textedit-mcp"'"'
echo ' }'
echo ""
fi
else
# Create new config
cat > "$CONFIG_FILE" << EOF
{
"mcpServers": {
"textedit": {
"command": "$MCP_DIR/textedit-mcp"
}
}
}
EOF
fi
echo ""
echo "✅ Installation complete!"
echo ""
echo "📝 TextEdit MCP is now available in Claude Desktop"
echo ""
echo "🚀 Usage:"
echo " - Restart Claude Desktop"
echo " - Use tool: create_rtf_document"
echo ""
echo "📖 Example:"
echo ' Create a document with: "Create an RTF document with the meeting notes"'
echo ""
echo "Created by Pineapple 🍍"