List All Posts


Lists all posts of every status (published, draft, pending, scheduled, private, trashed), with an optional status filter. Returns at most per_page posts (default 20) plus the total number of matching posts. Users who cannot edit others' posts only see their own posts.

Property Value
Ability slug mosmcp/post-list-all
Wire tool name mosmcp__post-list-all
Category Posts (mosmcp-posts)
Plan Free

 

Required access

Requirement Value
Capability edit_posts
Minimum default role Contributor
Annotations readOnly: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
status string (one of any, publish, draft, pending, future, private, trash) any Filter by post status. Use "any" for all statuses.
per_page integer (1–100) 20 Maximum number of posts to return.
offset integer (min 0) 0 Number of posts to skip, for fetching the next page.

 

Output schema

Field Type Required
showing integer Yes
total integer Yes
posts object[] Yes
posts[].id integer Yes
posts[].title string Yes
posts[].status string Yes
posts[].author_name string
posts[].date string
posts[].modified string
posts[].edit_url string

 

Example

Sample prompt
List all the posts on my site, whatever their status.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__post-list-all",
    "arguments": {
      "input": {
        "status": "any",
        "per_page": 20
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 10,
  "result": {
    "isError": false,
    "structuredContent": {
      "showing": 2,
      "total": 57,
      "posts": [
        {
          "id": 42,
          "title": "Pumpkin Soup",
          "status": "publish",
          "author_name": "Jane Doe",
          "date": "2026-09-20 08:00:00",
          "modified": "2026-09-25 14:12:09",
          "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit"
        },
        {
          "id": 44,
          "title": "Autumn Sale",
          "status": "draft",
          "author_name": "Jane Doe",
          "date": "2026-09-28 11:00:00",
          "modified": "2026-09-28 11:30:00",
          "edit_url": "https://example.com/wp-admin/post.php?post=44&action=edit"
        }
      ]
    }
  }
}

 

Edge cases / errors

  • status outside the allowed list → refused (invalid_status).
  • Users without edit_others_posts (Contributors, Authors) only see their own posts.
  • Sorted by last modified, newest first; per_page is capped at 100 — use offset with total to page through.

 


<< Previous Next >>
Get Post Template And Display Settings List Draft Posts

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.