# 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](https://code.claude.com/docs/en/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](https://learn.chatgpt.com/docs/extend/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](https://cursor.com/docs/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:

```bash
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/null
```

## Step 2: for each server, answer four questions

1. **Where does it run?** A `command` entry starts a local process. A `url` entry is a remote server.
2. **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.
3. **What can its tools do?** Read tools and write or delete tools are different risks. Each server’s page under [MCP server security](https://www.excellent.so/mcp) lists what it can read, write and delete.
4. **Who approved it?** In Claude Code, project servers in `.mcp.json` prompt 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 `/permissions` shows every rule with the settings file it came from. A hook matcher can target a server’s tools. Use `claude 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_mode` per server to `auto`, `prompt`, `writes` or `approve`, and `tools.<tool>.approval_mode` per tool. `enabled_tools` is an allow list and `disabled_tools` a deny list. A narrow example:

```toml
[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](https://www.excellent.so/mcp) · [MCP server security](https://www.excellent.so/guides/mcp-server-security) · [Run the free scan](https://www.excellent.so/scan)

## Checklist

- [ ] Ran `claude mcp list` and `codex mcp list`, and opened Customize in Cursor.
- [ ] Searched for `.mcp.json`, `.cursor/mcp.json` and `.codex/config.toml` in 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](https://code.claude.com/docs/en/mcp) · [Claude directory](https://code.claude.com/docs/en/claude-directory) · [Codex MCP](https://learn.chatgpt.com/docs/extend/mcp) · [Cursor MCP](https://cursor.com/docs/mcp)

Source: https://www.excellent.so/guides/audit-mcp-servers-and-permissions-on-mac
