Connect to Cursor (Non-Engineer Track)
Goal
Configure Cursor to use your MCP server so you can test the greet tool.
Prompt
Copy and paste this entire prompt into Cursor:
1I need you to configure Cursor to use my MCP server. Do this automatically by editing the config file.
2
3Step 1: Find my server's absolute path
4
5Run this command:
6```bash
7cd my-mcp-server && pwd
8```
9
10Save the output - this is my project path. The full path to my server file is: {project_path}/src/index.ts
11
12Step 2: Find and read the Cursor MCP config
13
14First, find my home directory and the config file path:
15```bash
16echo "$HOME/.cursor/mcp.json"
17```
18
19The config file is at that path (e.g., /Users/myusername/.cursor/mcp.json).
20
21Read this file. If it doesn't exist or the .cursor folder doesn't exist, create them:
22```bash
23mkdir -p "$HOME/.cursor"
24```
25
26Step 3: Update the config file
27
28Add my server to the mcpServers object. The entry should look like this:
29
30```json
31"my-mcp-server": {
32 "command": "npx",
33 "args": [
34 "--registry", "https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual",
35 "-y", "ts-node", "--esm", "/ABSOLUTE/PATH/TO/my-mcp-server/src/index.ts"
36 ]
37}
38```
39
40Important rules:
41- Replace /ABSOLUTE/PATH/TO/ with the actual path from Step 1
42- Keep any existing servers in the config - don't delete them
43- Make sure the JSON is valid after editing
44
45Step 4: Write the updated config
46
47Save the updated config back to the mcp.json file.
48
49Step 5: Tell me what to do next
50
51After updating the file:
521. Tell me to restart Cursor (Cmd+Shift+P → "Reload Window" or quit and reopen)
532. Tell me to test by typing: "Use the greet tool to say hello to Alice"
54
55Success criteria:
56- The mcp.json file is updated with my server entry
57- The path in the config is absolute (starts with / on Mac or C:\ on Windows)
58- Existing MCP servers in the config are preserved
Expected Outcome
After running this prompt, Cursor will:
- Find your server's absolute path
- Read your existing Cursor MCP config
- Add your server to the config (keeping other servers)
- Save the updated config
- Tell you to restart and test
How to test it
- Restart Cursor (Cmd+Shift+P, run "Reload Window", or quit and reopen) so it notices the updated MCP config.
- In Cursor, ask the greet tool to say hello to Alice by typing:
Use the greet tool to say hello to Alice.
- Confirm the greet tool responds with a successful message that proves Cursor is using your server.
Config File Location
Run this to find your exact path:
1echo "$HOME/.cursor/mcp.json"
| OS |
Path |
| macOS |
/Users/{username}/.cursor/mcp.json |
| Windows |
C:\Users\{username}\.cursor\mcp.json |
| Linux |
/home/{username}/.cursor/mcp.json |
What The Config Looks Like
After the update, your ~/.cursor/mcp.json should look something like:
1{
2 "mcpServers": {
3 "my-mcp-server": {
4 "command": "npx",
5 "args": [
6 "--registry", "https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual",
7 "-y", "ts-node", "--esm", "/Users/yourname/projects/my-mcp-server/src/index.ts"
8 ]
9 }
10 }
11}
If you had other servers already, they'll still be there:
1{
2 "mcpServers": {
3 "some-other-server": { ... },
4 "my-mcp-server": {
5 "command": "npx",
6 "args": [
7 "--registry", "https://npm.autodesk.com/artifactory/api/npm/autodesk-npm-virtual",
8 "-y", "ts-node", "--esm", "/Users/yourname/projects/my-mcp-server/src/index.ts"
9 ]
10 }
11 }
12}
Troubleshooting
"File not found" error?
- The mcp.json file might not exist yet
- Ask Cursor to create it with just your server config
Server not appearing after restart?
- Check that the mcp.json file was actually saved
- Run
cat "$HOME/.cursor/mcp.json" to verify the content
- Make sure the JSON is valid (no trailing commas, proper brackets)
"Permission denied" error?
- The file might be owned by a different user
- Try:
chmod 644 "$HOME/.cursor/mcp.json"
Tool not working after restart?
- Check the absolute path is correct
- Make sure
npm install was completed in your project
- Look for error indicators next to your server in Cursor's MCP panel