@@ -79,13 +79,51 @@ 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
+
86
+ 1 . Run your application.
85
87
86
- 1 . Run your application
87
88
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
+
90
+ 3 . Cursor will discover all available tools and resources automatically.
91
+
92
+ ## Connecting to the MCP Server using [ mcp-proxy stdio] ( https://github.com/sparfenyuk/mcp-proxy?tab=readme-ov-file#1-stdio-to-sse )
93
+
94
+ If your MCP client does not support SSE, for example Claude Desktop:
95
+
96
+ 1 . Run your application.
97
+
98
+ 2 . Install [ mcp-proxy] ( https://github.com/sparfenyuk/mcp-proxy?tab=readme-ov-file#installing-via-pypi ) , for example: ` uv tool install mcp-proxy ` .
99
+
100
+ 3 . Add in Claude Desktop MCP config file (` claude_desktop_config.json ` ):
101
+
102
+ On Windows:
103
+ ``` json
104
+ {
105
+ "mcpServers" : {
106
+ "my-api-mcp-proxy" : {
107
+ "command" : " mcp-proxy" ,
108
+ "args" : [" http://127.0.0.1:8000/mcp" ]
109
+ }
110
+ }
111
+ }
112
+ ```
113
+ On MacOS:
114
+ ``` json
115
+ {
116
+ "mcpServers" : {
117
+ "my-api-mcp-proxy" : {
118
+ "command" : " /Full/Path/To/Your/Executable/mcp-proxy" ,
119
+ "args" : [" http://127.0.0.1:8000/mcp" ]
120
+ }
121
+ }
122
+ }
123
+ ```
124
+ Find the path to mcp-proxy by running in Terminal: ` which mcp-proxy ` .
125
+
126
+ 4 . Claude Desktop will discover all available tools and resources automatically
89
127
90
128
## Development and Contributing
91
129
0 commit comments