Used for HTML parsing and manipulation when processing HTML documents in the knowledge base system.
Referenced for repository management in the project configuration.
Used as the repository hosting service for the project as specified in the configuration.
Used as the package manager for installing dependencies and running scripts.
Used as the implementation language for the MCP server, providing type safety and modern JavaScript features.
MCP 知识库服务器
这是一个基于 Model Context Protocol (MCP) 的知识库服务器,可以处理本地文档并根据文档内容回答问题。
功能特性
- 支持多种文档格式:PDF、DOCX、TXT、HTML
- 自动文档索引和搜索
- 基于相似度的文档检索
- 完整的 MCP 协议支持
- 中文文档处理支持
ModelScope MCP 服务配置
安装
- 克隆项目并安装依赖:
- 构建项目:
使用方法
1. 启动服务器
2. 在 MCP 客户端中配置
在你的 MCP 客户端配置文件中添加:
3. 可用的工具
添加文档
add_document
: 添加单个文档到知识库add_directory
: 添加目录中的所有文档到知识库
查询知识库
query_knowledge_base
: 查询知识库并获取答案
管理文档
list_documents
: 列出所有文档get_document
: 获取特定文档信息remove_document
: 移除文档clear_knowledge_base
: 清空知识库get_stats
: 获取统计信息
配置
服务器会自动创建以下目录:
documents/
: 存储文档文件index/
: 存储索引数据
开发
项目结构
许可证
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A local document processing server that can index various document formats (PDF, DOCX, TXT, HTML) and answer questions based on their content using the Model Context Protocol.
Related MCP Servers
- AsecurityAlicenseAqualityA server providing tools to read, write, and edit Microsoft Word (docx) files through the Model Context Protocol, allowing operations like complete document reading, content creation, targeted paragraph editing, and text insertion.Last updated -410PythonMIT License
- -securityAlicense-qualityA server that provides document processing capabilities using the Model Context Protocol, allowing conversion of documents to markdown, extraction of tables, and processing of document images.Last updated -6PythonMIT License
- -security-license-qualityA TypeScript-based document processing server that supports various document formats (.docx, .pdf, .xlsx) and integrates with Model Context Protocol SDK for efficient document context management.Last updated -TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server for ingesting, chunking and semantically searching documentation files, with support for markdown, Python, OpenAPI, HTML files and URLs.Last updated -Python