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.
8181
8282## Connecting to the MCP Server
8383
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 :
8585
86861 . 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
8989
9090## Development and Contributing
9191
Original file line number Diff line number Diff line change 1212from fastapi import FastAPI
1313from fastapi .openapi .utils import get_openapi
1414from mcp .server .fastmcp import FastMCP
15+ from pydantic import Field
1516
1617logger = logging .getLogger ("fastapi_mcp" )
1718
@@ -435,7 +436,7 @@ def create_http_tool(
435436 required_props .append (param_name )
436437
437438 # 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 ) ):
439440 # Prepare URL with path parameters
440441 url = f"{ base_url } { path } "
441442 for param_name , _ in path_params :
You can’t perform that action at this time.
0 commit comments