Skip to main content
Glama
gopalcnepal

WordPress MCP Server

by gopalcnepal

WordPress MCP Server

A Model Context Protocol (MCP) server for interacting with WordPress sites. This server provides tools to fetch posts, pages, categories, and site information from any WordPress installation with REST API enabled.

Prerequisites

  • Python 3.13

  • WordPress site with REST API enabled

  • UV package installer (recommended)

Related MCP server: WordPressMCP Server

Installation

  1. Install UV (Universal Virtualenv):

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone the repository:

git clone <repository-url>
cd wordpress
  1. Create and activate a virtual environment:

uv venv
source .venv/bin/activate  # On Windows, use `.venv\Scripts\activate`
  1. Install dependencies using UV:

uv add "mcp[cli]" httpx

Configuration

  1. Create a .env file in the project root:

WORDPRESS_URL="https://your-wordpress-site.com"

Usage

Using Claude for Desktop:

  • First, start the server:

uv run main.py
  • In Claude for Desktop, go to Settings > Developer

  • Click "Edit Config"

  • Alternative Edit config approach using VSCode in Mac/Windows:

    # For Mac Users
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    # For Windows Users
    code $env:AppData\Claude\claude_desktop_config.json
  • Add the file to config:

{
    "mcpServers": {
        "weather": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/wordpress",
                "run",
                "main.py"
            ]
        }
    }
}

The server provides these testable tools:

  • fetch_wordpress_info: Get basic site information

  • fetch_posts: Get recent posts

  • fetch_categories: List all categories

  • fetch_posts_by_category: Get posts in a specific category

  • fetch_pages: Get site pages

  • fetch_post_by_id: Get a specific post

  • fetch_page_by_id: Get a specific page

Error Handling

The server includes robust error handling for:

  • Invalid JSON responses

  • Network errors

  • WordPress API errors

  • Invalid URLs

  • API authentication issues

Available Tools

7 tools
fetch_categoriesA

Fetch list of categories from a WordPress site. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states basic fetch behavior and return type, without disclosing potential side effects, authentication needs, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief but includes necessary information (fetch action and return type). It is well-structured and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no parameters and no output schema, the description covers the core functionality and return type. However, it could mention any default behavior or limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters (0 params, 100% coverage). The description adds no additional meaning beyond the schema, which is adequate for this simple case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches a list of categories from a WordPress site, which is a specific verb-resource combination that distinguishes it from sibling tools like fetch_posts_by_category.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives; usage is implied by the tool's name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_page_by_idA

Fetch a single page by ID from a WordPress site. Args: page_id (int): The ID of the page to fetch. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault
page_idYes

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the return type but omits behavioral traits such as authentication needs, error handling, or side effects. Minimal disclosure beyond the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: two main sentences plus structured Args/Returns. It front-loads the core action and wastes no words. Every part is useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is fairly complete. It covers the purpose, parameter, and return type. Minor missing context like error behavior, but adequate for a simple fetch operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides a clear explanation of the page_id parameter ('The ID of the page to fetch'), adding meaning that the schema lacks. It compensates well for the gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (Fetch), resource (a single page), and identifier (by ID). It distinguishes from sibling tools like fetch_pages (multiple) and fetch_post_by_id (different post type).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you have a specific page ID, but lacks explicit guidance on when not to use it or alternatives. No exclusions or comparisons to siblings are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_pagesC

Fetch pages from a WordPress site. Args: page (int): The page number to fetch. per_page (int): The number of pages per page. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It only states that the tool fetches pages and returns a dict, but does not disclose any behavioral traits such as pagination limits, authentication needs, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the purpose. The additional arg/return documentation is acceptable, though it is slightly redundant with schema. No unnecessary sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is provided, so the description should explain return values. It only says 'dict[str, Any]: The response from the WordPress API,' which is too vague. It does not specify common keys like id, title, or content, leaving the agent uncertain about how to use the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds minimal meaning: 'page (int): The page number to fetch' and 'per_page (int): The number of pages per page.' This is basic and does not explain the semantics (e.g., what a 'page' is in WordPress context).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch pages from a WordPress site,' which is a specific verb and resource. It distinguishes from sibling tools like fetch_page_by_id (single page) and fetch_categories (different resource).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus sibling tools like fetch_page_by_id or fetch_posts. It does not mention use cases or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_post_by_idA

