Python Apple MCP
MCP (Protocolo de contexto de modelo) de Python Apple
Una implementación de Python del servidor que maneja las interacciones con aplicaciones macOS como Contactos, Notas, Correo, Mensajes, Recordatorios, Calendario y Mapas usando FastMCP.
Características
Interactúe con aplicaciones nativas de macOS a través de AppleScript
Operaciones asincrónicas para un mejor rendimiento
Manejo integral de errores
Interfaces de tipos seguros que utilizan modelos de Pydantic
Amplia cobertura de pruebas
Diseño modular para una fácil ampliación
Related MCP server: macnotes-mcp
Aplicaciones compatibles
Contactos
Notas
Correo
Mensajes
Recordatorios
Calendario
Mapas
Instalación
Clonar el repositorio:
git clone https://github.com/jxnl/python-apple-mcp.git
cd python-apple-mcpCrear un entorno virtual:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateInstalar dependencias:
pip install -r requirements.txtInstalar dependencias de prueba (opcional):
pip install -r requirements-test.txtUso
Ejemplo básico
from apple_mcp import FastMCP, Context
# Initialize FastMCP server
mcp = FastMCP("Apple MCP")
# Use the tools
@mcp.tool()
def find_contact(name: str) -> List[Contact]:
"""Search for contacts by name"""
# Implementation here
pass
# Run the server
if __name__ == "__main__":
mcp.run()Uso de módulos individuales
from utils.contacts import ContactsModule
from utils.notes import NotesModule
# Initialize modules
contacts = ContactsModule()
notes = NotesModule()
# Use the modules
async def main():
# Find a contact
contact = await contacts.find_contact("John")
# Create a note
await notes.create_note(
title="Meeting Notes",
body="Discussion points...",
folder_name="Work"
)
# Run the async code
import asyncio
asyncio.run(main())Pruebas
Ejecute el conjunto de pruebas:
pytestEjecutar pruebas con cobertura:
pytest --cov=utils tests/Ejecutar archivo de prueba específico:
pytest tests/test_contacts.pyDocumentación de la API
Módulo de contactos
find_contact(name: str) -> List[Contact]: Busca contactos por nombreget_all_contacts() -> List[Contact]: Obtener todos los contactoscreate_contact(name: str, phones: List[str]) -> Contact: Crea un nuevo contacto
Módulo de notas
find_note(query: str) -> List[Note]: Buscar notascreate_note(title: str, body: str, folder_name: str) -> Note: Crea una nueva notaget_all_notes() -> List[Note]: Obtener todas las notas
Módulo de correo
send_email(to: str, subject: str, body: str) -> str: Enviar un correo electrónicosearch_emails(query: str) -> List[Email]: Buscar correos electrónicosget_unread_mails() -> List[Email]: Obtener correos electrónicos no leídos
Módulo de mensajes
send_message(to: str, content: str) -> bool: Enviar un iMessageread_messages(phone_number: str) -> List[Message]: Leer mensajesschedule_message(to: str, content: str, scheduled_time: str) -> Dict: Programar un mensaje
Módulo de recordatorios
create_reminder(name: str, list_name: str, notes: str, due_date: str) -> Dict: Crea un recordatoriosearch_reminders(query: str) -> List[Dict]: Recordatorios de búsquedaget_all_reminders() -> List[Dict]: Obtener todos los recordatorios
Módulo de calendario
create_event(title: str, start_date: str, end_date: str, location: str, notes: str) -> Dict: Crea un eventosearch_events(query: str) -> List[Dict]: Buscar eventosget_events() -> List[Dict]: Obtener todos los eventos
Módulo de mapas
search_locations(query: str) -> List[Location]: Buscar ubicacionesget_directions(from_address: str, to_address: str, transport_type: str) -> str: Obtener direccionessave_location(name: str, address: str) -> Dict: Guardar una ubicación en favoritos
Contribuyendo
Bifurcar el repositorio
Crear una rama de características
Confirme sus cambios
Empujar hacia la rama
Crear una solicitud de extracción
Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceA Model Context Protocol server that enables running AppleScript code to interact with Mac applications and system features including Notes, Calendar, Contacts, Messages, file management, and more.1178460MIT
- Alicense-qualityDmaintenanceA production-ready MCP server for macOS that provides async, cache-backed access and background queued writes to Apple Notes. It enables seamless integration for reading, creating, and managing notes through standard tools like ScriptingBridge while supporting background service execution.MIT
- AlicenseBqualityDmaintenanceMCP server for macOS Apple apps. Enables read/write access to Notes, Reminders, Calendar, Contacts, and Safari using SQLite and JXA, all running locally.28122MIT
- Alicense-qualityAmaintenanceA collection of MCP servers for Apple macOS apps (Mail, Contacts, Notes, Memory, Messages, Calendar, Reminders) enabling AI assistants to read, search, create, and update data via JXA, SQLite, and EventKit.12MIT
Related MCP Connectors
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jxnl/python-apple-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server