Skip to main content
Access resources like files and data stored in the MCP gateway.

resources/list

List available resources. Request:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "resources/list",
  "params": {}
}
Response:
{
  "result": {
    "resources": [
      {
        "uri": "file:///workspace/data.txt",
        "name": "data.txt",
        "description": "Input data file",
        "mimeType": "text/plain"
      }
    ]
  }
}

resources/read

Read a specific resource. Request:
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "resources/read",
  "params": {
    "uri": "file:///workspace/data.txt"
  }
}
Response:
{
  "result": {
    "contents": [
      {
        "uri": "file:///workspace/data.txt",
        "mimeType": "text/plain",
        "text": "file contents here"
      }
    ]
  }
}

Resource URIs

Resources are identified by URIs:
SchemeExampleDescription
file://file:///workspace/data.txtFile path
http://http://example.com/dataHTTP resource
https://https://example.com/dataHTTPS resource