Add a new MCP server configuration to a site
Registers a new Model Context Protocol (MCP) server with the site, providing its URL, transport type, request headers, and an optional conditional expression to control visibility per visitor. Once added, the MCP server's tools become available to the AI Assistant when helping visitors of this site.
A unique entity identifier
^[a-zA-Z0-9_-]+$The unique id of the site
Name of the MCP server
Transport protocol used to connect to the MCP server
ssePossible values: Conditional expression used to evaluate whether the MCP server should be available to the site's visitor (should evaluate to a boolean). If set to null, the condition will be removed.
MCP server created
Unique identifier for the MCP server
Name of the MCP server
Transport protocol used to connect to the MCP server
ssePossible values: Conditional expression used to evaluate whether the MCP server should be available to the site's visitor.
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: 125
{
"name": "text",
"url": "https://example.com",
"transport": "sse",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"condition": "text"
}MCP server created
{
"object": "site-mcp-server",
"id": "text",
"name": "text",
"url": "https://example.com",
"transport": "sse",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"condition": "text",
"urls": {
"location": "https://example.com"
}
}Last updated
Was this helpful?