Skip to content

Commit f21b74c

Browse files
committed
deps: migrate from mcp to fastmcp
1 parent 3651c34 commit f21b74c

14 files changed

Lines changed: 771 additions & 69 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
## 0.12.0
4+
- migrate from mcp to fastmcp
35

46
## 0.11.0
57

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Or with uv:
8484

8585
```bash
8686
uv add sqlmodel-graphql
87-
uv add sqlmodel-graphql[mcp] # include mcp server
87+
uv add sqlmodel-graphql[fastmcp] # include mcp server
8888
```
8989

9090
## Demo
@@ -99,8 +99,8 @@ uv run python -m demo.app
9999
running MCP demo
100100

101101
```bash
102-
uv run --with mcp python -m demo.mcp_server # stdio mode
103-
uv run --with mcp python -m demo.mcp_server --http # http mode
102+
uv run --with fastmcp python -m demo.mcp_server # stdio mode
103+
uv run --with fastmcp python -m demo.mcp_server --http # http mode
104104
```
105105

106106

@@ -431,14 +431,14 @@ mcp.run()
431431
### Installation
432432

433433
```bash
434-
pip install sqlmodel-graphql[mcp]
434+
pip install sqlmodel-graphql[fastmcp]
435435
```
436436

437437
### Running MCP Server
438438

439439
```bash
440-
uv run --with mcp python -m demo.mcp_server # stdio mode
441-
uv run --with mcp python -m demo.mcp_server --http # http mode
440+
uv run --with fastmcp python -m demo.mcp_server # stdio mode
441+
uv run --with fastmcp python -m demo.mcp_server --http # http mode
442442
```
443443

444444
## API Reference

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sqlmodel-graphql"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
description = "GraphQL SDL generation and query optimization for SQLModel"
55
authors = [{ name = "tangkikodo", email = "allmonday@126.com" }]
66
readme = "README.md"
@@ -39,8 +39,8 @@ demo = [
3939
"aiosqlite>=0.19.0",
4040
"greenlet>=3.3.2",
4141
]
42-
mcp = [
43-
"mcp>=1.0.0",
42+
fastmcp = [
43+
"fastmcp>=3.1,<3.2",
4444
]
4545

4646
[project.urls]

src/sqlmodel_graphql/mcp/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from sqlmodel_graphql.mcp.types.app_config import AppConfig
1414

1515
if TYPE_CHECKING:
16-
from mcp.server.fastmcp import FastMCP
16+
from fastmcp import FastMCP
1717

1818

1919
def create_mcp_server(
@@ -103,7 +103,7 @@ def create_mcp_server(
103103
- get_mutation_schema(name, app_name, response_type): Get mutation details
104104
- graphql_mutation(mutation, app_name): Execute a GraphQL mutation
105105
"""
106-
from mcp.server.fastmcp import FastMCP
106+
from fastmcp import FastMCP
107107

108108
# Create the multi-app manager
109109
manager = MultiAppManager(apps)
@@ -192,7 +192,7 @@ async def get_users(cls) -> list['User']:
192192
Additional tool (when allow_mutation=True):
193193
- graphql_mutation(mutation): Execute a GraphQL mutation
194194
"""
195-
from mcp.server.fastmcp import FastMCP
195+
from fastmcp import FastMCP
196196

197197
from sqlmodel_graphql.mcp.managers.single_app_manager import SingleAppManager
198198
from sqlmodel_graphql.mcp.tools.simple_tools import register_simple_tools

src/sqlmodel_graphql/mcp/tools/get_operation_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
)
2020

2121
if TYPE_CHECKING:
22-
from mcp.server.fastmcp import FastMCP
22+
from fastmcp import FastMCP
2323

2424
from sqlmodel_graphql.mcp.builders.type_tracer import TypeTracer
2525
from sqlmodel_graphql.sdl_generator import SDLGenerator

src/sqlmodel_graphql/mcp/tools/graphql_mutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
if TYPE_CHECKING:
17-
from mcp.server.fastmcp import FastMCP
17+
from fastmcp import FastMCP
1818

1919
from sqlmodel_graphql.handler import GraphQLHandler
2020

src/sqlmodel_graphql/mcp/tools/graphql_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
if TYPE_CHECKING:
17-
from mcp.server.fastmcp import FastMCP
17+
from fastmcp import FastMCP
1818

1919
from sqlmodel_graphql.handler import GraphQLHandler
2020

src/sqlmodel_graphql/mcp/tools/list_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from sqlmodel_graphql.mcp.types.errors import create_success_response
1212

1313
if TYPE_CHECKING:
14-
from mcp.server.fastmcp import FastMCP
14+
from fastmcp import FastMCP
1515

1616
from sqlmodel_graphql.mcp.builders.type_tracer import TypeTracer
1717

src/sqlmodel_graphql/mcp/tools/multi_app_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
if TYPE_CHECKING:
17-
from mcp.server.fastmcp import FastMCP
17+
from fastmcp import FastMCP
1818

1919
from sqlmodel_graphql.mcp.managers.multi_app_manager import MultiAppManager
2020

src/sqlmodel_graphql/mcp/tools/simple_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
if TYPE_CHECKING:
17-
from mcp.server.fastmcp import FastMCP
17+
from fastmcp import FastMCP
1818

1919
from sqlmodel_graphql.mcp.managers.single_app_manager import SingleAppManager
2020

0 commit comments

Comments
 (0)