Getting MCP, Cursor, and WSL playing together [Updated 25/04/2025]
For weeks I've been trying to get MCPs working in cursor on my windows laptop, where my code is running in WSL. I've cracked it, thanks to a friendly person on Reddit.
The Tasks.json file is a configuration file that VSCode/Cursor can run automatically (or manually, but I'm not using it for that). You can see in the sample below that there are a number of scripts I run in this folder (runOn: folderOpen) as soon as I open it in the IDE.
In this case it is:
Starting the browser-tools MCP for my AI work
Running laravel's server
Running a simple webserver on a particular folder, alongside the laravel one but on a different port
Running npm run dev
And opening my local screenshots folder to make it easier to drag screenshots into Claude Code
What could you automate for yourself?
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "mcp-browser-tools-server",
"type": "shell",
"command": "npx -y @agentdeskai/browser-tools-server@latest",
"runOptions": {
"runOn": "folderOpen",
}
},
{
"label": "latest-export",
"type": "shell",
"command": "cd storage/app/exports/latest && ws --port 3000",
"runOptions": {
"runOn": "folderOpen",
}
},
{
"label": "artisan-serve",
"type": "shell",
"command": "php artisan serve",
"runOptions": {
"runOn": "folderOpen",
}
},
{
"label": "artisan-queue-listen",
"type": "shell",
"command": "php artisan queue:listen",
"runOptions": {
"runOn": "folderOpen",
}
},
{
"label": "npm-run-dev",
"type": "shell",
"command": "npm run dev",
"runOptions": {
"runOn": "folderOpen",
}
},
{
"label": "explorer-screenshots",
"type": "shell",
"command": "powershell.exe",
"args": ["-Command", "Invoke-Item", "'C:\\Users\\blake\\Pictures\\Screenshots'"],
"runOptions": {
"runOn": "folderOpen",
},
"group": "build",
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"problemMatcher": []
}
]
}
For weeks I've been trying to get MCPs working in cursor on my windows laptop, where my code is running in WSL. I've cracked it, thanks to a friendly person on Reddit.
I've recently started expanding my usage of Cursor to let it run commands, tests, etc and fix it's own issues. Here's my experience.
I'm loving AI. Not for greating huge apps, but those little time-saving tools. Here's an example....