MCP Servers for Coding with Cursor IDE Installation and Usage Example
To get an MPC server running on your Cursor IDE: Open Cursor, start by looking for the cog icon to access Open Cursor Settings. Click on that, then scroll down to MCP. If you see the option to "Add New Global MPC Server," click on it. You'll paste a JSON string there, which is basically a set of objects.
{
"mcpServers": {
"pubnub": {
"command": "npx",
"args": ["-y", "@pubnub/mcp"],
"env": {
"PUBNUB_SUBSCRIBE_KEY": "demo",
"PUBNUB_PUBLISH_KEY": "demo"
}
}
}
}
The root will be called "MPC servers." Add any needed variables and your main command, followed by any arguments. Save, close, and restart. Check back to see a green dot, indicating it's working. Create a new project and directory, and ensure you're in agent mode. Open your chat window, next to the settings icon, and make sure you're in agent mode again. Ask the AI to write a PubNub chat app with users and presence indicators. Watch the AI work and provide permission when needed. It'll ask what programming language you want, like JavaScript, and continue processing. Answer any follow-up questions it asks. After it's done, review the code. You'll see spots to add API keys. Ask the AI to insert demo API keys into the PubNub object. Accept any changes, and save everything. Open the index.html file to see if the app works. Test it by opening a second window for another user. If both users can send messages, congratulations, you've built a chat app without writing any code.
Видео MCP Servers for Coding with Cursor IDE Installation and Usage Example канала Stephen Blum
{
"mcpServers": {
"pubnub": {
"command": "npx",
"args": ["-y", "@pubnub/mcp"],
"env": {
"PUBNUB_SUBSCRIBE_KEY": "demo",
"PUBNUB_PUBLISH_KEY": "demo"
}
}
}
}
The root will be called "MPC servers." Add any needed variables and your main command, followed by any arguments. Save, close, and restart. Check back to see a green dot, indicating it's working. Create a new project and directory, and ensure you're in agent mode. Open your chat window, next to the settings icon, and make sure you're in agent mode again. Ask the AI to write a PubNub chat app with users and presence indicators. Watch the AI work and provide permission when needed. It'll ask what programming language you want, like JavaScript, and continue processing. Answer any follow-up questions it asks. After it's done, review the code. You'll see spots to add API keys. Ask the AI to insert demo API keys into the PubNub object. Accept any changes, and save everything. Open the index.html file to see if the app works. Test it by opening a second window for another user. If both users can send messages, congratulations, you've built a chat app without writing any code.
Видео MCP Servers for Coding with Cursor IDE Installation and Usage Example канала Stephen Blum
Комментарии отсутствуют
Информация о видео
21 мая 2025 г. 21:29:41
00:04:44
Другие видео канала