> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.claw-ops.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.claw-ops.com/_mcp/server.

# 외부 MCP 연결 조회

GET https://api.claw-ops.com/v1/accounts/{accountId}/mcp-connections/{connectionId}

Reference: https://docs.claw-ops.com/api-레퍼런스/claw-ops-api/agents/get-mcp-connection

## Authentication

- `Authorization` header (bearer token, required) — API Key를 Bearer 토큰으로 전달

## Request

### Path parameters

- `accountId` (string, required) — 계정 ID
- `connectionId` (string, required) — MCP 연결 ID

## Response

### 200

조회 성공

- `connectionId` (string, required) — 연결 ID
- `name` (string, required)
- `url` (string, required)
- `host` (string, required) — url 의 호스트. 목록 화면 표시용.
- `transport` (enum, required)
  - Allowed values: `streamable_http`, `sse`
- `authType` (enum, required)
  - Allowed values: `none`, `bearer`, `api_key`
- `authHeaderName` (string, required, nullable) — authType=api_key 일 때의 헤더 이름. bearer 는 Authorization 고정이라 null.
- `hasSecret` (boolean, required) — 자격증명 설정 여부. 값 자체는 조회할 수 없습니다.
- `enabled` (boolean, required)
- `status` (enum, required) — untested 는 연결 테스트를 통과하지 않은 상태입니다. 에이전트에 붙이려면 tested 여야 하며, 통화 중에도 tested 인 연결만 사용됩니다. credential_error 는 마지막 테스트가 인증 실패한 경우입니다.
  - Allowed values: `untested`, `tested`, `credential_error`
- `toolCount` (integer, required)
- `tools` (list of object, required) — 마지막 연결 테스트에서 발견된 도구 목록. 표시·선택용 스냅샷입니다.
  - `name` (string, required)
  - `description` (string, required, nullable)
  - `inputSchema` (map from string to any, required) — 도구 인자의 JSON Schema. 서버가 준 원본입니다.
- `lastTestedAt` (datetime, required, nullable)
- `lastErrorCode` (enum, required, nullable) — 마지막 연결 실패 사유.
  - Allowed values: `URL_BLOCKED`, `AUTH_FAILED`, `TIMEOUT`, `TLS_ERROR`, `PROTOCOL_ERROR`, `TOO_MANY_TOOLS`
- `agentCount` (integer, required) — 이 연결을 사용하는 에이전트 수.
- `dateCreated` (datetime, required)
- `dateUpdated` (datetime, required)

## Examples

**Response**

```json
{
  "connectionId": "clx0mcp0000000000000001",
  "name": "예약 CRM",
  "url": "https://crm.example.com/mcp",
  "host": "crm.example.com",
  "transport": "streamable_http",
  "authType": "bearer",
  "authHeaderName": null,
  "hasSecret": true,
  "enabled": true,
  "status": "tested",
  "toolCount": 3,
  "tools": [
    {
      "name": "get_reservation",
      "description": "예약 번호로 예약 정보를 조회합니다.",
      "inputSchema": {}
    }
  ],
  "lastTestedAt": "2024-01-15T09:30:00Z",
  "lastErrorCode": null,
  "agentCount": 1,
  "dateCreated": "2024-01-15T09:30:00Z",
  "dateUpdated": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.claw-ops.com/v1/accounts/accountId/mcp-connections/connectionId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```