> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security Model

> Trust boundaries, credential handling, logging behavior, and the pre-production checklist.

This page is for the person deciding whether to trust the MainWP MCP Server with Dashboard credentials. The user-facing guardrails (confirmation flow, safe mode) are explained on [Safety & Permissions](https://docs.mainwp.com/mcp-server/safety.md); this covers what is underneath.

## Trust model

```
┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   AI Assistant  │────▶│  MCP Server     │────▶│ MainWP Dashboard│
│  (Claude, etc.) │     │  (this server)  │     │   (WordPress)   │
└─────────────────┘     └─────────────────┘     └─────────────────┘
        │                       │                       │
   You control            Passthrough             Your sites
   the prompts            (local settings)            (full access)
```

The AI assistant has the same access as the WordPress user whose credentials you configure. Every tool call executes with that user's capabilities. The server forwards calls to your Dashboard and caches responses briefly. Using `mainwp_configure` saves connection settings, including your Application Password, to `~/.config/mainwp-mcp/settings.json` with owner-only permissions (0600, in a 0700 directory). See [Configuration](https://docs.mainwp.com/mcp-server/reference/configuration.md).

The Dashboard enforces the permission boundary, whatever the AI asks for. MainWP tools require the `manage_options` capability, which WordPress administrators have, so a user without it gets a permission error on every MainWP tool call. A limited WordPress role therefore does not work as a restriction. To limit which operations the AI can run, use [tool filtering](https://docs.mainwp.com/mcp-server/guides/restrict-tools.md) and [safe mode](https://docs.mainwp.com/mcp-server/safety.md#safe-mode-block-deletions-entirely).

## Credential management

Application Passwords are the authentication method. They can be revoked without touching your login password, each application gets its own password for auditing, and WordPress logs which application made each request.

Practices worth following:

* Use a dedicated WordPress user for MCP access, not your main admin account.
* Create a unique Application Password per AI tool and label each clearly ("MainWP MCP - Claude").
* Keep production and development credentials separate.
* If you use a `settings.json` file, restrict it with `chmod 600` and keep it out of version control.

## What gets logged

The server logs to stderr: destructive-operation audit messages, tool execution start and end (tool name, duration, outcome), safe mode blocks, resource limit violations, and configuration warnings.

Credential-rejection diagnostics can include the configured username and the source of each connection setting. Setup status also identifies settings overridden by environment variables. See [Rejected credentials](https://docs.mainwp.com/mcp-server/reference/configuration.md#rejected-credentials).

The server does not log passwords or tokens, tool arguments (which may contain sensitive data), response content (which may contain PII), or preview data for destructive operations. A username value that looks like an Application Password is withheld from rejection diagnostics.

WordPress separately logs Application Password usage, so your Dashboard's admin shows which application authenticated and when.

> [!NOTE]
>
> **Web server logs can contain operation inputs.** The MCP server sends GET inputs in the URL query string. For a `mainwp/` DELETE ability with a required nullable input, it sends a JSON body to preserve null values. Other DELETE inputs still use the query string. Other write operations use a POST JSON body. Query-string inputs can appear in your Dashboard web server's access logs; authentication credentials travel in headers. Restrict access-log visibility and set retention accordingly.
>
> MainWP Dashboard also supports a JSON body for DELETE requests through its [Abilities input handling](https://docs.mainwp.com/api-reference/abilities-api/overview.md#input-handling). Direct integrations can also use that option to keep DELETE inputs out of URLs.

## Destructive-operation classification

The server classifies each ability as destructive or not from the `destructive` annotation the Dashboard declares. The stance is fail-closed: only a literal `false` counts as non-destructive. A missing or malformed annotation classifies the ability as destructive, which routes it into safe mode blocking and the confirmation gate. An ability that is classified destructive but declares no usable `confirm` parameter cannot complete the confirmation flow and is refused with `CONFIRMATION_UNSUPPORTED` rather than executed. The same classification gates the `mainwp://site/{id}` resource and completions.

The practical consequence: a new, third-party, or misannotated ability defaults to blocked or gated, never to silently executable.

## SSL/TLS

Certificates are verified by default and plain HTTP is refused. The `skipSslVerify` and `allowHttp` overrides exist for isolated local development only; both make credential interception possible. If you see SSL errors against a valid certificate, check that the chain is complete, the system CA store is current, and the certificate matches the domain in `MAINWP_URL`.

## Pre-production checklist

* [ ] Created a dedicated WordPress user for API access
* [ ] Generated a unique Application Password for this integration
* [ ] Confirmed the WordPress user has the `manage_options` capability
* [ ] Configured [tool filtering](https://docs.mainwp.com/mcp-server/guides/restrict-tools.md) to expose only needed operations
* [ ] Set appropriate [resource limits](https://docs.mainwp.com/mcp-server/reference/configuration.md#resource-limits)
* [ ] Verified SSL certificates are valid (no `skipSslVerify`)
* [ ] Tested in [safe mode](https://docs.mainwp.com/mcp-server/safety.md#safe-mode-block-deletions-entirely) first


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.