macOS API Platform for AI Agents

Every macOS framework.
One clean API.

MacLayer exposes Apple's native frameworks — ScreenCaptureKit, Vision, SFSpeechRecognizer, AXUIElement, Simulator — as REST + MCP endpoints any AI agent can call.

maclayer · localhost:6173
$ curl localhost:6173/v1/screen/ocr \
  -d '{"target":"window","mode":"structured"}'

{
  "text": "Q3 Revenue: $2.4M (+23% YoY)",
  "blocks": [{ "text": "Q3 Revenue", "confidence": 0.99 }],
  "credits_used": 2
}

✓ On-device · Zero cloud · Apple Vision framework
10+
Native APIs
0
Cloud calls
1ms
Avg latency
MIT
Licensed core

Every framework,
one endpoint.

MacLayer wraps Apple's restricted native frameworks as clean JSON APIs — no Swift required on your side.

🔍
2 credits
Screen OCR
POST /v1/screen/ocr

Extract structured text from any window, region, or display. Uses ScreenCaptureKit + Vision — fully on-device, sub-100ms, 99%+ accuracy on Apple Silicon.

ScreenCaptureKit · Vision.framework
🌳
3 credits
Accessibility Tree
POST /v1/accessibility/tree

Dump any macOS app's full UI tree as JSON — buttons, fields, labels, hierarchy. Agents can navigate any app without screen scraping or hardcoded coordinates.

AXUIElement · Carbon Accessibility
🎤
5 credits/min
Speech Transcription
POST /v1/speech/transcribe

Apple's on-device SFSpeechRecognizer. Near-Whisper accuracy, zero API cost, fully private. File or live mic. Returns timestamped segments.

