wp_get_media is one of 162 MCP tools included in Easy MCP AI β€” the WordPress plugin that connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin β†’

wp_get_media

Read-only

Description

Before assigning a featured image or embedding a file, your AI needs the exact URL, dimensions, and current alt text β€” this is the tool that fetches all of it in one call. Easy MCP AI surfaces the complete metadata for any media item by ID, letting AI clients like Claude Desktop or Cursor confirm details before chaining into an update or embed operation. The entire lookup flows through Easy MCP AI's pure-PHP server, with no admin login or external proxy required.

See it in action

Claude Desktop β€” MCP Connection
πŸ‘€
Show me the details of the featured image on our homepage.
πŸ€–
Tool called wp_get_media
{
  "media_id": 189,
  "title": "Team Offsite",
  "filename": "team-photo.jpg",
  "mime_type": "image/jpeg",
  "alt": "Team photo",
  "url": "https://yoursite.com/wp-content/uploads/team-photo.jpg",
  "file_size": "842 KB"
}

Here are the full details for that media item.

Example Use Cases & Sample Prompts

  1. Getting an image URL
    • Prompt: β€œFind the company logo in the media library and give me its direct URL.”
  2. Verifying before use
    • Prompt: β€œBefore setting it as a featured image, fetch the uploaded banner image to confirm the dimensions and alt text.”
  3. Checking metadata
    • Prompt: β€œLook up the media item called β€˜hero-image.jpg’ and tell me its current caption and alt text.”
  4. Post association check
    • Prompt: β€œGet the details of the featured image for my latest post to see what file it’s using.”
  5. URL retrieval for embedding
    • Prompt: β€œI need the URL of the PDF we uploaded this week β€” can you get it from the media library?”

Frequently Asked Questions

What does wp_get_media do?

Before assigning a featured image or embedding a file, your AI needs the exact URL, dimensions, and current alt text β€” this is the tool that fetches all of it in one call. Easy MCP AI surfaces the complete metadata for any media item by ID, letting AI clients like Claude Desktop or Cursor confirm details before chaining into an update or embed operation. The entire lookup flows through Easy MCP AI's pure-PHP server, with no admin login or external proxy required.

How do I use wp_get_media with my AI assistant?

Install the Easy MCP AI WordPress plugin, generate an API token in your dashboard, and connect your AI client (Claude, ChatGPT, Cursor, or any MCP-compatible assistant). Then simply describe what you want in natural language β€” for example: "Show me the details of the featured image on our homepage."

Do I need Easy MCP AI to use wp_get_media?

Yes. wp_get_media is one of 162 MCP tools bundled inside the Easy MCP AI WordPress plugin. Install the free plugin from WordPress.org, connect your AI client, and this tool becomes available immediately β€” no coding required.

Step 1

Get the Plugin

Install Easy MCP AI on your WordPress site to unlock wp_get_media and all 74 tools instantly.

Download Free Plugin

Step 2

Connect Your AI Client

Already have the plugin? Step-by-step setup guides for Claude, ChatGPT, Cursor, Windsurf, and 10+ more.

View Setup Guides β†’

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates β€” be the first to know what's next.

No spam, unsubscribe anytime.