File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -79,14 +79,36 @@ async def get_server_time() -> str:
79
79
80
80
See the [ examples] ( examples ) directory for complete examples.
81
81
82
- ## Connecting to the MCP Server
82
+ ## Connecting to the MCP Server using SSE
83
83
84
- Once your FastAPI app with MCP integration is running, you can connect to it with any MCP client, such as Cursor:
84
+ Once your FastAPI app with MCP integration is running, you can connect to it with any MCP client supporting SSE , such as Cursor:
85
85
86
86
1 . Run your application
87
87
2 . In Cursor -> Settings -> MCP, use the URL of your MCP server endpoint (e.g., ` http://localhost:8000/mcp ` ) as sse.
88
88
3 . Cursor will discover all available tools and resources automatically
89
89
90
+ ## Connecting to the MCP Server using [ mcp-proxy stdio] ( https://github.com/sparfenyuk/mcp-proxy?tab=readme-ov-file#1-stdio-to-sse )
91
+
92
+ If your MCP client does not support SSE, for example Claude Desktop:
93
+
94
+ 1 . Run your application
95
+ 2 . Install [ mcp-proxy] ( https://github.com/sparfenyuk/mcp-proxy?tab=readme-ov-file#installing-via-pypi ) , for example:
96
+ ``` bash
97
+ uv tool install mcp-proxy
98
+ ```
99
+ 3 . In Claude Desktop MCP config file:
100
+ ``` json
101
+ {
102
+ "mcpServers" : {
103
+ "my-api-mcp-proxy" : {
104
+ "command" : " mcp-proxy" ,
105
+ "args" : [" http://127.0.0.1:8000/mcp" ]
106
+ }
107
+ }
108
+ }
109
+ ```
110
+ 4 . Claude Desktop will discover all available tools and resources automatically
111
+
90
112
## Development and Contributing
91
113
92
114
If you're interested in contributing to FastAPI-MCP:
You can’t perform that action at this time.
0 commit comments