Cursor Integration
Cursor is an AI-powered code editor with MCP support. This guide shows how to connect RLM to Cursor for documentation-aware coding assistance.
Prerequisites
- Cursor version 0.40 or later (MCP support required)
- An RLM project with at least one document indexed
- An API key from your RLM dashboard
Setup
Step 1: Open MCP Settings
In Cursor, go to Settings → Features → MCP Servers.
Step 2: Add Configuration
Click Edit Config and add the following to your mcp_config.json:
{ "mcpServers": { "rlm-docs": { "command": "npx", "args": [ "-y", "@anthropic-ai/mcp-proxy", "https://your-app.com/api/mcp/PROJECT_ID" ], "env": { "MCP_API_KEY": "YOUR_API_KEY" } } }}Note
This uses the @anthropic-ai/mcp-proxy package to connect HTTP MCP servers. It will be installed automatically via npx.
Step 3: Enable the Server
After saving the configuration:
- Return to the MCP Servers settings
- Find "rlm-docs" in the list
- Toggle it ON
- Wait for the connection indicator to turn green
Using RLM in Cursor
Once connected, you can use RLM tools in Cursor's AI chat (Cmd/Ctrl + L):
How does the authentication system work in this project?[Using rlm_ask]Based on your documentation, the auth system uses JWT...Composer Mode
RLM works great with Cursor's Composer mode (Cmd/Ctrl + I). When editing code, Cursor will automatically query your documentation for context.
Alternative: Direct HTTP (Experimental)
If Cursor supports direct HTTP MCP servers in your version, you can use this simpler configuration:
{ "mcpServers": { "rlm-docs": { "transport": "http", "url": "https://your-app.com/api/mcp/PROJECT_ID", "headers": { "X-API-Key": "YOUR_API_KEY" } } }}Troubleshooting
Server shows as "Disconnected"
- Check that the URL and API key are correct
- Verify
@anthropic-ai/mcp-proxyis working:npx @anthropic-ai/mcp-proxy --version - Try restarting Cursor
- Check Cursor's developer console for error messages
Tools not appearing in chat
- Ensure the server toggle is ON (green indicator)
- Try explicitly asking: "Use rlm_ask to find..."
- Check if there are any error messages in the MCP settings
"npx not found" error
- Make sure Node.js is installed and in your PATH
- Try using the full path:
/usr/local/bin/npx - Restart Cursor after installing Node.js