Create custom AI tools with Cloudflare Workers MCP for seamless integration with Claude Cursor and more
The SCP-Workers-MCP Demo project utilizes Cloudflare Workers' Model Context Protocol (MCP) to create custom AI tools that can seamlessly integrate with various AI assistants such as Claude, Cursor, and other MCP-compatible applications. This server aims to expand the capabilities of AI by connecting them with specific data sources and tools through a standardized protocol.
The SCP-Workers-MCP Demo offers several core features that enhance its compatibility and functionality within the MCP ecosystem:
These features collectively ensure that this server is a versatile extension of any MCP-compatible AI application.
The underlying architecture of SCP-Workers-MCP Demo is designed to adhere strictly to the Model Context Protocol. The protocol flow diagram below illustrates how data and commands are passed between the AI application, the server, and external tools.
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:#b8d3ef
style D fill:#a9dbfd
Imagine an environment where users require real-time content creation powered by AI. The user interacts with Claude Desktop, which then makes a call to the SCP-Workers-MCP Demo server to generate images or execute other specific tasks based on user input.
In another scenario, an organization might integrate various custom tools and data sources into their existing workflow using this server. For example, generating random numbers for simulations is easily accomplished by a simple API call from the MCP protocol.
Clone This Repository: Navigate through the setup process to create and deploy your own custom AI tool server.
git clone https://github.com/akazwz/workers-mcp-demo.git
cd workers-mcp-demo
Install Necessary Dependencies: Ensure you have Node.js (v16 or later) and pnpm installed to manage the project dependencies.
pnpm install
Configure Your Cloudflare Worker: Use Wrangler CLI for setup.
pnpx wrangler login
npx workers-mcp setup
Optional Free User Configuration Adjustments:
If using a free Cloudflare Workers plan, delete or comment out lines in wrangler.jsonc
related to Browser Rendering.
Deploy Your Worker:
pnpm run deploy
Integrate With MISC Clients: Use the commands provided for specific clients (e.g., Claude, Cursor).
Test and Use the Tools: Deployed tools can be accessed by calling them from an MCP client.
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
The server supports essential tools like getRandomNumber
, generateImage
, and more, providing a broad range of functionalities for developers building custom applications.
These tools can be customized further by editing the source code, ensuring that new functionalities are reflected in the deployed server upon re-deployment.
Client | Compatibility |
---|---|
Claude Desktop | ✅ |
Continue | ✅ |
Cursor | ❌ |
Note: The Cursor
client is currently limited to tool integration only, as it does not support prompt interactions through MCP.
pnpx workers-mcp install:claude
The server has been tested against different scenarios and provides full compatibility across popular AI assistants. Detailed test results can be found in the repository’s documentation section.
Adjustments to enable security features and custom configurations are straightforward, ensuring that the environment is secure and meets specific requirements.
wrangler.toml
file.Can I use this server with any AI assistant? Yes, it supports major assistants like Claude Desktop and Continue. Cursor currently only supports tool integration.
How do I add a new function to the server?
Edit src/index.ts
and then redeploy using pnpm run deploy
.
What if an MCP client is having trouble accessing my tools? Please ensure that your worker URL or other configurations are correct, and consider checking logs for errors.
How frequently should I update the server to keep up with MCP standards? Regular updates are recommended to maintain compatibility and security. Follow the latest release notes and community guidelines.
Is there any specific configuration required for free Cloudflare Worker users? Free users must remove the Browser Rendering API binding, or it will fail due to limitations in free accounts.
Contributions are welcome from the developer community! Follow these steps to get started:
The SCP-Workers-MCP Demo is built on top of Cloudflare Workers' MCP framework and is tightly integrated with MCP standards proposed by Anthropic. Leveraging existing infrastructure, this project provides a flexible foundation for developing MCP-compatible AI applications.
By adhering to the Model Context Protocol, developers can ensure that their custom tools are compatible across various platforms, enhancing efficiency and interoperability in workflows involving machine learning and AI.
This comprehensive document positions SCP-Workers-MCP Demo as a robust toolset for integrating custom data sources and functions into MCP-based AI applications like Claude Desktop and Cursor. It caters to developers looking to expand the functionality of their AI tools by leveraging this well-documented framework.
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