Cloudflare AI
alvinmrrry
README
Cloudflare AI
This repository contains various packages and demo apps related consuming Cloudflare's AI offerings on the client-side. It is a monorepo powered by Nx and Changesets.
Packages
workers-ai-provider
: A custom provider that enables Workers AI's models for the Vercel AI SDK.
Local Development
-
Clone the repository.
git clone git@github.com:cloudflare/ai.git
-
Install Dependencies.
From the root directory, run:
cd ai npm install
-
Develop.
To start a development server for a specific app (for instance,
tool-calling
):npx nx dev tool-calling
Ideally all commands should be executed from the repository root with the
npx nx
prefix. This will ensure that the dependency graph is managed correctly, e.g. if one package relies on the output of an other. -
Testing and Linting.
-
To execute your continuous integration tests for a specific project (e.g.,
workers-ai-provider
):npx nx test:ci workers-ai-provider
-
To lint a specific project:
npx nx lint my-project
-
To run a more comprehensive sweep of tasks (lint, tests, type checks, build) against one or more projects:
npx nx run-many -t lint test:ci type-check build -p "my-project other-project"
- Other Nx Tasks.
build
: Compiles a project or a set of projects.test
: Runs project tests in watch mode.test:ci
: Runs tests in CI mode (no watch).test:smoke
: Runs smoke tests.type-check
: Performs TypeScript type checks.
Creating a New Demo App
In order to scaffold a new demo app, you can use the create-demo
script. This script will create a new demo app in the demos
directory.
npm run create-demo <demo-name>
After creating the app, npm install
will be run to install the dependencies, and npx nx cf-typegen <demo-name>
will be run to generate the types for the demo app. Then it's simply a case of starting the app with:
npx nx dev <demo-name>
Contributing
We appreciate contributions and encourage pull requests. Please follow these guidelines:
- Project Setup: After forking or cloning, install dependencies with
npm install
. - Branching: Create a new branch for your feature or fix.
- Making Changes:
- Add or update relevant tests.
- On pushing your changes, automated tasks will be run (courtesy of a Husky pre-push hook).
- Changesets: If your changes affect a published package, run
npx changeset
to create a changeset. Provide a concise summary of your changes in the changeset prompt. - Pull Request: Submit a pull request to the
main
branch. The team will review it and merge if everything is in order.
Release Process
This repository uses Changesets to manage versioning and publication:
-
Changeset Creation: Whenever a change is made that warrants a new release (e.g., bug fixes, new features), run:
npx changeset
Provide a clear description of the changes.
-
Merging: Once the changeset is merged into
main
, our GitHub Actions workflows will:
- Detect the changed packages, and create a Version Packages PR.
- Increment versions automatically (via Changesets).
- Publish any package that has a version number to npm. (Demos and other internal items do not require versioning.)
- Publication: The release workflow (
.github/workflows/release.yml
) will run on every push tomain
. It ensures each published package is tagged and released on npm. Any package with a version field in itspackage.json
will be included in this process.
For any queries or guidance, kindly open an issue or submit a pull request. We hope this structure and process help you to contribute effectively.
Recommended Servers
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.
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.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.