Skip to main content
POST
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
resources
curl -X POST \
  -H "Authorization: Bearer gmcp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "docs://tool-guide",
    "name": "Tool Usage Guide",
    "description": "Instructions for using weather tools effectively",
    "mime_type": "text/markdown",
    "data_source_type": "static",
    "data_source_config": {
      "content": "# Weather Tools Guide\n\nUse `get_weather` for current conditions."
    }
  }' \
  "https://yoursite.com/wp-json/getmcp/v1/servers/1/resources"
{
  "id": 3,
  "server_id": 1,
  "uri": "docs://tool-guide",
  "name": "Tool Usage Guide",
  "description": "Instructions for using weather tools effectively",
  "mime_type": "text/markdown",
  "data_source_type": "static",
  "data_source_config": {
    "content": "# Weather Tools Guide\n\n..."
  },
  "template_uri": null,
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00"
}

Path Parameters

server_id
integer
required
The numeric ID of the server to add the resource to.

Body Parameters

uri
string
required
Unique URI identifier for the resource (e.g., docs://getting-started).
name
string
required
Human-readable resource name.
description
string
Description of what the resource contains.
mime_type
string
default:"text/plain"
MIME type of the content (e.g., text/plain, text/markdown, application/json).
data_source_type
string
default:"static"
Where the content comes from. One of: static, url, wp_query, dynamic.
data_source_config
object
Configuration for the data source. Structure depends on data_source_type.
template_uri
string
URI template (RFC 6570) for parameterized resources.
curl -X POST \
  -H "Authorization: Bearer gmcp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "docs://tool-guide",
    "name": "Tool Usage Guide",
    "description": "Instructions for using weather tools effectively",
    "mime_type": "text/markdown",
    "data_source_type": "static",
    "data_source_config": {
      "content": "# Weather Tools Guide\n\nUse `get_weather` for current conditions."
    }
  }' \
  "https://yoursite.com/wp-json/getmcp/v1/servers/1/resources"
{
  "id": 3,
  "server_id": 1,
  "uri": "docs://tool-guide",
  "name": "Tool Usage Guide",
  "description": "Instructions for using weather tools effectively",
  "mime_type": "text/markdown",
  "data_source_type": "static",
  "data_source_config": {
    "content": "# Weather Tools Guide\n\n..."
  },
  "template_uri": null,
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00"
}