Audit the MCP servers and permissions your AI agents have on your Mac
Where Claude Code, Codex and Cursor store their MCP server lists, the commands that print them, and how to read each server’s tool permissions.
There is no single Mac-wide list. Each agent keeps its own MCP configuration, so you audit them one by one: Claude Code in ~/.claude.json and a project’s .mcp.json, Codex in ~/.codex/config.toml, Cursor in ~/.cursor/mcp.json. List the servers, note whether each runs a local command or calls a remote URL, then check which of its tools can run without asking you. A local server runs with your user account’s access unless a sandbox or other control narrows it.
Step 1: list the servers each agent has
| Agent | Config files | Command to list | Source |
|---|---|---|---|
| Claude Code | Local and user servers in ~/.claude.json. Project servers in .mcp.json at the project root. | claude mcp list, claude mcp get <name>, and /mcp inside a session | Claude Code MCP |
| Codex | [mcp_servers.<name>] tables in ~/.codex/config.toml. A trusted project can add .codex/config.toml. | codex mcp list (add --json for machine-readable output), and /mcp in the TUI | Codex MCP |
| Cursor | ~/.cursor/mcp.json for every project and .cursor/mcp.json for one project | Customize in the sidebar lists servers and toggles them | Cursor MCP |
Two details change what you find. Claude Code connects to a server once, using the highest-precedence definition (local, then project, then user, then plugin, then claude.ai connectors), and does not merge fields across scopes. Hosted Cursor cloud agents do not read ~/.cursor/mcp.json. Also check the apps you use besides these three. Any app that speaks MCP can have its own file.
A quick way to see every candidate file on a Mac:
ls -la ~/.claude.json ~/.codex/config.toml ~/.cursor/mcp.json 2>/dev/null
find ~ -maxdepth 4 \( -name '.mcp.json' -o -path '*/.cursor/mcp.json' -o -path '*/.codex/config.toml' \) -not -path '*/node_modules/*' 2>/dev/nullStep 2: for each server, answer four questions
- Where does it run? A
commandentry starts a local process. Aurlentry is a remote server. - What does it hold? Look for tokens in
env, headers or the file itself. Treat a key in a config file as exposed to anything that reads the file. - What can its tools do? Read tools and write or delete tools are different risks. Each server’s page under MCP server security lists what it can read, write and delete.
- Who approved it? In Claude Code, project servers in
.mcp.jsonprompt for approval before first use. A repository you cloned can carry one.
Step 3: check the permissions on each tool
- Claude Code names MCP tools in permission rules, and
/permissionsshows every rule with the settings file it came from. A hook matcher can target a server’s tools. Useclaude mcp remove <name>to remove a server. For a remote server the docs say this deletes the stored OAuth tokens but does not revoke them at the issuer, so also revoke access with the provider. - Codex sets
default_tools_approval_modeper server toauto,prompt,writesorapprove, andtools.<tool>.approval_modeper tool.enabled_toolsis an allow list anddisabled_toolsa deny list. A narrow example:
[mcp_servers.example]
command = "npx"
args = ["-y", "@example/mcp-server"]
default_tools_approval_mode = "writes"
disabled_tools = ["delete_everything"]- Cursor asks before each MCP tool by default and shows the arguments. In Auto-review, allowlisted MCP tools run at once and other calls go to a classifier. Team setups can set a tool allowlist, where an empty allowlist allows every tool on that server.
Then check macOS itself. Open System Settings, Privacy & Security, and review Full Disk Access, Files and Folders and Automation for the apps that host your agents. A server inherits what its host process can reach.
Step 4: remove what you do not use
Remove servers you installed to try once. Rotate any token that sat in a plaintext config. Re-run the three list commands and compare.
Where Excellent fits
Excellent does not inventory MCP servers, and the app is not an MCP server. Its free scan reads supported agent logs on your Mac, which can show a key that reached a log through a server call. For what a specific server can do, use the per-server pages. MCP server pages · MCP server security · Run the free scan
Checklist
- Ran
claude mcp listandcodex mcp list, and opened Customize in Cursor. - Searched for
.mcp.json,.cursor/mcp.jsonand.codex/config.tomlin your projects. - Marked each server local or remote, and listed the secrets it holds.
- Set approval for write tools in each agent.
- Reviewed macOS privacy permissions for the host apps.
- Removed unused servers and rotated exposed tokens.
Checked against vendor documentation on November 25, 2026. Claude Code MCP · Claude directory · Codex MCP · Cursor MCP

