Skip to content
WP EngineDocumentation

list_account_sites

Lists active WordPress site registrations in the project associated with your API key by default. Pass status to list revoked or suspended registrations instead. It needs only the site connection, not a WordPress account connection.

{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25,
"description": "Number of sites to return per page"
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"default": 0,
"description": "Number of sites to skip"
},
"status": {
"type": "string",
"enum": ["active", "revoked", "suspended"],
"default": "active",
"description": "Registration status filter"
}
}
}
Parameter Type Required Default Range Description
limit integer No 25 1–100 Page size
offset integer No 0 0–10,000 Page offset
status string No active active, revoked, suspended Registration status filter

All parameters are optional. Omit them to list active registrations. The status filter is exact: each call returns one lifecycle state.

{
"type": "object",
"properties": {
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Stable site identifier; use this for all other tool calls. Omitted for a registration predating stable site IDs"
},
"client_id": {
"type": "string",
"deprecated": true,
"description": "Deprecated: the site's OAuth client ID, still accepted by site-scoped tools"
},
"site_url": {
"type": "string",
"description": "WordPress site URL"
},
"display_name": {
"type": "string",
"description": "Human-readable site name"
},
"status": {
"type": "string",
"enum": ["active", "revoked", "suspended"],
"description": "Site registration status"
},
"kb_enabled": {
"type": "boolean",
"description": "Whether KB search is available"
},
"wp_connection_status": {
"type": "string",
"enum": ["connected", "needs_reconnect", "not_connected"],
"description": "Your WordPress account connection state (omitted for project keys)"
},
"abilities_synced_at": {
"type": ["string", "null"],
"format": "date-time",
"description": "Last ability catalog sync time (ISO 8601); null or omitted until the first sync"
},
"abilities_count": {
"type": "integer",
"description": "Number of abilities in the site's catalog"
}
},
"required": ["client_id", "site_url", "display_name", "status"]
}
},
"pagination": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "Page size (echoed from request)"
},
"offset": {
"type": "integer",
"description": "Page offset (echoed from request)"
},
"total": {
"type": "integer",
"description": "Total number of sites matching the status filter"
}
},
"required": ["limit", "offset", "total"]
}
},
"required": ["sites", "pagination"]
}
Field Type Always present Description
site_id string Almost always Use this identifier for all other tool calls. Omitted for a registration predating stable site IDs — fall back to client_id for those
client_id string Yes Deprecated. The site’s OAuth client ID; still accepted by site-scoped tools
site_url string Yes WordPress site URL (e.g., https://example.com)
display_name string Yes Human-readable site name
status string Yes active, revoked, or suspended
kb_enabled boolean Yes true if search_kb is available
wp_connection_status string Only for personal keys Your WordPress account connection state
abilities_synced_at string | null When synced Last sync timestamp (ISO 8601); null or omitted until the first sync
abilities_count integer When synced Number of abilities cached

wp_connection_status values:

  • connected — You can run abilities on this site
  • needs_reconnect — Your connection is stale; reconnect in WordPress admin
  • not_connected — Connect your WordPress account before running abilities
  • (omitted) — You’re using a project API key (no personal identity)
Field Type Description
limit integer Requested page size (1–100)
offset integer Requested offset (0–10,000)
total integer Total sites matching the status filter
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_account_sites",
"arguments": {}
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "list_account_sites",
"arguments": {
"limit": 50,
"offset": 50
}
}
}
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_account_sites",
"arguments": {
"status": "revoked"
}
}
}

List all active sites (iterate until offset ≥ total)

Section titled “List all active sites (iterate until offset ≥ total)”
// Page 1
{"arguments": {"limit": 100, "offset": 0}}
// Page 2 (if total > 100)
{"arguments": {"limit": 100, "offset": 100}}
// Continue until offset + limit ≥ pagination.total
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\"sites\":[{\"site_id\":\"site_2f8Kq1xLmR7bTnW4dZyP0c\",\"client_id\":\"clnt_abc123\",\"site_url\":\"https://example.com\",\"display_name\":\"Example Production\",\"status\":\"active\",\"kb_enabled\":true,\"wp_connection_status\":\"connected\",\"abilities_synced_at\":\"2026-07-29T10:30:00Z\",\"abilities_count\":42},{\"site_id\":\"site_9Jd3TbVzHs5kQpX8eLnR2m\",\"client_id\":\"clnt_xyz789\",\"site_url\":\"https://staging.example.com\",\"display_name\":\"Example Staging\",\"status\":\"active\",\"kb_enabled\":false,\"wp_connection_status\":\"not_connected\",\"abilities_synced_at\":null,\"abilities_count\":0}],\"pagination\":{\"limit\":25,\"offset\":0,\"total\":2}}"
}
]
}
}

Parsed sites array:

[
{
"site_id": "site_2f8Kq1xLmR7bTnW4dZyP0c",
"client_id": "clnt_abc123",
"site_url": "https://example.com",
"display_name": "Example Production",
"status": "active",
"kb_enabled": true,
"wp_connection_status": "connected",
"abilities_synced_at": "2026-07-29T10:30:00Z",
"abilities_count": 42
},
{
"site_id": "site_9Jd3TbVzHs5kQpX8eLnR2m",
"client_id": "clnt_xyz789",
"site_url": "https://staging.example.com",
"display_name": "Example Staging",
"status": "active",
"kb_enabled": false,
"wp_connection_status": "not_connected",
"abilities_count": 0
}
]
Credential type Sites returned
Personal API key Registrations matching status in the key’s project, annotated with your WordPress account connection state
Project API key Registrations matching status in the key’s project (no wp_connection_status)
OAuth token (future) Registrations matching status in the selected account

Sites with project_id: null are only visible to OAuth tokens, not project-scoped API keys.

Malformed pagination or status parameters.

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": "invalid_request",
"message": "Limit must be between 1 and 100"
}
}

Causes:

  • limit < 1 or limit > 100
  • offset < 0 or offset > 10000
  • Non-integer limit or offset
  • status is not active, revoked, or suspended

Solution: Use valid pagination bounds and one of the supported status values.

Missing or invalid authentication.

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}

Causes:

  • No Authorization header
  • Invalid API key format
  • Expired or revoked key

Solution: Verify your API key and authentication setup.

Unexpected server error.

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": "internal_error",
"message": "Database connection failed"
}
}

Solution: Retry with exponential backoff. If it persists, contact support.

  • Per account: 100 requests/minute
  • Per key: 50 requests/minute

Exceeded limits return 429 Too Many Requests at the HTTP layer (before MCP processing).

Check which sites need a WordPress account connection

Section titled “Check which sites need a WordPress account connection”
List my sites and show which ones need WordPress account connection

Claude filters sites where wp_connection_status !== "connected".

Which of my sites have knowledge base search enabled?

Claude filters sites where kb_enabled === true.

List all my active WordPress sites, handling pagination automatically

Claude iterates offset until offset + limit ≥ total.

Last updated: