Cursor
This guide will help you set up and connect your API running in MCP (Model-Context-Protocol) mode to Cursor IDE.
Prerequisites
- Cursor IDE installed on your system
- API running in MCP mode
Connection Steps
1. Open Cursor Settings
Navigate to Cursor IDE settings to configure the API connection:
- Open Cursor
- Click on the Cursor’s Settings icon in the top right corner
- Navigate to the MCP section
2.1 Configure MCP Connection Using STDIO Mode
In the MCP settings:
- Click the
Add new MCP server
button - Set the name of your MCP server
- Choose
command
as the connection type - In the command field, enter:
%Path_To_Gateway_Binary% start --config %Path_To_Config_Yaml%/gateway.yaml mcp-stdio
- Save the settings
- Verify that the newly added MCP server is highlighted in green and tools are listed in the description
2.2 Configure MCP Connection Using SSE Mode (Optional)
In the MCP settings:
- Click the
Add new MCP server
button - Set the name of your MCP server
- Choose
sse
as the connection type - In the URL field, enter:
http://localhost:9090/sse
- Save the settings
- Verify that the newly added MCP server is highlighted in green and tools are listed in the description
3. Verify Connection
To verify that the connection is working:
- Open Cursor’s chat window
- Type:
what mcp tools do you have
- Cursor should display a list of available tools
Troubleshooting
If you encounter connection issues:
- Verify that the API server is running and accessible
- Check the endpoint URL configuration
- Ensure no firewalls are blocking the connection
- Review Cursor logs for error messages