Skip to main content
POST
/
api
/
public
/
organizations
/
{orgId}
/
mcp-servers
Create an MCP server
curl --request POST \
  --url https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "<string>",
  "serverUrl": "<string>",
  "headers": [],
  "everyoneInOrganizationCanAccess": true
}
'
import requests

url = "https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers"

payload = {
"displayName": "<string>",
"serverUrl": "<string>",
"headers": [],
"everyoneInOrganizationCanAccess": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
serverUrl: '<string>',
headers: [],
everyoneInOrganizationCanAccess: true
})
};

fetch('https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers', 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://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '<string>',
'serverUrl' => '<string>',
'headers' => [

],
'everyoneInOrganizationCanAccess' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers"

payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": [],\n \"everyoneInOrganizationCanAccess\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": [],\n \"everyoneInOrganizationCanAccess\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://charts.basedash.com/api/public/organizations/{orgId}/mcp-servers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": [],\n \"everyoneInOrganizationCanAccess\": true\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "<string>",
    "displayName": "<string>",
    "serverUrl": "<string>",
    "serverLabel": "<string>",
    "lastSyncStatus": "PENDING",
    "lastSyncAttemptAt": "2023-11-07T05:31:56Z",
    "lastSuccessfulSyncAt": "2023-11-07T05:31:56Z",
    "hasCompletedFirstSync": true,
    "syncErrorMessage": "<string>",
    "tools": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "readOnlyHint": true,
        "foundInServer": true
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "authUrl": "<string>",
    "requiresAuth": true
  }
}
{
"error": {
"title": "<string>",
"detail": "<string>"
}
}
{
"error": {
"title": "<string>",
"detail": "<string>"
}
}
{
"error": {
"title": "<string>",
"detail": "<string>"
}
}
{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123
}
}
{
"error": {
"title": "<string>",
"detail": "<string>"
}
}

Side effects

When an MCP server is successfully created:
  1. Tool sync - Basedash connects to the MCP server and syncs its tools
  2. OAuth bootstrap - If the server advertises OAuth, the response includes an authorization URL
  3. Trial activation - If the organization has never been on a trial, a trial period is automatically started

Authorizations

Authorization
string
header
required

API key authentication using Bearer token format: Bearer <basedash_api_key>

Path Parameters

orgId
string
required

Organization ID

Body

application/json
displayName
string
required

Display name for the MCP server

Required string length: 1 - 120
serverUrl
string
required

MCP server URL

Required string length: 1 - 2000
headers
object[]

Static headers to use when connecting to the MCP server

everyoneInOrganizationCanAccess
boolean
default:true

Whether every member in the organization can use this MCP server

Response

MCP server created successfully

data
object
required