Explore how adaptive content transforms your docs into a dynamic, tailored experience for every user.
Read the docs
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • Developer Documentation
    • Quickstart
    • Development
    • Publishing
  • Integrations
    • Introduction
    • Using the CLI
    • Configuration
    • ContentKit
      • Component reference
    • Integration runtime
  • Client library
  • Guides
    • Creating a custom unfurl action
    • Creating interactive blocks
    • Referencing your integration in Markdown
    • Working with HTTP requests
    • Using the CLI in CI/CD
  • GitBook API
    • Introduction
    • Authentication
    • API reference
      • Organizations
        • Organization members
        • Organization invites
        • Organization AI ask
      • Docs sites
        • Site share links
        • Site structure
        • Site auth
        • Site preview
        • Site customization
        • Site spaces
        • Site sections
        • Site section groups
        • Site redirects
        • Site MCP servers
        • Site ads
        • Site users
        • Site insights
        • Site AI ask
      • Collections
        • Collection users
        • Collection teams
      • Spaces
        • Space content
        • Space comments
        • Space embeds
        • Space users
        • Space teams
        • Space integrations
        • Git
      • Change requests
        • Change request content
        • Change request contributors
        • Change request reviewers
        • Change request comments
      • Translations
        • Glossary
      • Integrations
      • URLs
      • OpenAPI
        • OpenAPI spec versions
      • Conversations
      • Custom fonts
      • Subdomains
      • Users
      • Teams
        • Team members
      • SSO
      • Storage
      • Custom hostnames
      • System info
    • Rate limiting
    • Pagination
    • Errors
  • Marketplace
    • Overview
    • Submit your app for review
  • Resources
    • Concepts
    • Changelog
    • ContentKit playground
    • GitHub examples
Powered by GitBook
On this page
  1. GitBook API
  2. API reference
  3. Docs sites

Site MCP servers

Configure external MCP servers used by your site.

Was this helpful?

LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
CtrlK

Was this helpful?

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

  • The SiteMcpServer object
  • GETList all MCP servers for a site
  • POSTCreate a new MCP server
  • GETGet a site MCP server
  • DELETEDelete a site MCP server
  • PATCHUpdate a site MCP server

The SiteMcpServer object

Attributes
objectstring · enumRequiredPossible values:
idstringRequired

Unique identifier for the MCP server

namestring · min: 1 · max: 100Required

Name of the MCP server

urlstring · uri · max: 2048Required

The SiteMcpServer object

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
200

OK

application/json
Responseall of
get
200

OK

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
Responses
201

MCP server created

application/json
post

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
200

OK

application/json
get
200

OK

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
204

MCP server did not exist

205

MCP server deleted

delete

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
Responses
200

OK

application/json
patch
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"
  }
}
200

OK

{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}
{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}
GET /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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"
      }
    }
  ]
}
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"
  }
}
GET /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "site-mcp-server",
  "id": "text",
  "name": "text",
  "url": "https://example.com",
  "headers": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "urls": {
    "location": "https://example.com"
  }
}
DELETE /v1/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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"
  }
}