From ad515278e07b92a7a9f1cde723855f0106650c72 Mon Sep 17 00:00:00 2001 From: lxzfkdm <523503527@qq.com> Date: Mon, 3 Aug 2026 10:02:19 +0800 Subject: [PATCH] feat: adapt to MCP 2.0 and FastMCP 3.x - Replace mcp.server.fastmcp import with standalone fastmcp package - Update dependency mcp>=1.26.0 to fastmcp>=2.0 - Bump version 1.3.1 to 1.4.0 --- mcp_documents_reader.py | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mcp_documents_reader.py b/mcp_documents_reader.py index 715cebc..780ab2d 100644 --- a/mcp_documents_reader.py +++ b/mcp_documents_reader.py @@ -3,7 +3,7 @@ from pathlib import Path from docx import Document as DocxDocument -from mcp.server.fastmcp import FastMCP +from fastmcp import FastMCP from openpyxl import load_workbook from pypdf import PdfReader as PyPdfReader from typing_extensions import override diff --git a/pyproject.toml b/pyproject.toml index 4cc4f72..e897587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-documents-reader" -version = "1.3.1" +version = "1.4.0" description = "An MCP enabled multi-format document reader supporting DOCX, PDF, TXT, and Excel files" keywords = ["mcp", "model-context-protocol", "document-reader", "pdf", "docx", "excel"] authors = [ @@ -9,7 +9,7 @@ authors = [ readme = "README.md" requires-python = ">=3.10" dependencies = [ - "mcp>=1.26.0", + "fastmcp>=2.0", "python-docx>=1.2.0", "pypdf>=6.8.0", "openpyxl>=3.1.5",