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

# List MCP servers

`GET /api/mcp`

## 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`
- Auth: none required

Retrieve configured MCP servers and their connection status.

## Query parameters

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

## Response `200`

Success

- object
  - `location` LocationPublicRef, required
    - `directory` string, required
  - `data` McpServer[], required
    - `name` string, required
    - `status` union, required
      - McpStatusConnected
        - `status` 'connected', required
      - McpStatusPending
        - `status` 'pending', required
      - McpStatusDisabled
        - `status` 'disabled', required
      - McpStatusFailed
        - `status` 'failed', required
        - `error` string, required
      - McpStatusNeedsAuth
        - `status` 'needs_auth', required
        - `error` string, required
    - `title` string
    - `integrationID` string

## Other responses

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

## Changes

> 50 revisions in range; 1 not diffed.

- **2026-10-25** `a22a587655ad`: 1 info
  - added the optional property `data/items/title` to the response with the `200` status

[Operation history](https://skmtc.dev/kaaass/apis/opencode/changes/api/mcp/get.md)

---

[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)
