create-mcp
A CLI tool that sets up a Model Control Protocol (MCP)β server and deploys it to Cloudflare Workers so you can start making new tools for your Cursor Agent in minutes.
Just write TypeScript functions with JSDoc comments to give your agent MCP tools.
Prerequisites
- Wrangler CLIβ installed and logged in with your Cloudflare account.
- Claude Desktop App installed.
Instructions
To scaffold and deploy a new MCP server, just run:
bun create mcp
You can also pass a name to the server: bun create mcp <server-name>
.
What this CLI does
- Clones the template worker repository into
<current-dir>/<server-name>
- Installs dependencies
- Initializes a Git repository
- Deploys a Hello World MCP server to your Cloudflare account
- Adds it to Claude Desktop
- Copies the MCP server command to your clipboard so you can paste it into Cursor
Development
To start hacking on your MCP server:
cd <server-name>
bun dev
How to Use
Just add functions to the MyWorker
class in src/index.ts
. Each function will compile into an MCP tool.
For example:
/**
* A warm, friendly greeting from your new Workers MCP server.
* @param name {string} the name of the person we are greeting.
* @return {string} the contents of our greeting.
*/
sayHello(name: string) {
return `Hello from an MCP Worker, ${name}!`;
}
- The first line is the toolβs description.
- The
@param
tags are the toolβs params, with types and descriptions. - The
@return
tag is the toolβs return value, with its type.
Deploying Changes
- Redeploy the worker:
bun run deploy
- Reload your Cursor window.
Now you can ask your agent to use the new tool!
Why Cloudflare Workers?
Honestly, vibes, great DX, and blazing fast deployments.
I donβt like running MCP servers locally, and Iβm pretty sure you donβt either. Now we donβt have to run node processes to use simple MCP tools in Cursor that call APIs.
All you have to do is write functions. Put your descriptions and params in JSDoc comments and it just works.
Examples
Contributing
Contributions and feedback are extremely welcome! Please feel free to submit a Pull Request or open an issue!
Acknowledgements
This project would not be possible without workers-mcpβ made by @geelenβ