Resources
Create Resource
Create a new resource within a server.
POST
Path Parameters
The numeric ID of the server to add the resource to.
Body Parameters
Unique URI identifier for this resource. Any scheme is valid — common patterns:
docs://getting-started, config://app, file:///data/report.json.Human-readable resource name shown to AI clients.
Description of what the resource contains. Shown to AI clients to help them decide when to read it.
MIME type of the returned content. Common values:
text/plain, text/markdown, application/json.Where the resource content comes from. One of:
| Value | Description |
|---|---|
static | Content stored directly in data_source_config.content |
url | Content fetched from an external URL at read time |
wp_query | Content generated from a WordPress query |
callback | Content generated by a custom PHP callback function |
Configuration for the chosen data source type. Send as a JSON object — the API encodes and stores it internally.Accepts any standard WP_Query argument.The function receives
static — serve fixed text content:url — fetch content from a remote URL:cache_ttl is optional (seconds, default 0 = no cache).wp_query — query WordPress posts/pages:callback — call a registered PHP function:($resource, $params) and must return a string.URI template (RFC 6570) for parameterized resources, e.g.
file:///data/{id}.json.
When set, the resource appears under resources/templates/list in the MCP protocol.
