Governed ability
Upload media from URL
aafm/upload-media-from-urlGuarded write
Upload media from URL is a governed ability in Agent Abilities for MCP, a free WordPress plugin that runs an MCP server on your site.
Fetch an image over HTTPS and upload it (jpg, png, gif, webp; SVG rejected). The URL must resolve to a public host; private/loopback/link-local addresses and redirects are refused. Hostname is resolved once and pinned to the connection via CURLOPT_RESOLVE (so TLS SNI/cert checks still use the real hostname), no redirect following, size-capped, byte-sniffed against the same image allow-list as upload-media. New in 1.7.4.
How it is governed
The same model as every ability in the plugin, stated for this one.
- Off until you enable it
Like every ability, Upload media from URL ships switched off. You turn it on one at a time, and an update never widens access on its own.
- Guarded write
Writes stay conservative, and the plugin re-checks the capability before the call runs.
- Capability gated
A connection only sees Upload media from URL if the user you connected can run it, and the plugin checks that capability again before it executes.
- Every call audited
The call is written to the log in your own database, denials included, with the argument keys and the identifiers it touched, never free-text content.
Upload media from URL is one of the 8 governed Media abilities. Browse the other Media abilities in the catalog.
See it in action
An illustrative run. Your real calls and data stay on your own site.
Try it with a prompt
Example requests you could paste to your agent.
Fetch the product photo at this https URL and add it to the media library.
Import that press image from the supplier site into the library so I can attach it to post 142.
Pull in the header graphic from this https link and upload it as an attachment.
These are illustrative example prompts. The agent runs them as the user you connected, checked against that user's capabilities and written to your audit log.
Frequently asked
Short answers for Upload media from URL.
Which URLs will it accept?
HTTPS only, resolving to a public host. It refuses bare IP literal hosts and private, loopback, or link-local addresses, and it follows no redirects, so the URL you give it is the one it fetches.
What file types can it bring in?
The same image allow-list as Upload media: jpg, png, gif, and webp, checked by sniffing the actual bytes rather than trusting the URL or the response headers. SVG is rejected. The download is size-capped.
How is it controlled?
Upload media from URL is a guarded write, off until an administrator enables it, and capability gated. Every upload is written to the audit log with the acting user.
Governed by default, from the first call.
Upload media from URL is off until you enable it, scoped to the user you connect, and logged like everything else. Turn on only what you need.
Every ability off until you enable it, capability-gated on every call.