Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt

Use this file to discover all available pages before exploring further.

The resources/read method returns the full content of a resource. The URI must match one returned by resources/list.

MCP Endpoint

POST https://yoursite.com/mcp/{slug}
Content-Type: application/json

Request

jsonrpc
string
required
Must be "2.0".
id
integer | string
required
Arbitrary request identifier echoed back unchanged in the response.
method
string
required
Must be "resources/read".
params.uri
string
required
The URI of the resource to read (e.g. "docs://api-overview"). Must match a URI returned by resources/list.
curl --request POST \
     --url https://yoursite.com/mcp/my-server \
     --header 'content-type: application/json' \
     --header 'Mcp-Session-Id: your_session_id' \
     --data '
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "resources/read",
  "params": {
    "uri": "docs://api-overview"
  }
}
'

Response

result.contents
array
Array containing a single content object with:
  • uri — The resource URI echoed back
  • mimeType — Content type of the resource
  • text — The full resource content as a string
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "contents": [
      {
        "uri": "docs://api-overview",
        "mimeType": "text/markdown",
        "text": "# API Overview\n\nThis server provides tools for managing customer records.\n\n## Available Operations\n- `get_customer` — Retrieve a customer by ID\n- `create_customer` — Create a new customer record\n"
      }
    ]
  }
}

Request Parameters

params.uri
string
required
The URI of the resource to read. Must exactly match a URI from resources/list.
For wp_query and url data source types, the content is fetched fresh on each resources/read call. For static resources, the content is returned directly from the stored value.