> ## Documentation Index
> Fetch the complete documentation index at: https://gaia-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read MCP Resource

> Retrieves the content of a specific resource by URI

## Query Parameters

<ParamField query="id" type="string" required>
  MCP server ID
</ParamField>

<ParamField query="uri" type="string" required>
  Resource URI to read
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="result" type="object">
  Resource content and metadata. The structure depends on the resource type and may include fields like `content`, `mimeType`, and other resource-specific data.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.example.com/api/mcp/resource?id=mcp_abc123&uri=file:///data/config.json" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    id: 'mcp_abc123',
    uri: 'file:///data/config.json'
  });

  const response = await fetch(
    `https://api.example.com/api/mcp/resource?${params}`,
    {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.example.com/api/mcp/resource',
      headers={'Authorization': 'Bearer YOUR_API_KEY'},
      params={
          'id': 'mcp_abc123',
          'uri': 'file:///data/config.json'
      }
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "result": {
      "uri": "file:///data/config.json",
      "mimeType": "application/json",
      "content": {
        "apiKey": "***",
        "environment": "production",
        "features": {
          "auth": true,
          "logging": true
        }
      }
    }
  }
  ```

  ```json Not Found theme={null}
  {
    "success": false,
    "message": "Resource not found"
  }
  ```
</ResponseExample>
