Get笔记 MCP Server
Integrates with Get笔记 (GetBiji) API to enable AI-powered knowledge base search and retrieval. Provides tools for enhanced semantic search, raw content recall, and rate limit monitoring.
README
Get笔记 MCP Server
<a name="english"></a>
English
Overview
A Model Context Protocol (MCP) server for integrating with Get笔记 (GetBiji) API, enabling AI-powered knowledge base search and retrieval capabilities.
Features
- ✅ MCP server framework with stdio transport
- ✅ Get笔记 API client with Bearer token authentication
- ✅ Rate limiting (2 QPS, 5000 requests/day)
- ✅ Comprehensive error handling and logging
- ✅ TypeScript with full type safety
- ✅ Three MCP tools:
knowledge_search: AI-enhanced knowledge base searchknowledge_recall: Raw content retrievalget_rate_limit_stats: Rate limit statistics
Installation
Option 1: Install globally (recommended for frequent use)
npm install -g mcp-get-biji-server
Option 2: Use with npx (no installation required)
npx mcp-get-biji-server
Option 3: Install as project dependency
npm install mcp-get-biji-server
Configuration
- Copy the environment template:
cp .env.example .env
- Edit
.envand add your API key:
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
Usage with Claude Desktop
Edit your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json):
Using global installation:
{
"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"
}
}
}
}
Using 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"
}
}
}
}
Using local installation:
{
"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"
}
}
}
}
Restart Claude Desktop to activate the server.
MCP Tools
1. knowledge_search
AI-enhanced search with deep processing.
Parameters:
question(required): Search querytopic_ids(required): Knowledge base ID list (currently supports 1)deep_seek(required): Enable deep thinkingrefs(optional): Include referenceshistory(optional): Conversation history for follow-up
2. knowledge_recall
Fast retrieval of raw content without AI processing.
Parameters:
question(required): Search querytopic_id(optional): Single knowledge base ID (preferred)topic_ids(optional): Knowledge base ID listtop_k(optional): Number of top results (default: 10)intent_rewrite(optional): Enable intent rewritingselect_matrix(optional): Enable result re-selectionhistory(optional): Conversation history
Note: Either topic_id or topic_ids must be provided. topic_id takes priority.
3. get_rate_limit_stats
Get current API rate limit usage statistics.
Development
npm run build # Compile TypeScript
npm run watch # Watch mode compilation
npm run dev # Build and run
npm test # Run tests
npm start # Run (must build first)
API Rate Limits
- QPS: 2 requests/second
- Daily: 5000 requests/day
The server automatically handles rate limiting with intelligent queuing.
Project Structure
.
├── src/ # Source code
│ ├── index.ts # MCP server entry
│ ├── client.ts # API client
│ ├── config.ts # Configuration
│ ├── logger.ts # Logging system
│ ├── rate-limiter.ts # Rate limiter
│ ├── types.ts # Type definitions
│ └── test.ts # Test script
├── build/ # Compiled output
├── .env # Environment variables
└── package.json # Project config
Tech Stack
- Node.js (ES Modules)
- TypeScript
- @modelcontextprotocol/sdk
- Axios
- dotenv
License
MIT
Contributing
Contributions welcome! Please open an issue or submit a pull request.
Speical thanks to the contribution & development of Xiaoyibao-Pancrepal & xiao-x-bao community to support cancer/rare disease patients and their families with ❤️ & AI!
<a name="chinese"></a>
中文
项目概述
一个用于集成Get笔记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
配置
- 复制环境变量模板:
cp .env.example .env
- 编辑
.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_id 和 topic_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
许可证
MIT
贡献
欢迎贡献!请提交 issue 或 pull request。
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。