applescript-mcp

MCP server that execute applescript giving you full control of your Mac

GitHub Stars

351

User Rating

Not Rated

Favorites

0

Views

61

Forks

42

Issues

1

Installation
Difficulty
Beginner
Estimated Time
5-10 minutes
Requirements
Node.js: 18.0.0以上
npm: 8.0.0以上
+1 more

Installation

Installation

Prerequisites

Please specify required software and versions:
Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Claude Desktop: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/peakmojo/applescript-mcp.git
cd applescript-mcp

2. Install Dependencies

bash
npm install

3. Configure Claude Desktop

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "applescript_execute": {
      "command": "npx",
      "args": ["@peakmojo/applescript-mcp"]
    }
  }
}

4. Start Server

bash
npm start

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.

Configuration

Configuration

Basic Configuration

Claude Desktop Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "applescript_execute": {
      "command": "npx",
      "args": ["@peakmojo/applescript-mcp"]
    }
  }
}

Security Settings

Store API keys in environment variables or secure configuration files
Set appropriate file access permissions.

Examples

Examples

Basic Usage

Here are basic usage examples for the MCP server:

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('applescript_execute', {
  command: 'Create a reminder for me to call John tomorrow at 10am'
});

console.log(result);

Advanced Examples

Automation Script

bash
#!/bin/bash

Batch processing example

for file in *.txt; do mcp-tool process "$file" done

Use Cases

Create a reminder for me to call John tomorrow at 10am
Add a new meeting to my calendar for Friday from 2-3pm titled 'Team Review'
Create a new note titled 'Meeting Minutes' with today's date
Show me all files in my Downloads folder from the past week

Additional Resources