Get笔记 MCP Server
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)
Option 2: Use with npx (no installation required)
Option 3: Install as project dependency
Configuration
Copy the environment template:
Edit
.envand add your API key:
Usage with Claude Desktop
Edit your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json):
Using global installation:
Using npx:
Using local installation:
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
API Rate Limits
QPS: 2 requests/second
Daily: 5000 requests/day
The server automatically handles rate limiting with intelligent queuing.
Project Structure
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!
中文
项目概述
一个用于集成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: 全局安装 (推荐常用场景)
方式2: 使用 npx (无需安装)
方式3: 作为项目依赖安装
配置
复制环境变量模板:
编辑
.env文件,添加您的API密钥:
在Claude Desktop中使用
编辑Claude Desktop配置文件 (~/Library/Application Support/Claude/claude_desktop_config.json):
使用全局安装:
使用 npx:
使用本地安装:
重启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速率限制使用统计。
开发命令
API限制
QPS限制: 2次/秒
日限制: 5000次/天
服务器内置智能排队的速率限制器,自动处理这些限制。
项目结构
技术栈
Node.js (ES模块)
TypeScript
@modelcontextprotocol/sdk
Axios
dotenv
许可证
MIT
贡献
欢迎贡献!请提交 issue 或 pull request。
This server cannot be installed