Skip to content

Commit 007a30d

Browse files
author
amirzaushnizer
committed
chore: update fastmcp dependency to remove upper version limit and fix tool registration method
1 parent 38237d7 commit 007a30d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cursor_notebook_mcp/tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import nbformat
2121
from nbformat import NotebookNode
2222

23+
from fastmcp.tools.tool import Tool
24+
2325
from . import notebook_ops
2426

2527
logger = logging.getLogger(__name__)
@@ -89,7 +91,7 @@ def _register_tools(self):
8991
for tool_method in tools_to_register:
9092
# Use the method's name and docstring for registration
9193
if hasattr(self.mcp, 'add_tool'):
92-
self.mcp.add_tool(tool_method)
94+
self.mcp.add_tool(Tool.from_function(tool_method))
9395
elif hasattr(self.mcp, 'tool') and callable(self.mcp.tool):
9496
# If add_tool doesn't exist, try applying the .tool() decorator programmatically
9597
# This assumes tool_method already has the correct signature and docstring

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies = [
3838
"ipython",
3939
"jupyter_core",
4040
"paramiko>=2.8.0",
41-
"fastmcp>=2.3.4,<2.7.0",
41+
"fastmcp>=2.3.4",
4242
"uvicorn>=0.20.0",
4343
"starlette>=0.25.0"
4444
]

0 commit comments

Comments
 (0)