Deploy a no-auth remote MCP server on Cloudflare Workers for AI tools and playground access
A Remote No-Auth Model Context Protocol (MCP) server is designed to handle model interactions without requiring user authentication, making it particularly suitable for public or experimental use cases. This example showcases how you can deploy an MCP server using Cloudflare Workers that returns gifs based on input queries. By leveraging the power of Cloudflare's infrastructure, this server can be quickly set up and customized to integrate with various AI applications.
The Remote No-Auth MCP Server is built to provide a foundational layer for integrating diverse tools into AI applications through the Model Context Protocol (MCP). These capabilities enable developers to seamlessly connect their applications to external data sources, services, and tools without the need for authentication. The server supports custom tool definitions that can be initialized using TypeScript in src/index.ts
. By leveraging this flexibility, you can extend the server’s functionality to meet specific AI application needs.
The core features of the Remote No-Auth MCP Server include:
init()
method using this.server.tool(...)
.The architecture of the Remote No-Auth MCP Server is structured to adhere strictly to the Model Context Protocol (MCP). Following are key aspects of its implementation:
graph TD
A[AI Application] -->|MCP Client| B[MCP Server]
B --> C[MCP Protocol]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram illustrates the flow of interactions between an AI application, the MCP server, and external data sources or tools. The MCP client acts as a bridge, facilitating seamless communication through the MCP protocol.
To set up the Remote No-Auth MCP Server:
You can deploy the server using a simple button in the provided GitHub repository or manually through the command line. Here are both methods:
remote-mcp-server-authless.<your-account>.workers.dev/sse
.npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless
Alternatively, you can clone and set it up locally:
git clone https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authless
cd remote-mcp-authless
npx cloudflared workers dev --workers-token $WORKERS_TOKEN .
Imagine building an AI application that lets users search for gifs based on text queries. The Remote No-Auth MCP Server can be configured to respond to keyword prompts, returning relevant gifs in real-time. For example:
{
"prompts": ["search gifs for <query>"],
"tools": [
{
"name": "Giphy API",
"toolId": "giphy-api-tool"
}
]
}
Another use case involves integrating the server with custom data analysis tools. For instance, you could define a tool that integrates with a financial dataset to provide stock market analytics, allowing users to query for specific trends and insights directly from an AI application.
To utilize this server in your AI application setup:
remote-mcp-server-authless.<your-account>.workers.dev/sse
).For local client connections, you may need to use a tool like mcp-remote
. Here’s how to set it up with Claude Desktop:
{
"mcpServers": {
"calculator": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse" // or remote-mcp-server-authless.your-account.workers.dev/sse
]
}
}
}
Restart Claude and the tools should become accessible.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The Remote No-Auth MCP Server supports full integration with Claude Desktop and Continue, offering direct tool interactions via the MCP protocol. Cursor can only be used for tools but lacks comprehensive prompt handling.
While this server is designed to be public, you may still need to configure some aspects for security:
API_KEY
: A key provided by your API provider (not required in no-auth scenarios).Update the environment variables as needed:
env: {
"API_KEY": "your-api-key"
}
Can I use this server with other MCP clients besides Claude Desktop, Continue, and Cursor?
How do I secure my server if I need authentication?
Is there any cost associated with deploying this server on Cloudflare Workers?
How does the performance of this server compare across different regions?
What are the limitations of the tools I can define in this MCP server?
To contribute to or develop further with this project:
Explore more about the Model Context Protocol (MCP) through these resources:
By contributing to and utilizing this Remote No-Auth MCP Server, developers can significantly enhance their AI application integrations, providing richer functionalities and experiences.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration