Skip to content

Commit 89302b8

Browse files
authored
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
1 parent 429a1e2 commit 89302b8

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
88
"mcp[cli]>=1.10.1",
9+
"fastmcp>=2.0.0,<3.0.0",
910
"openpyxl>=3.1.5",
1011
"typer>=0.16.0"
1112
]

src/excel_mcp/server.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,7 @@
6666
# Initialize FastMCP server
6767
mcp = FastMCP(
6868
"excel-mcp",
69-
version="0.1.5",
70-
description="Excel MCP Server for manipulating Excel files",
71-
dependencies=["openpyxl>=3.1.5"],
72-
env_vars={
73-
"EXCEL_FILES_PATH": {
74-
"description": "Path to Excel files directory",
75-
"required": False,
76-
"default": EXCEL_FILES_PATH
77-
}
78-
}
69+
instructions="Excel MCP Server for manipulating Excel files"
7970
)
8071

8172
def get_excel_path(filename: str) -> str:

0 commit comments

Comments
 (0)