Give AI access, not control

Write TypeScript routes that send emails, manage calendars, and automate work. Expose them to Claude, ChatGPT, Cursor, or any AI agent via MCP. AI calls your code, not your computer.

import { craft, tool, mail } from '@routecraft/routecraft'
import { z } from 'zod'
export default craft()
.id('send-team-email')
.from(tool('send-team-email', {
description: 'Send email to team members',
schema: z.object({
to: z.string().email().refine(
email => email.endsWith('@company.com'),
'Can only send to @company.com addresses'
),
subject: z.string(),
message: z.string()
})
}))
.to(mail()) // Config loaded from context

Introduction

Getting started

Get up and running with RouteCraft in 60 seconds.

Give AI Access, Not Control

Build automation that AI can use—without giving it your entire system.

Code Your Automation

Write TypeScript routes that define exactly what AI can do. Send emails, manage calendars, automate tasks. All from code you write and control.

Works with Any AI Agent

Expose your routes as tools via MCP. Works with Claude Desktop, ChatGPT, Cursor, or any MCP client. Your AI discovers them automatically and calls them when needed.

Safe by Design

AI only accesses the routes you explicitly code. No filesystem access, no shell commands. You control everything.


Play Online

Try RouteCraft in your browser without installing anything:

Open on CodeSandbox

Play around with RouteCraft in your browser.

Create a new project

npm create routecraft@latest my-app

Start the development server

cd my-app
npm run dev

You should see your routes start and log output in your terminal.

Your first route

The starter project includes a hello world route at routes/hello-world.route.ts. It demonstrates the core flow:

  1. Start with data - .from(simple({ userId: 1 })) creates an exchange with a user ID
  2. Enrich from an API - .enrich(fetch(...)) calls an external API and merges the result
  3. Transform - .transform(...) shapes the data into a greeting
  4. Output - .to(log()) logs the final result to the console

This pattern (source, transform, destination) is the foundation of every RouteCraft route.

For AI automation, check out the hero example above showing how to send team emails with built-in domain filtering.

What Can You Build?

Email Assistant

"Unsubscribe me from promotional emails" → Scans inbox, categorizes, unsubscribes automatically

Meeting Coordinator

"Move my meeting with John to 2pm" → Finds the meeting, updates time, notifies attendees

Travel Planner

"Book me a flight to NYC next Tuesday" → Searches flights, finds best option, presents details

Restaurant Booking

"Reserve a table for 4 at an Italian place tonight" → Searches restaurants, books reservation

Expense Tracker

"Add this receipt to my expenses" → Extracts data, categorizes, logs to spreadsheet

Document Assistant

"Summarize my unread contracts" → Reads PDFs, extracts key terms, prioritizes

Next steps

Introduction

Learn what RouteCraft is and understand the core concepts.

AI & MCP Setup

Connect RouteCraft to Claude Desktop or Cursor.

Email Assistant

Build an AI that can send and manage emails.

Installation

System requirements, production builds, and manual setup.