Skip to main content
Glama
g0t4

macOS Defaults MCP Server

by g0t4
README.md
# mcp-server-macos-defaults MCP server

MCP server for reading/writing macOS defaults (settings)

## Components

### Tools

- `list-domains`:
  - equivalent to running `defaults domains`
- `find`:
  - equivalent to running `defaults find <word>`
- `defaults-read`:
  - equivalent to running `defaults read <domain> <key>`
  - if `key` is not provided, the entire domain is read
- `defaults-write`:
  - equivalent to running `defaults write <domain> <key> <value>`

## Quickstart

### Install

#### Claude Desktop

On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

<details>
  <summary>Development/Unpublished Servers Configuration</summary>
  ```
  "mcpServers": {
    "mcp-server-macos-defaults": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-macos-defaults",
        "run",
        "mcp-server-macos-defaults"
      ]
    }
  }
  ```
</details>

<details>
  <summary>Published Servers Configuration</summary>
  ```
  "mcpServers": {
    "mcp-server-macos-defaults": {
      "command": "uvx",
      "args": [
        "mcp-server-macos-defaults"
      ]
    }
  }
  ```
</details>

## Development

### Building and Publishing

To prepare the package for distribution:

1. Sync dependencies and update lockfile:
```bash
uv sync
```

2. Build package distributions:
```bash
uv build
```

This will create source and wheel distributions in the `dist/` directory.

3. Publish to PyPI:
```bash
uv publish
```

Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: `--token` or `UV_PUBLISH_TOKEN`
- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`

### Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).


You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:

```bash
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-server-macos-defaults run mcp-server-macos-defaults
```


Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

TDQS

C2.8/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: defaults-read and defaults-write handle reading and writing specific key-value pairs, find searches for entries containing a word, and list-domains enumerates available domains. There is no overlap or ambiguity between these functions.

Naming Consistency3/5

The naming is mixed: defaults-read and defaults-write follow a consistent verb-object pattern with hyphens, but find and list-domains use different conventions (single verb vs. verb-noun with hyphen). While readable, this lacks a uniform pattern across all tools.

Tool Count4/5

With 4 tools, the count is reasonable for a macOS defaults management server, covering core operations like read, write, search, and domain listing. It is slightly thin but functional, as additional tools like delete or reset might be useful but are not essential for basic workflows.

Completeness4/5

The toolset covers essential CRUD-like operations for macOS defaults: read and write handle key-value management, find enables searching, and list-domains provides discovery. A minor gap exists with no explicit delete or update tool, but agents can work around this using defaults-write or other methods.

Maintenance

ActivityInactive
ResponsivenessNo issues