awesome-ai-native-cloudflare-app MCP Server

awesome-ai-native-cloudflare-app MCP Server

Enables AI agents to interact with the app via MCP tools and resources, supporting self-improvement through goal-setting and metrics tracking on Cloudflare Workers.

Category
Visit Server

README

awesome-ai-native-cloudflare-app

A batteries-included starting point for AI-native apps on Cloudflare Workers: one Worker that is simultaneously an HTTP app, an MCP server (so AI agents and workspaces like deco studio can operate it), an embeddable MCP-App UI, and a WhatsApp bot — deployed by git push via Workers Builds.

Start with PROMPT.md — the master prompt / field guide. Read it yourself, or paste it into your AI coding agent (as CLAUDE.md or system context) and describe the app you want. The scaffold in this repo is the reference implementation of every pattern it describes.

What's inside

PROMPT.md                     ← the master prompt (read this first)
wrangler.jsonc                one Worker: D1 + KV bindings, Text-import rules
src/server/
  main.ts                     Hono app: / (SPA), /mcp, /webhook, /healthz
  mcp/server.ts               complete MCP server in ~150 lines (JSON-RPC 2.0, no SDK)
  mcp/tools.ts                tool registry — plain objects, hand-written JSON Schema
  mcp/resources.ts            ui:// resources — the SPA served as an MCP App
  routes/webhook.ts           Meta WhatsApp webhook (HMAC, dedupe, ack-fast + waitUntil)
  pipeline/inbound.ts         LLM reply pipeline with KV thread memory
  services/meta.ts            zero-dependency WhatsApp Cloud API client
  ai/gateway.ts               all LLM calls via Cloudflare AI Gateway
  lib/auth.ts                 bearer gate for /mcp (3 vectors, constant-time, fail closed)
src/client/                   React 19 MCP-App UI → ONE self-contained HTML file
migrations/                   numbered D1 SQL migrations
prompts/system.md             system prompt, bundled as a string

The demo domain is a trivial notes app + WhatsApp assistant — deliberately boring, so the architecture is the interesting part. Replace the tools and views with your own.

Self-improving by design

The app measures itself (first-party analytics in D1 — no GA/PostHog: a track() helper, a POST /e beacon, cookieless daily-hash uniques) and exposes goals, memory, and hypotheses as MCP tools. Connect Claude Code to the deployed app (.mcp.json — set APP_MCP_URL / APP_MCP_TOKEN), and CLAUDE.md turns any session into an improvement cycle:

get_briefing → conclude testing hypotheses against real metrics →
pick one proposed bet → edit the code locally → deploy → record to memory

Set a few goals (goal_set), throw an agent at it, spend tokens, watch the metrics move. Humans stay in the loop at consequence: user-facing messages, money, data deletion. Full pattern in PROMPT.md §10.

Quickstart

bun install
cp .dev.vars.example .dev.vars          # set MCP_AUTH_TOKEN at minimum

# create resources, paste the printed ids into wrangler.jsonc
bunx wrangler d1 create app-db
bunx wrangler kv namespace create THREADS
bunx wrangler kv namespace create DEDUPE

bun run db:local                        # apply migrations locally
bun run dev:worker                      # builds UI + runs the Worker on :8787

Try it:

curl -X POST 'http://localhost:8787/mcp?token=dev-token-change-me' \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Deploy: bun run deploy once by hand, then connect the repo to Workers Builds in the Cloudflare dashboard so every push to main deploys and every PR gets a preview URL. Apply remote migrations with bun run db:remote and set secrets with wrangler secret put.

Register in deco studio: Registry → Add MCP Server → URL https://<your-worker>.workers.dev/mcp?token=<MCP_AUTH_TOKEN>, type http. Your tools appear in the workspace and the dashboard renders as an MCP App.

WhatsApp: create a Meta developer app + WhatsApp Business number, set the META_* secrets, point the webhook at https://<your-worker>/webhook with your verify token. Full recipe and gotchas in PROMPT.md §6.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured