MCP HubMCP Hub
zueai

create-mcp

by: zueai

CLI to set up and deploy MCP Servers to Cloudflare Workers in seconds. Just write TypeScript functions to make Cursor MCP tools.

34created 22/02/2025
Visit
CLI
TypeScript

📌Overview

Purpose: To quickly set up a Model Control Protocol (MCP) server and deploy it to Cloudflare Workers, enabling rapid development of tools for the Cursor Agent.

Overview: The create-mcp CLI tool streamlines the process of scaffolding and deploying an MCP server. It simplifies the development of MCP tools by allowing users to write TypeScript functions with JSDoc annotations and deploy them seamlessly to the Cloudflare platform.

Key Features:

  • Easy Setup: Quickly clones a template repository, installs necessary dependencies, initializes a Git repository, and deploys a Hello World MCP server with a single command.

  • Function-based Tool Creation: Users can define functions in TypeScript that automatically compile into MCP tools, complete with detailed descriptions and parameters utilizing JSDoc comments.

  • Seamless Deployment: Simplifies the deployment process, allowing developers to redeploy updates easily and instantly utilize new tools in the Cursor Agent.

  • Integration with Cloudflare: Takes advantage of Cloudflare Workers for efficient and fast deployments, removing the need for local MCP server management.


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. (This will be removed soon)

Instructions

To scaffold and deploy a new MCP server, run:

bun create mcp

You can also pass a name directly to the command:

bun create mcp --name <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

How to Use

Add functions to the MyWorker class in src/index.ts. Each function will compile into an MCP tool.

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 define the tool's parameters, with types and descriptions.
  • The @return tag defines the tool's return value and its type.

Deploying Changes

  1. Redeploy the worker:
bun run deploy
  1. Reload your Cursor window.

Now you can ask your agent to use the new tool!

Why Cloudflare Workers?

Cloudflare Workers offer a great developer experience and fast deployments. With create-mcp, you don't need to run local MCP servers or node processes—simply write functions with JSDoc comments, and it just works.

Example Servers made with create-mcp

You can clone and deploy any MCP server made with create-mcp to your own Cloudflare account:

bun create mcp --clone <github-url>

Contributing

Contributions and feedback are welcome! Please submit a Pull Request or open an issue.

Acknowledgements

This project would not be possible without workers-mcp made by @geelen.