Initial commit — Apple Apps MCP server with native macOS config app
Python MCP server (FastMCP) providing Claude Code/CoWork access to Apple Reminders, Calendar, Mail, Contacts, Find My, and Maps via AppleScript. Includes a native SwiftUI config/installer app and a compiled EventKit helper for fast reminder queries on large databases (8,000+ items). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+82
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash
|
||||
# Build the Apple MCP Config .app bundle
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
APP_NAME="Apple MCP Config"
|
||||
APP_BUNDLE="$SCRIPT_DIR/$APP_NAME.app"
|
||||
SERVER_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
echo "=== Building $APP_NAME ==="
|
||||
|
||||
# Clean previous build
|
||||
rm -rf "$APP_BUNDLE"
|
||||
|
||||
# Create .app bundle structure
|
||||
mkdir -p "$APP_BUNDLE/Contents/MacOS"
|
||||
mkdir -p "$APP_BUNDLE/Contents/Resources/server/apps"
|
||||
mkdir -p "$APP_BUNDLE/Contents/Resources/server/helpers"
|
||||
|
||||
# Compile Swift
|
||||
echo "Compiling SwiftUI app..."
|
||||
swiftc "$SCRIPT_DIR/AppleMCPConfig.swift" \
|
||||
-o "$APP_BUNDLE/Contents/MacOS/$APP_NAME" \
|
||||
-target arm64-apple-macosx14.0 \
|
||||
-framework SwiftUI \
|
||||
-framework AppKit \
|
||||
-parse-as-library \
|
||||
-Osize
|
||||
|
||||
# Create Info.plist
|
||||
cat > "$APP_BUNDLE/Contents/Info.plist" << 'PLIST'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>Apple MCP Config</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Apple MCP Config</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.jfamily.apple-mcp-config</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Apple MCP Config</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>14.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>NSRemindersUsageDescription</key>
|
||||
<string>Apple MCP Config needs access to Reminders to provide Claude with reminder data.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
|
||||
# Bundle server files into Resources
|
||||
echo "Bundling server files..."
|
||||
cp "$SERVER_DIR/apple_mcp.py" "$APP_BUNDLE/Contents/Resources/server/"
|
||||
cp "$SERVER_DIR/helpers.py" "$APP_BUNDLE/Contents/Resources/server/"
|
||||
cp "$SERVER_DIR/requirements.txt" "$APP_BUNDLE/Contents/Resources/server/"
|
||||
cp "$SERVER_DIR/config.json" "$APP_BUNDLE/Contents/Resources/server/"
|
||||
cp "$SERVER_DIR/apps/"*.py "$APP_BUNDLE/Contents/Resources/server/apps/"
|
||||
|
||||
# Bundle helpers (Swift source — compiled during install)
|
||||
cp "$SERVER_DIR/helpers/reminders_helper.swift" "$APP_BUNDLE/Contents/Resources/server/helpers/"
|
||||
# Also include pre-compiled binary if it exists
|
||||
if [ -f "$SERVER_DIR/helpers/reminders_helper" ]; then
|
||||
cp "$SERVER_DIR/helpers/reminders_helper" "$APP_BUNDLE/Contents/Resources/server/helpers/"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== Build Complete ==="
|
||||
echo "App: $APP_BUNDLE"
|
||||
echo ""
|
||||
echo "To use: double-click '$APP_NAME.app' or run:"
|
||||
echo " open \"$APP_BUNDLE\""
|
||||
Reference in New Issue
Block a user