> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.basement.chat/pt-br/api-reference/api-do-gateway/services/list/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.basement.chat/_mcp/server. # List connected services POST https://mcp.basement.chat/v1/tools/list_connected_services List the external services (connected MCP servers, e.g. jira, glpi) that this agent can use. Returns the service slugs and each connection with its connectionId. Reference: https://docs.basement.chat/pt-br/api-reference/api-do-gateway/services/list ## Authentication - `Authorization` header (bearer token, required) — A Basement key (bsmt_...), from Agents, Connect in the app. ## Response ### 200 The tool's answer. - `connected` (list of string, required) - `connections` (list of Connection, required) ## Errors ### 400 Bad Request Error The arguments are not valid, or the tool refused them. - `error` (ErrorResponseError, required) ### 401 Unauthorized Error The API key is missing, wrong, revoked or expired. - `error` (ErrorResponseError, required) ### 403 Forbidden Error The key's access level does not allow this call. - `error` (ErrorResponseError, required) ### 429 Too Many Requests Error Too many calls in a minute. Wait and try again. - `error` (ErrorResponseError, required) ### 500 Internal Server Error Basement failed to complete the call. - `error` (ErrorResponseError, required) ## Types ### Connection - `connectionId` (string, required) - `service` (string, required) — The service's slug, e.g. jira - `name` (string, required) - `label` (string, required, nullable) - `visibility` (string, required) - `toolsCount` (integer, required) ### ErrorResponseError - `code` (string, required) — unauthorized, forbidden, invalid_request, not_found, rate_limited, service_error or internal_error - `message` (string, required) — What went wrong, in English ## Examples **Response** ```json { "connected": [ "string" ], "connections": [ { "connectionId": "string", "service": "string", "name": "string", "label": "string", "visibility": "string", "toolsCount": 1 } ] } ``` **SDK Code** ```python import requests url = "https://mcp.basement.chat/v1/tools/list_connected_services" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://mcp.basement.chat/v1/tools/list_connected_services'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; 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://mcp.basement.chat/v1/tools/list_connected_services" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") 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://mcp.basement.chat/v1/tools/list_connected_services") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://mcp.basement.chat/v1/tools/list_connected_services") .header("Authorization", "Bearer ") .asString(); ``` ```php request('POST', 'https://mcp.basement.chat/v1/tools/list_connected_services', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://mcp.basement.chat/v1/tools/list_connected_services"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://mcp.basement.chat/v1/tools/list_connected_services")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```