Site MCP servers

Configure external MCP servers used by your site.

Manage Model Context Protocol (Mcp) servers used by your site.

The SiteMcpServer object

Attributes
objectstring · enumrequiredAvailable options:
idstringrequired

Unique identifier for the MCP server

namestring · min: 1 · max: 100required

Name of the MCP server

urlstring · uri · max: 2048required
headersobjectrequired

HTTP headers sent with requests to this server

urlsobjectrequired

URLs associated with the object

The SiteMcpServer object

{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

List all MCP servers for a site

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

Query parameters
pagestringoptional

Identifier of the page results to fetch.

limitnumber · max: 1000optional

The number of results per page

Responses
application/json
all ofoptional
get
GET /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "site-mcp-server",
      "id": "text",
      "name": "text",
      "url": "https://example.com",
      "headers": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "urls": {
        "location": "https://example.com"
      }
    }
  ]
}

Create a new MCP server

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

Body
namestring · min: 1 · max: 100required

Name of the MCP server

urlstring · uri · max: 2048required
headersobjectrequired

HTTP headers sent with requests to this server

Responses
application/json
objectoptional
post
POST /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
201

MCP server created

{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Get a site MCP server

get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteMcpServerIdstringrequired

The unique id of the MCP server

Responses
application/json
objectoptional
get
GET /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Delete a site MCP server

delete
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteMcpServerIdstringrequired

The unique id of the MCP server

Responses
delete
DELETE /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No Content

Update a site MCP server

patch
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

siteMcpServerIdstringrequired

The unique id of the MCP server

Body
namestring · min: 1 · max: 100optional

Name of the MCP server

urlstring · uri · max: 2048optional
headersobjectoptional

HTTP headers sent with requests to this server

Responses
application/json
objectoptional
patch
PATCH /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
200

OK

{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}

Was this helpful?