AppleScript MCP
Execute AppleScript para obter controle total do seu Mac.
Documentação
AppleScript MCP Server (Acesso duplo: python e node.js)
Visão Geral
Um servidor Model Context Protocol (MCP) que permite executar código AppleScript para interagir com o Mac. Este MCP foi intencionalmente projetado para ser simples, direto, intuitivo e exigir configuração mínima.
Não acredito como é simples e poderoso. O código principal tem <100 linhas de código.
https://github.com/user-attachments/assets/b85e63ba-fb26-4918-8e6d-2377254ee388
Recursos
- Execute AppleScript para acessar aplicativos e dados do Mac
- Interaja com Notas, Calendário, Contatos, Mensagens e mais
- Pesquise arquivos usando Spotlight ou Finder
- Leia/grave conteúdos de arquivos e execute comandos shell
- Suporte a execução remota via SSH
Exemplos de Prompts
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
What's my current battery percentage?
Show me the most recent unread emails in my inbox
List all the currently running applications on my Mac
Play my "Focus" playlist in Apple Music
Take a screenshot of my entire screen and save it to my Desktop
Find John Smith in my contacts and show me his phone number
Create a folder on my Desktop named "Project Files"
Open Safari and navigate to apple.com
Tell me how much free space I have on my main drive
List all my upcoming calendar events for this week
Uso com Claude Desktop
Node.js
{
"mcpServers": {
"applescript_execute": {
"command": "npx",
"args": [
"@peakmojo/applescript-mcp"
]
}
}
}
Python (uvx)
Não é necessário clonar — execute diretamente do repositório git:
{
"mcpServers": {
"applescript_execute": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/peakmojo/applescript-mcp",
"mcp-server-applescript"
]
}
}
}
Python (desenvolvimento local)
Para desenvolvimento local, clone o repositório e use uv para executar a partir do código-fonte:
brew install uv
git clone https://github.com/peakmojo/applescript-mcp.git
{
"mcpServers": {
"applescript_execute": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/repo",
"run",
"mcp-server-applescript"
]
}
}
}
Desenvolvimento
Configuração
brew install uv
uv sync --dev
Execute todas as verificações (em paralelo)
uv run check
Isso executa linting, formatação, verificação de tipos e testes com 100% de cobertura — tudo em paralelo.
Comandos individuais
uv run lint # ruff linter
uv run format # ruff auto-format
uv run typecheck # pyrefly type checker
uv run test # pytest with 100% coverage enforcement
Uso com Docker
Ao executar em um contêiner Docker, você pode usar o hostname especial host.docker.internal para conectar-se ao host do Mac:
Configuração
{
"mcpServers": {
"applescript_execute": {
"command": "npx",
"args": [
"@peakmojo/applescript-mcp",
"--remoteHost", "host.docker.internal",
"--remoteUser", "yourusername",
"--remotePassword", "yourpassword"
]
}
}
}
Isso permite que seu contêiner Docker execute AppleScript no sistema host do Mac. Certifique-se de:
- O SSH esteja habilitado no seu Mac (Ajustes do Sistema → Compartilhamento → Login Remoto)
- Seu usuário tenha as permissões adequadas
- As credenciais corretas sejam fornecidas na configuração