Kibela MCP Server

Integrations

  • Provides containerized deployment of the MCP server through Docker, with environment variable configuration for Kibela authentication.

  • Interacts with Kibela through its GraphQL API, allowing operations like searching notes, managing folders, creating and updating notes, and handling comments within the Kibela knowledge management platform.

  • Supports development setup using pnpm package manager, with commands for installation and dependency management.

概述

Kibela MCP Server 目前仅可用作使用 STDIO 的本地服务器,并且可以与任何 MCP 客户端(例如 Claude Desktop 或 VSCode)一起使用。

只有那些公开可用且适合 MCP 的 GraphQL API 才会作为工具实现。

用例

  • 询问基贝拉的信息
  • 在 Kibela 中组织文件夹和文章
  • 使用人工智能 (AI) 帮助您使用 Kibela 进行写作

要求

  1. Docker已安装
  2. Docker 必须正在运行
  3. Kibela访问令牌已发布
  4. 必须安装实现MCP 客户端的应用程序

安装

例如:Claude Desktop

将以下配置写入claude_desktop_config.json 。将 Kibela 源和访问令牌设置为环境变量。

{ "mcpServers": { "kibela": { "command": "docker", "args": [ "run", "-i", "-e", "KIBELA_ORIGIN", "-e", "KIBELA_ACCESS_TOKEN", "ghcr.io/kibela/kibela-mcp-server" ], "env": { "KIBELA_ORIGIN": "https://your-subdomain.kibe.la", "KIBELA_ACCESS_TOKEN": "***" } } } }

没有 Docker

然后将脚本设置为执行命令。此时,请确保脚本的路径是绝对路径。

{ "mcpServers": { "kibela": { "command": "/path/to/kibela-mcp-server/bin/cli.mjs", "env": { "KIBELA_ORIGIN": "https://your-subdomain.kibe.la", "KIBELA_ACCESS_TOKEN": "***" } } } }

可用工具

注意操作

  • search_kibela_note - 搜索笔记
    • query :搜索关键字(必填)
    • resources :资源类型过滤器(可选)
    • coediting :共同编辑标志(可选)
    • updated :更新日期范围(可选)
    • groupIds :组 ID 过滤器(可选)
    • folderIds :文件夹 ID 过滤器(可选)
    • likerIds : Liker 用户 ID 过滤器(可选)
    • isArchived :存档标志(可选)
    • sortBy :排序顺序(可选)
  • get_kibela_note_by_relay_id - 通过中继 ID 获取注释
    • id :笔记的中继 ID(必填)
  • get_kibela_note_from_path_or_url - 从路径或 URL 获取注释
    • path :注释的路径或 URL(必需)
  • get_kibela_notes - 获取文件夹中的注释
    • folderId :文件夹 ID(必需)
    • first :从前面开始的记录数(可选)
    • last :从后面开始的记录数(可选)
  • create_kibela_note - 创建新笔记
    • title :注释标题(必填)
    • content :备注内容(必填)
    • draft :草稿标志(可选)
    • groupIds :所属组 ID 列表(必需)
    • folders :文件夹信息(可选)
      • groupId :组 ID
      • folderName :文件夹名称
  • update_kibela_note_content - 更新笔记内容
    • id :笔记 ID(必填)
    • newContent :新内容(必需)
    • baseContent :原始内容(必需)

文件夹操作

  • search_kibela_folder - 搜索文件夹
    • query :搜索关键字(必填)
  • get_kibela_folder_by_relay_id - 通过中继 ID 获取文件夹
    • id :文件夹的中继 ID(必需)
    • first :从前面开始的记录数(可选)
  • get_kibela_folder_from_path_or_url - 从路径或 URL 获取文件夹
    • path :文件夹的路径或 URL(必需)
    • first :从前面开始的记录数(可选)
  • get_kibela_folders - 获取文件夹列表
    • first :从前面开始的记录数(可选)
    • last :从后面开始的记录数(可选)
  • create_kibela_folder - 创建新文件夹
    • groupId :组 ID(必需)
    • fullName :文件夹的完整路径名(必需)
  • move_kibela_note_to_another_folder - 将笔记移动到另一个文件夹
    • id :笔记 ID(必填)
    • fromFolder :源文件夹信息(必需)
      • groupId :组 ID
      • folderName :文件夹名称
    • toFolder :目标文件夹信息(必需)
      • groupId :组 ID
      • folderName :文件夹名称
  • attach_kibela_note_to_folder - 将注释与文件夹关联
    • id :笔记 ID(必填)
    • folder :文件夹信息(必填)
      • groupId :组 ID
      • folderName :文件夹名称

评论操作

  • create_kibela_comment - 在笔记上创建评论
    • content :评论内容(必填)
    • noteId :目标笔记ID(必填)
  • create_kibela_comment_reply - 创建对评论的回复
    • content :回复内容(必填)
    • commentId :目标评论ID(必填)

其他操作

  • get_kibela_groups - 获取群组列表
    • first :从前面开始的记录数(可选)
    • last :从后面开始的记录数(可选)
  • get_kibela_feed_sections - 获取 feed 部分列表
    • kind :Feed 类型(必填)
    • groupId :组 ID(必需)

可用提示

审查提示

以 URL 作为输入并查看指定的注释。

输入模式:

{ url: string; // URL format }

搜索提示

将查询作为输入并搜索相关信息。

输入模式:

{ query: string; }

相关注释提示

以 URL 作为输入并探索相关注释。

输入模式:

{ url: string; // URL format }

反映评论提示

以 URL 作为输入并将其评论反映到注释中。

输入模式:

{ url: string; // URL format }

定制

您可以通过准备以下格式的 JSON 文件来自定义工具描述和提示。

请参阅server.ts了解工具和提示键。

{ "tools": { "search_kibela_note": { "description": "New description" } }, "prompts": { "review": { "prompt": "New review prompt" } } }

然后将其安装到容器中,如下所示:

{ "mcpServers": { "kibela": { "command": "docker", "args": [ "run", "-i", "-e", "KIBELA_ORIGIN", "-e", "KIBELA_ACCESS_TOKEN", "-v", "/path/to/kibela-mcp-server-config.json:/usr/src/app/kibela-mcp-server-config.json", "ghcr.io/kibela/kibela-mcp-server" ], "env": { "KIBELA_ORIGIN": "https://your-subdomain.kibe.la", "KIBELA_ACCESS_TOKEN": "***" } } } }

发展

docker compose run mcp pnpm install
docker compose up

使用 MCP Inspector 进行测试

npx @modelcontextprotocol/inspector \ -e KIBELA_ORIGIN=https://your-subdomain.kibe.la \ -e KIBELA_ACCESS_TOKEN=*** \ docker compose exec mcp bin/cli.mjs

执照

该软件包根据MIT许可证条款获得许可。

-
security - not tested
A
license - permissive license
-
quality - not tested

模型上下文协议服务器允许 AI 应用程序与 Kibela 知识库交互,使用户能够通过自然语言搜索、创建、更新和组织内容。

  1. Use Cases
    1. Requirements
      1. Installation
        1. Example: Claude Desktop
        2. No Docker
      2. Available Tools
        1. Note Operations
        2. Folder Operations
        3. Comment Operations
        4. Other Operations
      3. Available Prompts
        1. Review Prompt
        2. Search Prompt
        3. Related Note Prompt
        4. Reflect Comment Prompt
      4. Customization
        1. Development
          1. Testing with MCP Inspector
        2. License
          ID: 6utn596w3i