Skip to main content
Glama

MCP PDF Server

by Dev-91

MCP PDF 服务器

MCP PDF 服务器是一个基于模型上下文协议 (MCP) 的服务器,可以有效地管理 PDF 文件。

这个项目是为了方便我这个嵌入式开发者,直接在Cursor等AI编程工具中阅读、汇总PDF datasheet文档,或者进行问答,让开发工作更加便捷而创建的。换句话说,主要目的是支持AI快速理解PDF数据表的内容并立即提供必要的信息。

该项目由两个主要部分组成:

  • manager_server :基于 FastAPI 的网页,为用户提供通过 Web UI 上传或下载 PDF 文件以及查看和管理文件列表的功能。它还提供了用于与外部系统集成的 RESTful API。
  • mcp_server :根据 manager_server 管理的 PDF 文件提供文件名搜索和文本提取功能。提取的文本可以通过 MCP 协议链接到外部系统(例如 Cursor 等)。

主要特点:

  • 提取 PDF 文本(支持本地文件和 URL)
  • 根据文件名搜索 PDF
  • 查看和管理 PDF 列表
  • 支持PDF文件网页上传/下载
  • 提供 RESTful API 和 Web 服务
  • 通过 MCP 协议连接到外部系统(Curator、Cursor 等)

它可以通过RESTful API和Web UI轻松地与外部系统集成,并可以在Docker和本地环境中轻松部署和运行。适用于数据表、论文、合同等各种PDF文档的自动化管理和检索。

主要特点

  • 从本地 PDF 文件和可通过 URL 访问的 PDF 中提取文本
  • 提供/app/datasheets下的 PDF 文件列表
  • 提供按文件名搜索PDF的功能
  • 基于 PyPDF2 的可靠文本提取和异常处理
  • 提供基于FastMCP的标准化MCP工具

使用 Docker 运行

  1. 构建镜像
    docker build -t mcp-pdf-server:1.0.0 .
  2. 运行容器
    docker run -d \ -v /호스트/경로/데이터:/app/datasheets \ -p 5050:5050 \ -p 5080:5080 \ --name mcp-pdf-server \ mcp-pdf-server:1.0.0
    • 如果您将 PDF 文件放在/호스트/경로/데이터则可以从容器内的/app/datasheets访问它。
    • 使用端口 5050 和 5080。
  3. 使用 docker-compose 时
    # docker-compose.yml의 /path/to/your/datasheets를 실제 PDF 폴더 경로로 수정하세요. docker-compose up -d --build

直接在本地运行(Python)

  1. 安装依赖项
    pip install -r requirements.txt
  2. 运行服务器
    python mcp_server/mcp_pdf_server.py # 또는 uvicorn manager_server.main:app --host 0.0.0.0 --port 5080

MCP 工具(API)说明

  • 读取本地PDF
    通过输入本地 PDF 文件路径来提取文本。
  • 阅读网址
    输入 PDF 文件的 URL 并从中提取文本。
  • 服务器 PDF 列表
    返回/app/datasheets下所有 PDF 文件的列表。
  • 服务器 PDF 搜索
    输入文件名,在服务器上搜索 PDF 文件,然后从该 PDF 文件中提取文本。

路线指引

  • PDF 数据必须位于/app/datasheets路径(Docker 容器内)。
  • 使用 Docker 时,将主机的 PDF 文件夹挂载到/app/datasheets
  • 源代码位于/app/mcp_server (容器内)。

执照

Apache 许可证 2.0
作者:Dev91

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

基于模型上下文协议 (MCP) 的服务器可以高效管理 PDF 文件,允许 Cursor 等 AI 编码工具读取、汇总和提取 PDF 数据表中的信息,以协助嵌入式开发工作。

  1. 主要特点
    1. 使用 Docker 运行
      1. 直接在本地运行(Python)
        1. MCP 工具(API)说明
          1. 路线指引
            1. 执照

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides daily-refreshed documentation for 9000+ libraries directly in AI code editors, helping developers avoid outdated references and hallucinations.
                Last updated -
                1
                873
                101
                JavaScript
                MIT License
                • Linux
                • Apple
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol (MCP) server that enables AI assistants to perform comprehensive file operations including finding, reading, writing, editing, searching, moving, and copying files with security validations.
                Last updated -
                7
                TypeScript
              • -
                security
                F
                license
                -
                quality
                An MCP (Model Context Protocol) server for efficiently managing Markdown documents in Cursor AI IDE, supporting CRUD operations, search, and metadata management.
                Last updated -
                Python
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol (MCP) server that enables AI applications to access and analyze local code repositories without manual uploads, providing file listing, content reading, code searching, and project structure analysis capabilities.
                Last updated -
                7
                TypeScript
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dev-91/MCP_PDF_Server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server