Skip to content

Commit 2e6aa9b

Browse files
authored
Merge pull request #60 from phil71x/addCursorToUnit2
Add Cursor integration to unit2
2 parents db09203 + 74fee9c commit 2e6aa9b

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

units/en/unit2/clients.mdx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,59 @@ Create a new file called `config.json` with the following configuration:
7878

7979
This configuration allows your UI client to communicate with the Gradio MCP server using the MCP protocol, enabling seamless integration between your frontend and the MCP service.
8080

81+
## Configuring a MCP Client within Cursor IDE
82+
83+
Cursor provides built-in MCP support, allowing you to connect your deployed MCP servers directly to your development environment.
84+
85+
### Configuration
86+
87+
Open Cursor settings (`Ctrl + Shift + J` / `Cmd + Shift + J`) → **MCP** tab → **Add new global MCP server**:
88+
89+
**macOS:**
90+
```json
91+
{
92+
"mcpServers": {
93+
"sentiment-analysis": {
94+
"command": "npx",
95+
"args": [
96+
"-y",
97+
"mcp-remote",
98+
"https://YOURUSENAME-mcp-sentiment.hf.space/gradio_api/mcp/sse",
99+
"--transport",
100+
"sse-only"
101+
]
102+
}
103+
}
104+
}
105+
```
106+
107+
**Windows:**
108+
```json
109+
{
110+
"mcpServers": {
111+
"sentiment-analysis": {
112+
"command": "cmd",
113+
"args": [
114+
"/c",
115+
"npx",
116+
"-y",
117+
"mcp-remote",
118+
"https://YOURUSENAME-mcp-sentiment.hf.space/gradio_api/mcp/sse",
119+
"--transport",
120+
"sse-only"
121+
]
122+
}
123+
}
124+
}
125+
```
126+
127+
### Why We Use mcp-remote
128+
129+
Most MCP clients, including Cursor, currently only support local servers via stdio transport and don't yet support remote servers with OAuth authentication. The `mcp-remote` tool serves as a bridge solution that:
130+
131+
- Runs locally on your machine
132+
- Forwards requests from Cursor to the remote MCP server
133+
- Uses the familiar configuration file format
134+
135+
Once configured, you can ask Cursor to use your sentiment analysis tool for tasks like analyzing code comments, user feedback, or pull request descriptions.
136+

0 commit comments

Comments
 (0)