> ## 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.

# resources/read

> Read the content of a specific resource by URI.

The `resources/read` method returns the full content of a resource. The URI must match one returned by [`resources/list`](/api-reference/mcp-protocol/resources-list).

## MCP Endpoint

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

## Request

<ParamField body="jsonrpc" type="string" required>
  Must be `"2.0"`.
</ParamField>

<ParamField body="id" type="integer | string" required>
  Arbitrary request identifier echoed back unchanged in the response.
</ParamField>

<ParamField body="method" type="string" required>
  Must be `"resources/read"`.
</ParamField>

<ParamField body="params.uri" type="string" required>
  The URI of the resource to read (e.g. `"docs://api-overview"`). Must match a URI returned by `resources/list`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  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"
    }
  }
  '
  ```

  ```python Python theme={null}
  import requests
  response = requests.post(
      "https://yoursite.com/mcp/my-server",
      headers={"Content-Type": "application/json"},
      json={
          "jsonrpc": "2.0",
          "id": 2,
          "method": "resources/read",
          "params": {"uri": "docs://api-overview"}
      }
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://yoursite.com/mcp/my-server",
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        jsonrpc: "2.0",
        id: 2,
        method: "resources/read",
        params: { uri: "docs://api-overview" }
      })
    }
  );
  const data = await response.json();
  ```
</RequestExample>

## Response

<ResponseField name="result.contents" type="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
</ResponseField>

<ResponseExample>
  ```json 200 OK (text/markdown resource) theme={null}
  {
    "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"
        }
      ]
    }
  }
  ```

  ```json 200 OK (application/json resource) theme={null}
  {
    "jsonrpc": "2.0",
    "id": 2,
    "result": {
      "contents": [
        {
          "uri": "resource://products/featured",
          "mimeType": "application/json",
          "text": "[{\"id\":1,\"name\":\"Widget Pro\",\"price\":29.99},{\"id\":2,\"name\":\"Widget Lite\",\"price\":9.99}]"
        }
      ]
    }
  }
  ```

  ```json 200 OK (resource not found) theme={null}
  {
    "jsonrpc": "2.0",
    "id": 2,
    "error": {
      "code": -32602,
      "message": "Resource not found: docs://unknown"
    }
  }
  ```
</ResponseExample>

## Request Parameters

<ParamField body="params.uri" type="string" required>
  The URI of the resource to read. Must exactly match a URI from `resources/list`.
</ParamField>

<Note>
  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.
</Note>
