---
title: "List MCP resources"
method: GET
path: "/api/mcp/resource"
tags: ["mcp"]
---

# List MCP resources

`GET /api/mcp/resource`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/mcp/resource`
- Auth: none required

Retrieve resources and resource templates from connected MCP servers.

## Query parameters

- `location` object, nullable
  - `directory` string, nullable

## Response `200`

Success

- object
  - `location` LocationPublicRef, required
    - `directory` string, required
  - `data` McpResourceCatalog, required
    - `resources` McpResource[], required
      - `server` string, required
      - `name` string, required
      - `uri` string, required
      - `description` string
      - `mimeType` string
    - `templates` McpResourceTemplate[], required
      - `server` string, required
      - `name` string, required
      - `uriTemplate` string, required
      - `description` string
      - `mimeType` string

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: LocationNotFoundError

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
