Deploy an authless remote MCP server on Cloudflare Workers with easy setup and connection options
This example allows you to deploy a remote MCP server that doesn't require authentication on Cloudflare Workers.
A Remote MCP Server, built on Cloudflare Workers without authentication, serves as an essential component for integrating AI applications with various data sources and tools via the Model Context Protocol (MCP). This protocol standardizes how AI platforms can interact seamlessly through universally compatible adapters. By deploying this server, you enable users to access a wide array of tools directly within their preferred AI application.
The Remote MCP Server on Cloudflare enables the following core features and capabilities:
init()
method of src/index.ts
using this.server.tool(...)
.The architecture of the Remote MCP Server is designed around the Model Context Protocol (MCP). This protocol defines a standardized way for AI applications to communicate and interact with external tools and data sources. The server uses Cloudflare Workers, which provides scalable and secure hosting solutions specifically tailored for running JavaScript code at the edge.
src/index.ts
To add tools, developers must define them within the init()
method of the server:
this.server.tool((input) => {
// Logic to handle input and return a response
});
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram illustrates the flow of data from an AI application, through the MCP client and protocol, to the MCP server and ultimately to a relevant data source or tool.
Getting started with the Remote MCP Server on Cloudflare is straightforward:
Use the dedicated GitHub action button provided:
This will deploy your MCP server to a URL like: remote-mcp-server-authless.<your-account>.workers.dev/sse
Alternatively, you can set up the server on your local machine using:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless
In financial applications, an AI application might require fetching and processing historical stock market data. With the Remote MCP Server, this can be achieved by integrating a tool that pulls real-time or archived financial data from APIs, such as Yahoo Finance.
A content writer using Claude Desktop could deploy an MCP server with tools to automate SEO analysis and keyword generation. This allows the user to integrate these functionalities directly into their workflow, enhancing productivity and output quality.
The Remote MCP Server supports integration with MCP clients such as:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The Remote MCP Server has been tested and optimized for performance on various Cloudflare Regions with minimal latency. It supports a wide range of tools, making it highly versatile for different AI workflows.
To customize the server further, you can modify its configuration:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Ensure that the API keys and other sensitive information are stored securely.
this.server.tool(...)
.Contributions are welcome! If you wish to contribute code or documentation, please fork the repository, make your changes, and submit a pull request. Ensure that all new contributions adhere to existing coding standards and quality guidelines.
For more information on the Model Context Protocol (MCP) and its usage in AI applications, refer to the official MCP documentation:
By leveraging this Remote MCP Server, developers can significantly enhance their AI application's capabilities through flexible integrations with external tools and data sources.
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Connects n8n workflows to MCP servers for AI tool integration and data access
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases