Claude Code & Codex MCP — Connect Your Terminal AI to Mac Apps
Give Claude Code or Codex access to Mail, Calendar, Teams and local files on your Mac through LMCP's free MCP server — connected over local stdio, with no cloud relay in between. Setup is one command per client.
Claude Code and Codex are great at reading and writing code, but out of the box they can't see your inbox, your calendar, or the files outside your project folder. LMCP gives your terminal AI the same local access a desktop assistant has — Mail, Calendar, Teams, Slack, Finder — through LMCP, a free, native macOS MCP server. No cloud relay, no API keys: for a CLI agent, LMCP connects over local stdio, so the tool calls stay between your agent and your Mac.
How it works
The one-line installer detects and configures the clients it recognizes automatically:
npx -y local-mcp@latest setupRestart your terminal session afterward. If Claude Code or Codex don't show LMCP's tools once you reopen them, add it by hand — it takes one command each:
Claude Code
claude mcp add --env LMCP_ORIGIN=manual --transport stdio --scope user local-mcp -- npx -y local-mcp@latestKeep --scope user: without it Claude Code saves the server for the current project only, and that entry takes precedence over the one LMCP writes for you everywhere else. Check it connected with claude mcp list — you should see local-mcp marked as connected.
Codex
Add this block to ~/.codex/config.toml:
[mcp_servers.local-mcp]
command = "npx"
args = ["-y", "local-mcp@latest"]
[mcp_servers.local-mcp.env]
LMCP_ORIGIN = "manual"Codex's CLI, desktop app and IDE extension all read this same file, so you only configure it once. Keep the name local-mcp: it's the one LMCP's own setup and uninstall look for, so a block under a different name would end up as a duplicate.
What your agent can do once it's connected
- Read context before it touches code — pull the ticket or thread a task came from:
search_emails,m365_search_emails,teams_search_messages,slack_search_messages. - Check your schedule —
list_calendar_events/m365_list_eventsbefore it suggests a meeting or estimates a deadline. - Work across the filesystem, not just the repo —
file_search,file_read,finder_listto pull a config, a spec, or a log that lives outside the project. - Report back through the channel you're already in —
teams_send_channel_message,teams_send_message,send_emailto post a status update or a summary without you copy-pasting it.
Try a prompt like: "Find the email where the client described this bug, check if I'm free Thursday, and post a one-line status to the #eng Teams channel." That's three apps and zero context-switching out of your terminal.
Is this safe and private?
For Claude Code and Codex, LMCP connects over local stdio — it runs as a process on your Mac and talks to your agent directly, not through LMCP's cloud relay, so these tool calls aren't routed through our servers. What your agent reads still goes where your agent sends it: if it opens an email, that text becomes part of the conversation with Anthropic's or OpenAI's model, under their terms. Each call also goes through the permission prompts your agent already has (Claude Code's own tool-approval settings, for example), so LMCP doesn't bypass the approvals you control — it just gives your agent more it's allowed to ask for.
LMCP executes local tools on your device. Cloud AI providers and connected services can receive requested data; their terms apply.
Which terminal AI clients does this work with?
- Claude Code — Anthropic's CLI, connects via
claude mcp addor a project-level.mcp.json. - Codex — OpenAI's CLI, desktop app and IDE extension, connects via
~/.codex/config.toml. - Any other MCP-compatible client that reads a local stdio server config — the same install works for Cursor, Windsurf, VS Code and more.
Stop breaking flow to check your inbox or your calendar. Install LMCP, connect it to Claude Code or Codex, and give your terminal AI the context it's been missing.
Comments
Questions and experiences welcome — comments are reviewed before they appear.