Speech.framework · AVFoundation
📱
1–5 credits
Simulator Control
POST /v1/simulator/*

Boot simulators, install apps, tap, swipe, screenshot, inspect UI trees. The missing piece for AI-assisted iOS development in Cursor or Claude Code.

simctl · XCUITest · libimobiledevice
1 credit
System State
GET /v1/system/snapshot

Real-time CPU, memory, disk, battery, thermal, network, and top processes snapshot. Build monitoring agents and resource-aware automation.

IOKit · sysctl · host_statistics
🔎
2 credits
File Intelligence
POST /v1/files/search

Spotlight search with Quick Look previews and rich metadata. Returns file thumbnails, content snippets, and optional change-event webhooks.

MDQuery (Spotlight) · QuickLook
🔔
1 credit
Notifications
POST /v1/notifications/send

Send, list, dismiss and stream macOS notifications. Agents can surface alerts, monitor for responses, and close the automation loop with the user.

UserNotifications.framework
📋
1 credit
Clipboard
GET /v1/clipboard/read

Read and write the full macOS clipboard including text, images, RTF, HTML, and file references. Full rich type support via NSPasteboard.

NSPasteboard
🎵
3–10 credits
Audio Capture
POST /v1/audio/record

Capture microphone or system audio output. Pipe directly into transcription. macOS 14.2+ system audio tap via CATapDescription — no extra apps needed.

AVAudioEngine · CATapDescription
🖼
3 credits
Photos Library
POST /v1/photos/search

Semantic search across Apple Photos by date, face, location, or natural language query. Returns thumbnails and metadata via PhotoKit + Vision.

PhotoKit · Vision (face/scene)
🔜
soon
More coming
EventKit · Keychain · Focus Mode

Calendar events, reminders, secure credential store, and Focus mode control are on the roadmap. Vote on GitHub Discussions.

EventKit · Security.framework · ManagedSettings

Works with
any agent.

A Swift daemon holds your macOS entitlements. You talk to it via REST or MCP. No Swift, no Xcode, no entitlement headaches.

01
Install the daemon
One Homebrew command installs maclayerd as a signed LaunchAgent. It holds Screen Recording, Accessibility, and Microphone entitlements for you.
02
Grant permissions once
maclayer setup walks you through macOS System Settings, granting each permission with a clear explanation of why it's needed.
03
Add your API key
Get a free API key at maclayer.dev. Add it to your Claude Desktop config, Cursor settings, or any HTTP client. 1,000 free credits included.
04
Agents call macOS natively
Your agent calls screen_ocr, get_accessibility_tree, or any other tool. Credits are deducted, response is instant.
Claude Desktop
Python
cURL
LangChain
// ~/Library/Application Support/Claude/
// claude_desktop_config.json

{
  "mcpServers": {
    "maclayer": {
      "command": "npx",
      "args": ["-y", "maclayer-mcp"],
      "env": {
        "MACLAYER_API_KEY": "ml_your_key"
      }
    }
  }
}
import requests

ml = "http://localhost:6173"
headers = {"X-MacLayer-Key": "ml_..."}

# OCR the frontmost window
res = requests.post(
  f"{ml}/v1/screen/ocr",
  json={"target": "window"},
  headers=headers
)

print(res.json()["text"])
# → "Q3 Revenue: $2.4M (+23%)"
# Screen OCR
curl localhost:6173/v1/screen/ocr \
  -H "X-MacLayer-Key: ml_..." \
  -d '{"target":"display"}'

# Accessibility tree
curl localhost:6173/v1/accessibility/tree \
  -H "X-MacLayer-Key: ml_..." \
  -d '{"app":"com.apple.finder"}'

# System snapshot
curl localhost:6173/v1/system/snapshot \
  -H "X-MacLayer-Key: ml_..."
from langchain_maclayer import MacLayerToolkit
from langchain.agents import AgentExecutor

tools = MacLayerToolkit(
  api_key="ml_your_key",
  tools=["screen_ocr", "accessibility",
         "system_state", "simulator"]
).get_tools()

agent = AgentExecutor(tools=tools, ...)
agent.invoke({"input": "Read the error in Xcode"})

Pay as you go.
No subscriptions.

Buy credits once, use them forever. The more you use, the cheaper each call gets. Self-host is always free.

Starter
$9
10,000 credits
  • ≈ 5,000 OCR calls
  • ≈ 10,000 system snapshots
  • ≈ 2,000 transcription mins
  • Never expires
Pro
$129
200,000 credits
  • ≈ 100,000 OCR calls
  • Webhook callbacks
  • Usage analytics dashboard
  • Priority support
  • Never expires
Team
$499/mo
1,000,000 credits/month · 5 seats
  • Shared credit pool
  • Per-key usage tracking
  • Slack alerts on low balance
  • SLA + dedicated support
🎁  Free tier: Every new account starts with 1,000 free credits — no credit card required. That's ~500 OCR calls or 200 mins of transcription. Self-hosting the daemon is always MIT-licensed and free.
Endpoint Credits Notes
POST /v1/screen/ocr2Full screen or window
POST /v1/screen/ocr1Region < 400×400px
POST /v1/accessibility/tree3Full UI tree dump
POST /v1/accessibility/element/click1Per action
POST /v1/speech/transcribe5/minPer minute of audio
POST /v1/simulator/screenshot1
GET /v1/simulator/ui-tree3
GET /v1/system/snapshot1All metrics at once
POST /v1/files/search2With Quick Look preview
POST /v1/notifications/send1
GET /v1/clipboard/read1
POST /v1/photos/search3

Up and running
in 4 steps.

From zero to your first OCR call in under 5 minutes. Requires macOS 14 Sonoma or later.

Step 01
Install the daemon
brew install --cask maclayer
Requires Homebrew. Signed & notarized by Apple.
Step 02
Grant permissions
maclayer setup
Interactive wizard opens System Settings for each permission.
Step 03
Add to Claude Desktop
maclayer mcp install claude-desktop
Also works with Cursor, Windsurf, or any MCP-compatible host.
Step 04
Verify installation
maclayer test
Runs all endpoint self-tests and shows your credit balance.
Claude Desktop
Cursor
OpenAI Agents
// claude_desktop_config.json
{
  "mcpServers": {
    "maclayer": {
      "command": "npx", "args": ["maclayer-mcp"],
      "env": { "MACLAYER_API_KEY": "ml_..." }
    }
  }
}
// .cursor/mcp.json in your project
{
  "mcpServers": {
    "maclayer": {
      "command": "npx", "args": ["maclayer-mcp"],
      "env": { "MACLAYER_API_KEY": "ml_..." }
    }
  }
}
from openai_agents import Agent
from openai_agents.mcp import MCPServerStdio

mcp = MCPServerStdio(
  params={"command": "npx",
          "args": ["maclayer-mcp"],
          "env": {"MACLAYER_API_KEY": "ml_..."}}
)
agent = Agent(mcp_servers=[mcp])

Find us
everywhere agents live.

MacLayer is listed across every major agent tool directory. Discover it wherever you build.

🦅
OpenClaw
Agent tools directory
Submitting
🌐
MCP.so
MCP server registry
Submitting
awesome-mcp-servers
GitHub curated list
PR pending
💎
glama.ai
MCP marketplace
Submitting
🔨
smithery.ai
MCP discovery
Submitting
🚀
Product Hunt
Launch platform
Launch day
📦
npm
maclayer-mcp package
Live
🍺
Homebrew
brew install --cask
Live

Give your agents
macOS superpowers.

Join the early access list. 1,000 free credits on signup. No credit card required.