Fetch a single post by ID from a WordPress site. Args: post_id (int): The ID of the post to fetch. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault
post_idYes

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description only states it fetches a post but does not disclose side effects, auth needs, rate limits, or error behavior. Lacks depth for a simple read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three lines, first sentence states purpose directly. No wasted words. Args and returns clearly formatted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given low complexity (1 param, no output schema), description is mostly complete. Could include when to use vs fetch_posts, but overall adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Description explains that post_id is 'The ID of the post to fetch', adding meaning beyond the schema which has no description. Single parameter, clearly explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the verb 'fetch', resource 'post', and identifier 'by ID'. Distinguishes from sibling tools that fetch lists or by different criteria.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly suggests using this tool when you have a specific post ID, but no explicit guidance on when to use alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_postsB

Fetch posts from a WordPress site. Args: page (int): The page number to fetch. per_page (int): The number of posts per page. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must fully disclose behavioral traits. It only mentions the return type ('dict') but omits details on authentication, rate limits, error conditions, or the nature of the API endpoint. The description adds minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and structured with a clear purpose statement followed by Args and Returns sections. Every sentence adds value without redundancy. It is front-loaded and easily parsable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple paginated fetch, the description covers the basic functionality but lacks completeness in areas like error handling, response structure details (beyond 'dict'), and usage context relative to sibling tools. The absence of an output schema is partially mitigated by mentioning the return type.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description repeats the parameter names and types from the schema, adding brief semantics: 'the page number' and 'the number of posts per page'. However, with 0% schema description coverage, the description only partially compensates by offering basic meaning, not deeper context like valid ranges or pagination behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch posts from a WordPress site' with a specific verb and resource. It distinguishes from siblings like fetch_categories and fetch_pages, though could further clarify differentiation from fetch_post_by_id and fetch_posts_by_category.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as fetch_post_by_id for individual posts or fetch_posts_by_category for filtered results. The agent is left to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_posts_by_categoryA

Fetch posts by category name provided from a WordPress site. Args: category (str): The category name to filter posts by. page (int): The page number to fetch. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryYes
pageNo

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description carries full burden. States it fetches data (implied read-only) but does not disclose behavioral traits like auth requirements, rate limits, or side effects. Lacks detail beyond basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences plus a structured args/returns block. Purpose is front-loaded. Slight verbosity from docstring format, but no redundant content. Efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool with no output schema, description covers basics (purpose, params, return type). Lacks details on pagination limits, error handling, or output structure, which would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It explains 'category' as the category name and 'page' as page number, adding context beyond schema types. However, it could be more descriptive about defaults or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it fetches posts by category name from WordPress, a specific verb+resource. Distinguishes from siblings like 'fetch_posts' (no category filter) and 'fetch_categories' (different entity).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for category-filtered post retrieval but provides no explicit guidance on when to use this tool over alternatives like 'fetch_posts' or 'fetch_post_by_id'. No exclusion criteria or context provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_wordpress_infoC

Fetch WordPress site information. Returns: dict[str, Any]: The response from the WordPress API.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.8/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It only states it 'fetches' and returns a dict, without mentioning any behavioral traits such as required authentication, rate limits, side effects, or the structure of the response. This is a significant gap for a tool that likely requires interaction with an external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise—two sentences and 28 words. It front-loads the core purpose. However, it could be slightly longer to include behavioral or return details without becoming verbose. It earns its place but is not maximally informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and annotations, the description should provide more details about what 'site information' includes. It only says 'dict[str, Any]' without specifying the actual keys or structure. This is insufficient for an agent to understand what it will receive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (trivially). The description adds no parameter info, but the baseline for 0 parameters is 4, and it does not fall short of that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Fetch WordPress site information', which clearly identifies the action and resource. However, it does not differentiate from sibling tools like fetch_categories or fetch_pages, which also fetch specific types of information. The verb 'fetch' and resource 'site information' are clear but generic.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It lacks explicit context about use cases, prerequisites, or alternatives. For example, it does not mention that fetch_page_by_id should be used for individual pages or that fetch_posts_by_category is for category-filtered posts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv0.1.0
    • First observedfetch_categories
    • First observedfetch_page_by_id
    • First observedfetch_pages
    • First observedfetch_post_by_id
    • First observedfetch_posts
    • First observedfetch_posts_by_category
    • First observedfetch_wordpress_info

TDQS

A3.5/5.0
Disambiguation5/5

Each tool targets a distinct resource (categories, pages, posts, site info) or filtering method, with no overlap between them.

Naming Consistency5/5

All tools follow a consistent 'fetch_<entity>[_by_<filter>]' pattern, using snake_case throughout.

Tool Count5/5

7 tools is well-scoped for a read-only WordPress interface, covering the main retrieval needs without being excessive.

Completeness2/5

The server is read-only with no create, update, or delete operations, which is a significant gap for a full WordPress management experience.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gopalcnepal/mcp-wordpress'

If you have feedback or need assistance with the MCP directory API, please join our Discord server