Kibela MCP 服务器目前仅作为本地服务器使用 STDIO,并且可以与任何 MCP 客户端一起使用,如 Claude Desktop 或 VSCode。
仅实现了那些公开可用且适合 MCP 的 GraphQL API 工具。
将以下配置写入 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": "***"
}
}
}
}
然后将脚本设置为执行命令。此时,请确保脚本路径是绝对路径。
{
"mcpServers": {
"kibela": {
"command": "/path/to/kibela-mcp-server/bin/cli.mjs",
"env": {
"KIBELA_ORIGIN": "https://your-subdomain.kibe.la",
5"KIBELA_ACCESS_TOKEN": "***"
}
}
}
}
search_kibela_note - 搜索笔记
query: 搜索关键词(必需)resources: 资源类型过滤器(可选)coediting: 共同编辑标志(可选)updated: 更新日期范围(可选)groupIds: 组 ID 过滤器(可选)folderIds: 文件夹 ID 过滤器(可选)likerIds: 点赞用户 ID 过滤器(可选)isArchived: 归档标志(可选)sortBy: 排序顺序(可选)get_kibela_note_by_relay_id - 根据 Relay ID 获取笔记
id: 笔记的 Relay 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: 组 IDfolderName: 文件夹名称update_kibela_note_content - 更新笔记内容
id: 笔记 ID(必需)newContent: 新内容(必需)baseContent: 原始内容(必需)search_kibela_folder - 搜索文件夹
query: 搜索关键词(必需)get_kibela_folder_by_relay_id - 根据 Relay ID 获取文件夹
id: 文件夹的 Relay 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: 组 IDfolderName: 文件夹名称toFolder: 目标文件夹信息(必需)
groupId: 组 IDfolderName: 文件夹名称attach_kibela_note_to_folder - 将笔记关联到文件夹
id: 笔记 ID(必需)folder: 文件夹信息(必需)
groupId: 组 IDfolderName: 文件夹名称create_kibela_comment - 在笔记上创建评论
content: 评论内容(必需)noteId: 目标笔记 ID(必需)create_kibela_comment_reply - 对评论进行回复
content: 回复内容(必需)commentId: 目标评论 ID(必需)get_kibela_groups - 获取组列表
first: 从前部获取的记录数(可选)last: 从后部获取的记录数(可选)get_kibela_feed_sections - 获取动态部分列表
kind: 动态类型(必需)groupId: 组 ID(必需)接收一个 URL 作为输入并审查指定的笔记。
输入模式:
{
url: string; // URL 格式
}
接收一个查询作为输入并搜索相关信息。
输入模式:
{
query: string;
}
接收一个 URL 作为输入并探索相关笔记。
输入模式:
{
url: string; // URL 格式
}
接收一个 URL 作为输入并将评论反映到笔记中。
输入模式:
{
url: string; // URL 格式
}
你可以通过准备以下格式的 JSON 文件来自定义工具描述和提示。
参见 server.ts 以了解工具和提示键。
{
"tools": {
"search_kibela_note": {
"description": "新的描述"
}
},
"prompts": {
"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
npx @modelcontextprotocol/inspector \
-e KIBELA_ORIGIN=https://your-subdomain.kibe.la \
-e KIBELA_ACCESS_TOKEN=*** \
docker compose exec mcp bin/cli.mjs
此包根据 MIT 许可证的条款提供许可。