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.
As mentioned before, I do most of my development around a base laravel + filament app that takes care of all the SAASy stuff (user registration/authentication, content management, billing, etc), and I just deploy that to very site along with a site-specific package to handle the "jobs to be done" for that site.
As such, I have a very bespoke development environment, where everything is done in one folder (where the base app is).
So to save me time, when I log into WSL and bash, it automatically changes me to that folder.
But in cursor, that causes problems if I'm working on a standalone tool (which I write as a standard laravel app as it's fast for me to do, and I don't need the SAASy stuff). For example, I'm currently working on a Twitter analytical tool for my own use, and it's written as a Laravel app with some CLI commands.
So, when cursor tries to run a command, it runs it in the base application folder, which is where my user profile says to run it. But I want it run in the standalone tool folder.
So, I never let cursor run commands in case it broke my base application.
Now though, I add "when you run any commands, prefix with with 'cd folder/path/here'"
And that's it fixed. It adds that prefix, changes to the proper folder, runs the command, analyses the output, fixes the code, runs the commands again, etc.
Beautiful.
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'm loving AI. Not for greating huge apps, but those little time-saving tools. Here's an example....
You hate all those CMSs, so you'll create your own. Simple, right?