mirror of
https://github.com/haris-musa/excel-mcp-server.git
synced 2025-12-08 08:42:30 +08:00
Fix FastMCP compatibility issue and update dependencies (#77)
The excel-mcp-server was using outdated FastMCP API parameters (version, description, dependencies, env_vars) that are no longer supported in the current FastMCP version. Updated the initialization to use only the supported parameters (name and instructions) to resolve the TypeError. Also added explicit dependency on fastmcp>=2.0.0,<3.0.0 to ensure compatibility with FastMCP 2.x API and prevent future breaking changes from major version updates. This fixes the "TypeError: FastMCP.__init__() got an unexpected keyword argument 'version'" error when running excel-mcp-server. Fixes #76
This commit is contained in:
@ -6,6 +6,7 @@ readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"mcp[cli]>=1.10.1",
|
||||
"fastmcp>=2.0.0,<3.0.0",
|
||||
"openpyxl>=3.1.5",
|
||||
"typer>=0.16.0"
|
||||
]
|
||||
|
||||
@ -66,16 +66,7 @@ logger = logging.getLogger("excel-mcp")
|
||||
# Initialize FastMCP server
|
||||
mcp = FastMCP(
|
||||
"excel-mcp",
|
||||
version="0.1.5",
|
||||
description="Excel MCP Server for manipulating Excel files",
|
||||
dependencies=["openpyxl>=3.1.5"],
|
||||
env_vars={
|
||||
"EXCEL_FILES_PATH": {
|
||||
"description": "Path to Excel files directory",
|
||||
"required": False,
|
||||
"default": EXCEL_FILES_PATH
|
||||
}
|
||||
}
|
||||
instructions="Excel MCP Server for manipulating Excel files"
|
||||
)
|
||||
|
||||
def get_excel_path(filename: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user