GitBook MCP by usefulapi
Read spaces, collections, pages and content; search docs and manage GitBook organization spaces.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"gitbook": {
"url": "https://gitbook.usefulapi.io/mcp"
}
}
}遠端端點
https://gitbook.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(14)
🟢gitbook_get_current_user
Get the profile of the authenticated GitBook user. GitBook REST: GET /user.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_organizations(page, limit)
List the organizations the authenticated user belongs to. GitBook REST: GET /orgs.
輸入結構描述
{
"type": "object",
"properties": {
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_spaces(organizationId, page, limit)
List all spaces in an organization. GitBook REST: GET /orgs/{organizationId}/spaces.
輸入結構描述
{
"type": "object",
"properties": {
"organizationId": {
"type": "string",
"minLength": 1,
"description": "The organization id."
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"organizationId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_get_space(spaceId)
Get full details of a space by its ID. GitBook REST: GET /spaces/{spaceId}.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
}
},
"required": [
"spaceId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_pages(spaceId, metadata, computed)
List all pages in a space with their hierarchy and metadata. GitBook REST: GET /spaces/{spaceId}/content/pages.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"metadata": {
"description": "Include page metadata in the response.",
"type": "boolean"
},
"computed": {
"description": "Include computed properties in the response.",
"type": "boolean"
}
},
"required": [
"spaceId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_get_page(spaceId, pageId, format)
Get a single page's content from a space by its page ID. GitBook REST: GET /spaces/{spaceId}/content/page/{pageId}.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"pageId": {
"type": "string",
"minLength": 1,
"description": "The page id."
},
"format": {
"description": "Response format — 'document' (structured, default) or 'markdown'.",
"type": "string",
"enum": [
"document",
"markdown"
]
}
},
"required": [
"spaceId",
"pageId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_search_space(spaceId, query, page, limit)
Full-text search across all pages in a space. GitBook REST: GET /spaces/{spaceId}/search.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"query": {
"type": "string",
"minLength": 1,
"description": "The full-text search query (required)."
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"spaceId",
"query"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_search_organization(organizationId, query, page, limit)
Search content across an entire organization. GitBook REST: GET /orgs/{organizationId}/search.
輸入結構描述
{
"type": "object",
"properties": {
"organizationId": {
"type": "string",
"minLength": 1,
"description": "The organization id."
},
"query": {
"type": "string",
"minLength": 1,
"description": "The full-text search query (required)."
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"organizationId",
"query"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_collections(organizationId, page, limit, nested)
List all collections in an organization. GitBook REST: GET /orgs/{organizationId}/collections.
輸入結構描述
{
"type": "object",
"properties": {
"organizationId": {
"type": "string",
"minLength": 1,
"description": "The organization id."
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"nested": {
"description": "Include nested (sub-)collections in the response.",
"type": "boolean"
}
},
"required": [
"organizationId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_get_collection(collectionId)
Get a collection by its ID. GitBook REST: GET /collections/{collectionId}.
輸入結構描述
{
"type": "object",
"properties": {
"collectionId": {
"type": "string",
"minLength": 1,
"description": "The collection id."
}
},
"required": [
"collectionId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_change_requests(spaceId, status, page, limit)
List change requests for a space. GitBook REST: GET /spaces/{spaceId}/change-requests.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"status": {
"description": "Filter by change-request status, e.g. 'open', 'merged', 'draft'.",
"type": "string"
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"spaceId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢gitbook_list_comments(spaceId, status, page, limit)
List top-level comments posted on a space. GitBook REST: GET /spaces/{spaceId}/comments.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"status": {
"description": "Filter by comment status.",
"type": "string"
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"spaceId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴gitbook_create_change_request(spaceId, subject)
Create a new draft change request (branch) in a space. Safe: creates a draft; publishes nothing. GitBook REST: POST /spaces/{spaceId}/change-requests.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"subject": {
"description": "A title/subject for the change request.",
"type": "string"
}
},
"required": [
"spaceId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴gitbook_update_change_request(spaceId, changeRequestId, subject, status)
Update a change request's subject or status. Edits draft metadata only. GitBook REST: PATCH /spaces/{spaceId}/change-requests/{changeRequestId}.
輸入結構描述
{
"type": "object",
"properties": {
"spaceId": {
"type": "string",
"minLength": 1,
"description": "The space id."
},
"changeRequestId": {
"type": "string",
"minLength": 1,
"description": "The change request id."
},
"subject": {
"description": "A new title/subject for the change request.",
"type": "string"
},
"status": {
"description": "A new status for the change request.",
"type": "string"
}
},
"required": [
"spaceId",
"changeRequestId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據