Skip to content

Commit 2f17b3b

Browse files
authored
Merge pull request #13 from amirzaushnizer/fix-tool-registration
fix: compatibility for fastmcp >= 2.10.5
2 parents 38237d7 + 1ade6b1 commit 2f17b3b

File tree

4 files changed

+878
-862
lines changed

4 files changed

+878
-862
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.1] - 2025-07-15
9+
### Fixed
10+
- compatibility with newer versions of fastmcp
11+
- bumped fastmcp dependency version to 2.10.5
12+
813
## [0.3.0] - 2025-05-20
914

1015
### Added

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "cursor-notebook-mcp"
7-
version = "0.3.0"
7+
version = "0.3.1"
88
authors = [
99
{ name="Jim Beno", email="jim@jimbeno.net" },
1010
]
@@ -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.10.5",
4242
"uvicorn>=0.20.0",
4343
"starlette>=0.25.0"
4444
]

0 commit comments

Comments
 (0)