MCP Server on Cloudflare Workers & Azure Functions

This is a template for me to create an MCP server on Cloudflare
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can run an MCP server that exposes tools, prompts, and resources via the MCP protocol so your AI assistants can interact with deployed services at the edge or in the cloud. This server supports edge deployment with Cloudflare Workers and cloud deployment with Azure Functions, giving you flexible hosting and fast responses for your MCP-enabled workflows.

How to use

You use an MCP client to request tools, prompts, or resources from the MCP server. Start by ensuring the server is reachable at its deployed endpoints. You can perform a health check to verify the server is up, and then send MCP requests to list available tools, fetch prompts, or access contextual resources. The server provides a concise set of example tools and prompts you can try, and it includes resources that describe server information, status, and getting started guidance. As you evolve your setup, you can subscribe to resource changes, use templates for parameterized resources, and access multiple content formats such as JSON and Markdown.

How to install

Prerequisites you need to prepare before installing include Node.js 18 or newer, a Cloudflare account (a free tier is fine), and npm or yarn as your package manager.

# Install dependencies
npm install

# Local development: start the dev server
npm run dev

# Health check and MCP interactions can be performed once the server is running

Additional setup and deployment notes

There are two deployment options you can choose from. The first uses Cloudflare Workers for edge deployment, and the second uses Azure Functions for the Azure ecosystem.

Cloudflare Workers deployment requires you to log in to Cloudflare and then deploy the MCP server. Use the following commands to install and deploy:

# Log in to Cloudflare
npx wrangler login

# Deploy to Cloudflare Workers
npm run deploy

Testing deployed endpoints

After deployment, you can test the health check and MCP endpoint to ensure everything is functioning as expected.

curl https://mcp-server.<your-subdomain>.workers.dev/health

curl -X POST https://mcp-server.<your-subdomain>.workers.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{"method": "tools/list"}'

Available tools

get_time

Returns the current server time for time-sensitive workflows.

echo

Echoes back the message you provide, useful for testing connectivity.

add

Adds two numbers together and returns the result.

code_review

Assist with reviewing code by providing feedback and suggestions.

explain_concept

Explain a technical concept in clear terms.

debug_helper

Offer guidance to debug issues and identify root causes.

api_design

Provide guidance on API design patterns and best practices.

refactor_suggestion

Suggest refactors to improve code quality and maintainability.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational