File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,11 @@ See the [examples](examples) directory for complete examples.
81
81
82
82
## Connecting to the MCP Server
83
83
84
- Once your FastAPI app with MCP integration is running, you can connect to it with any MCP client, such as Claude :
84
+ Once your FastAPI app with MCP integration is running, you can connect to it with any MCP client, such as Cursor :
85
85
86
86
1 . Run your application
87
- 2 . In Claude , use the URL of your MCP server endpoint (e.g., ` http://localhost:8000/mcp ` )
88
- 3 . Claude will discover all available tools and resources automatically
87
+ 2 . In Cursor -> Settings -> MCP , use the URL of your MCP server endpoint (e.g., ` http://localhost:8000/mcp ` ) as sse.
88
+ 3 . Cursor will discover all available tools and resources automatically
89
89
90
90
## Development and Contributing
91
91
Original file line number Diff line number Diff line change 12
12
from fastapi import FastAPI
13
13
from fastapi .openapi .utils import get_openapi
14
14
from mcp .server .fastmcp import FastMCP
15
+ from pydantic import Field
15
16
16
17
logger = logging .getLogger ("fastapi_mcp" )
17
18
@@ -435,7 +436,7 @@ def create_http_tool(
435
436
required_props .append (param_name )
436
437
437
438
# Function to dynamically call the API endpoint
438
- async def http_tool_function (** kwargs ):
439
+ async def http_tool_function (kwargs : Dict [ str , Any ] = Field ( default_factory = dict ) ):
439
440
# Prepare URL with path parameters
440
441
url = f"{ base_url } { path } "
441
442
for param_name , _ in path_params :
You can’t perform that action at this time.
0 commit comments