curl --request POST \
--url https://{host}/api/registry/v1/servers/{server_id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/registry/v1/servers/{server_id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/registry/v1/servers/{server_id}/publish', 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://{host}/api/registry/v1/servers/{server_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://{host}/api/registry/v1/servers/{server_id}/publish"
req, _ := http.NewRequest("POST", 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.post("https://{host}/api/registry/v1/servers/{server_id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/registry/v1/servers/{server_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"enabled": true,
"configuration": {},
"name": "<string>",
"slug": "<string>",
"oauth_base_url_override": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"uses_managed_credentials": true,
"ema_enabled": false,
"scopes": [
"<string>"
],
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcp_server_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"meta": "<unknown>",
"tools_fetch_status": "<string>",
"tools_fetch_error": "<unknown>",
"tools_fetched_at": "2023-11-07T05:31:56Z",
"tools_fetch_requested_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"mcp_server_directory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"runtime": {},
"configuration_schema": {},
"tool_manifest": [
{}
],
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"slug": "<string>",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"protocol": "mcp",
"source": "barndoor",
"provider": "custom",
"provider_options": "<unknown>",
"scopes": [
"<string>"
],
"oauth_metadata": {},
"protected_resource_metadata": {},
"allow_oauth_override": false,
"meta": {},
"auth_params": "<unknown>",
"credential_schema": "<unknown>",
"public": false,
"requires_auth": false,
"requires_auth_observed_at": "2023-11-07T05:31:56Z"
},
"mcp_server_service_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcp_server_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_message": "<string>",
"connected_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"connected_by_user_id": "<string>",
"account_email": "<string>",
"error_reason": "authorization_not_completed"
},
"connection_status": "pending",
"connection_error_reason": "authorization_not_completed",
"url": "<string>",
"proxy_url": "<string>",
"can_manage_policies": true,
"attention_tier": "pending_publish",
"publish_blockers": [
"not_operationally_available"
],
"cascaded_fields": [
"<string>"
],
"deleted_at": "2023-11-07T05:31:56Z",
"credential_mode": "managed",
"uses_cimd": false,
"tools_count": 123,
"resources_count": 123
}Publish Mcp Server
BCP-3039 — one-way publish gate.
Publishing makes a server discoverable in end-user listings
(published_at IS NOT NULL). It is deliberately one-way: there is no
unpublish, and later operational-state changes never hide a published
server — taking a server out of service means deactivating its policies.
Preconditions (422 when unmet):
- the server is operationally available (
server_available_expr: status=active AND requires_auth=false / embedded-local source / a “connected” tenant service-account connection), and - it has at least one ACTIVE policy (verified against policy-service with the caller’s own token; 403 when policy-service refuses the caller, 503 when it can’t answer).
Re-publishing an already-published server is an idempotent no-op success.
Audit: every rejected publish of an existing server (403/422/503) and every state-changing success emit an event; the idempotent no-op does not, so the audit trail means “a publish happened”.
curl --request POST \
--url https://{host}/api/registry/v1/servers/{server_id}/publish \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/registry/v1/servers/{server_id}/publish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/registry/v1/servers/{server_id}/publish', 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://{host}/api/registry/v1/servers/{server_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://{host}/api/registry/v1/servers/{server_id}/publish"
req, _ := http.NewRequest("POST", 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.post("https://{host}/api/registry/v1/servers/{server_id}/publish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/registry/v1/servers/{server_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"enabled": true,
"configuration": {},
"name": "<string>",
"slug": "<string>",
"oauth_base_url_override": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"uses_managed_credentials": true,
"ema_enabled": false,
"scopes": [
"<string>"
],
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcp_server_directory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"meta": "<unknown>",
"tools_fetch_status": "<string>",
"tools_fetch_error": "<unknown>",
"tools_fetched_at": "2023-11-07T05:31:56Z",
"tools_fetch_requested_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"mcp_server_directory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"runtime": {},
"configuration_schema": {},
"tool_manifest": [
{}
],
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"slug": "<string>",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"protocol": "mcp",
"source": "barndoor",
"provider": "custom",
"provider_options": "<unknown>",
"scopes": [
"<string>"
],
"oauth_metadata": {},
"protected_resource_metadata": {},
"allow_oauth_override": false,
"meta": {},
"auth_params": "<unknown>",
"credential_schema": "<unknown>",
"public": false,
"requires_auth": false,
"requires_auth_observed_at": "2023-11-07T05:31:56Z"
},
"mcp_server_service_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mcp_server_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_message": "<string>",
"connected_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"connected_by_user_id": "<string>",
"account_email": "<string>",
"error_reason": "authorization_not_completed"
},
"connection_status": "pending",
"connection_error_reason": "authorization_not_completed",
"url": "<string>",
"proxy_url": "<string>",
"can_manage_policies": true,
"attention_tier": "pending_publish",
"publish_blockers": [
"not_operationally_available"
],
"cascaded_fields": [
"<string>"
],
"deleted_at": "2023-11-07T05:31:56Z",
"credential_mode": "managed",
"uses_cimd": false,
"tools_count": 123,
"resources_count": 123
}Authorizations
Scopes
Response
Published — or already published, an idempotent no-op
Response model for MCP server with computed fields.
This model includes both database fields and computed fields like connection_status, url, and proxy_url that are added at runtime.
Connection status values for MCP servers.
These values represent the computed connection status of a server from the user's perspective, taking into account server configuration, Bao registration, and user connections.
pending, connected, available, error Why a connection is in error, as a code safe to show its owner.
It is derived from error_message, which can hold an arbitrary exception
string and is never shown in its place.
authorization_not_completed, authorization_denied, reauthorization_required, other BCP-3815 — API vocabulary for the :func:attention_rank_expr tiers.
Emitted as attention_tier on server read payloads so the client badges a
server from the same CASE that filters (availability_filter_expr), sorts
(order_by=attention) and counts (/servers/summary) it — one
classification, declared once, instead of a second hand-written copy in
TypeScript that could drift with every suite green.
pending_publish, connection_error, pending_credentials, pending_connection, available Where the server's OAuth client credentials come from. managed: Barndoor's managed OAuth client for this provider. cimd: Barndoor's client ID metadata document. dcr: a client registered with the provider through dynamic client registration. manual: a client ID entered by an administrator. static_client: a per-server client that was either entered by hand or registered through dynamic client registration by a request that did not name credential_mode, so Barndoor cannot tell which. It changes when an update stores a client whose source is known: managed credentials, a client Barndoor registers, or a new client ID sent with credential_mode: manual. none: the server holds no OAuth client (not yet configured, or its provider does not use OAuth).
managed, cimd, dcr, manual, static_client, none