Back to Smithery

List connections

docs-api-reference-connect-list-connections.md

latest6.8 KB
Original Source

GET

/

connect

/

{namespace}

Try it

List connections

cURL

curl --request GET \
  --url https://api.smithery.ai/connect/{namespace} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.smithery.ai/connect/{namespace}"

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

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.smithery.ai/connect/{namespace}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.smithery.ai/connect/{namespace}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

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

func main() {

	url := "https://api.smithery.ai/connect/{namespace}"

	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(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/connect/{namespace}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.smithery.ai/connect/{namespace}")

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

200

400

{
  "connections": [
    {
      "connectionId": "clever-dolphin-a9X3",
      "name": "<string>",
      "mcpUrl": "<string>",
      "metadata": {},
      "transport": "http",
      "mock": {
        "enabled": true,
        "scenario": "Slack workspace with an active #community-ops channel containing recent event-planning messages, plus 50 Airtable candidate records with mixed tenure and interests."
      },
      "iconUrl": "<string>",
      "createdAt": "<string>",
      "status": {
        "state": "connected"
      },
      "serverInfo": {
        "name": "<string>",
        "version": "<string>",
        "title": "<string>",
        "icons": [
          {
            "src": "<string>",
            "mimeType": "<string>",
            "sizes": [
              "<string>"
            ],
            "theme": "light"
          }
        ],
        "websiteUrl": "<string>",
        "description": "<string>"
      }
    }
  ],
  "nextCursor": "<string>"
}
{
  "error": "not_found",
  "message": "Resource not found"
}

Authorizations

[​

](#authorization-authorization)

Authorization

string

header

required

Smithery API key as Bearer token

Path Parameters

[​

](#parameter-namespace)

namespace

string

required

Query Parameters

[​

](#parameter-limit)

limit

integer

Maximum number of items to return (default 100, max 100)

Required range: 1 <= x <= 100

Example:

50

[​

](#parameter-cursor)

cursor

string

Pagination cursor from previous response's nextCursor

[​

](#parameter-name)

name

string

Filter by exact connection name

[​

](#parameter-mcp-url)

mcpUrl

string

Filter by exact MCP server URL

Response

200

application/json

List of connections

[​

](#response-connections)

connections

object[]

required

Show child attributes

[​

](#response-next-cursor-one-of-0)

nextCursor

string | null

required

Cursor for next page, null if no more results

Was this page helpful?

YesNo

⌘I

List connections

cURL

curl --request GET \
  --url https://api.smithery.ai/connect/{namespace} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.smithery.ai/connect/{namespace}"

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

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.smithery.ai/connect/{namespace}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.smithery.ai/connect/{namespace}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

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

func main() {

	url := "https://api.smithery.ai/connect/{namespace}"

	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(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/connect/{namespace}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.smithery.ai/connect/{namespace}")

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

200

400

{
  "connections": [
    {
      "connectionId": "clever-dolphin-a9X3",
      "name": "<string>",
      "mcpUrl": "<string>",
      "metadata": {},
      "transport": "http",
      "mock": {
        "enabled": true,
        "scenario": "Slack workspace with an active #community-ops channel containing recent event-planning messages, plus 50 Airtable candidate records with mixed tenure and interests."
      },
      "iconUrl": "<string>",
      "createdAt": "<string>",
      "status": {
        "state": "connected"
      },
      "serverInfo": {
        "name": "<string>",
        "version": "<string>",
        "title": "<string>",
        "icons": [
          {
            "src": "<string>",
            "mimeType": "<string>",
            "sizes": [
              "<string>"
            ],
            "theme": "light"
          }
        ],
        "websiteUrl": "<string>",
        "description": "<string>"
      }
    }
  ],
  "nextCursor": "<string>"
}
{
  "error": "not_found",
  "message": "Resource not found"
}