Easy MCP Server Setup in Cursor IDE with Bundled Executables

Setting up custom MCP (Machine Command Protocol) servers in Cursor can involve tedious steps, such as configuring node paths or referencing additional commands. This lesson shows how to streamline this process by bundling your MCP server directly into a standalone executable.

Workflow demonstrated in this lesson:

  • Use a simple MCP server project starter.
  • Run a single bundling command to create an executable.
  • Right-click the generated executable, copy its full path, and add that directly to your Cursor settings.

Key benefits:

  • Eliminates the need for complex node path configurations.
  • Simplifies the setup and integration of custom MCP servers into Cursor.
  • Makes the server executable instantly accessible within your Cursor environment.

By following this streamlined approach, you can quickly and easily integrate custom MCP servers into Cursor, making your development workflow cleaner and more efficient.

https://github.com/johnlindquist/mcp-cursor-tool-starter

Share with a coworker

Transcript

[00:00] I've updated the mcp cursor tool starter to include a section on bundling executables. And this will require bun to be installed, and I have instructions for that as well, because bun can just take a TypeScript file and compile it to an executable. And what that looks like is in my package.json, if you scroll down to the scripts I've split the various MCPs into individual files. So if you want to build just the hello world example you can say pnpm build hello or npm run build hello. And this will compile this file into bin mcp hello.

[00:33] So then when you come up here if you right-click on mcp-hello you can say copy path, open the settings, go to mcp, press add new mcp server. We'll call this mcp-hello and then just paste in the command to run, leave this set to command, and then hit add. So then once you open Composer, since we have a tool called hello here, we can just say hello John, hit enter, it will invoke our tool, you can see it passes the name John, and gets the result back, which we can use to complete a task.