Back to MCP directory
publicPublicdnsLocal runtime

get_biji_mcp

Get笔记MCP服务器,通过AI增强的知识库搜索和召回功能,为Claude等AI助手提供智能知识库集成能力。

article

README

🚀 Get笔记 MCP Server

Get笔记 MCP Server 是一个用于集成 Get笔记 API 的服务器,借助 AI 实现强大的知识库搜索和召回功能,为用户提供高效、准确的知识检索服务。

🚀 快速开始

Get笔记 MCP Server 是一个用于集成 Get笔记 (GetBiji) API 的 Model Context Protocol (MCP) 服务器,可实现 AI 增强的知识库搜索和检索功能。

✨ 主要特性

  • ✅ 基于 stdio 传输的 MCP 服务器框架
  • ✅ 支持 Bearer Token 认证的 Get笔记 API 客户端
  • ✅ 速率限制 (2 QPS, 5000 次/天)
  • ✅ 完善的错误处理和日志记录
  • ✅ TypeScript 完整类型安全
  • ✅ 三个 MCP 工具:
    • knowledge_search:AI 增强知识库搜索
    • knowledge_recall:原始内容召回
    • get_rate_limit_stats:速率限制统计

📦 安装指南

选项 1:全局安装(推荐频繁使用)

npm install -g mcp-get-biji-server

选项 2:使用 npx(无需安装)

npx mcp-get-biji-server

选项 3:作为项目依赖安装

npm install mcp-get-biji-server

📚 详细文档

配置

  1. 复制环境变量模板:
cp .env.example .env
  1. 编辑 .env 文件,添加您的 API 密钥:
GET_BIJI_API_KEY=your_api_key_here
GET_BIJI_API_BASE_URL=https://open-api.biji.com/getnote/openapi
LOG_LEVEL=info
REQUEST_TIMEOUT=30000
RATE_LIMIT_QPS=2
RATE_LIMIT_DAILY=5000

在 Claude Desktop 中使用

编辑 Claude Desktop 配置文件 (~/Library/Application Support/Claude/claude_desktop_config.json):

使用全局安装

{
  "mcpServers": {
    "get-biji": {
      "command": "mcp-get-biji-server",
      "env": {
        "GET_BIJI_API_KEY": "your_api_key_here",
        "GET_BIJI_DEFAULT_TOPIC_ID": "your_default_topic_id"
      }
    }
  }
}

使用 npx

{
  "mcpServers": {
    "get-biji": {
      "command": "npx",
      "args": ["-y", "mcp-get-biji-server"],
      "env": {
        "GET_BIJI_API_KEY": "your_api_key_here",
        "GET_BIJI_DEFAULT_TOPIC_ID": "your_default_topic_id"
      }
    }
  }
}

使用本地安装

{
  "mcpServers": {
    "get-biji": {
      "command": "node",
      "args": ["/path/to/node_modules/mcp-get-biji-server/build/index.js"],
      "env": {
        "GET_BIJI_API_KEY": "your_api_key_here",
        "GET_BIJI_DEFAULT_TOPIC_ID": "your_default_topic_id"
      }
    }
  }
}

重启 Claude Desktop 以激活服务器。

MCP 工具说明

1. knowledge_search

AI 增强搜索,返回经过深度处理的答案。 参数

  • question(必填):搜索问题
  • topic_ids(必填):知识库 ID 列表(当前只支持 1 个)
  • deep_seek(必填):启用深度思考
  • refs(可选):返回引用来源
  • history(可选):对话历史,用于追问

2. knowledge_recall

快速召回原始内容,不经过 AI 处理。 参数

  • question(必填):搜索问题
  • topic_id(可选):单个知识库 ID(优先使用)
  • topic_ids(可选):知识库 ID 列表
  • top_k(可选):返回前 N 个结果(默认:10)
  • intent_rewrite(可选):启用意图重写
  • select_matrix(可选):启用结果重选
  • history(可选):对话历史

注意topic_idtopic_ids 必须提供一个,topic_id 优先。

3. get_rate_limit_stats

获取当前 API 速率限制使用统计。

开发命令

npm run build        # 编译TypeScript代码
npm run watch        # 监听模式编译
npm run dev          # 编译并运行
npm test             # 运行测试
npm start            # 直接运行(需先编译)

API 限制

  • QPS 限制:2 次/秒
  • 日限制:5000 次/天

服务器内置智能排队的速率限制器,自动处理这些限制。

项目结构

.
├── src/                  # 源代码目录
│   ├── index.ts         # MCP服务器入口
│   ├── client.ts        # API客户端
│   ├── config.ts        # 配置管理
│   ├── logger.ts        # 日志系统
│   ├── rate-limiter.ts  # 速率限制器
│   ├── types.ts         # TypeScript类型定义
│   └── test.ts          # 测试脚本
├── build/               # 编译输出目录
├── .env                 # 环境变量配置
└── package.json         # 项目配置文件

技术栈

  • Node.js (ES 模块)
  • TypeScript
  • @modelcontextprotocol/sdk
  • Axios
  • dotenv

🔧 技术细节

API 速率限制

服务器的 API 速率限制为 QPS 2 次/秒,每日 5000 次请求。服务器会自动通过智能排队机制处理速率限制,以确保请求的有序处理。

项目开发

项目使用 Node.js 和 TypeScript 进行开发,利用 ES 模块规范。依赖于 @modelcontextprotocol/sdk、Axios 和 dotenv 等工具。开发过程中,可使用 npm run build 编译 TypeScript 代码,npm run watch 开启监听模式编译,npm run dev 编译并运行项目,npm test 运行测试,npm start 直接运行(需先编译)。

📄 许可证

本项目采用 MIT 许可证。

贡献

欢迎贡献!请提交 issue 或 pull request。

特别感谢 小胰宝小 x 宝社区 的贡献与付出,用爱心与人工智能为癌症/罕见病患者及其家庭提供支持!

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client